gpt4 book ai didi

python - PyBossa Vagrant 不工作

转载 作者:行者123 更新时间:2023-12-01 03:42:56 26 4
gpt4 key购买 nike

我们在以下云服务器上配置 PyBossa 时遇到问题。

DigitalOcean
RAM: 8GB
SSD: 80GB
OS: UBUNTU 16.04.1
Arch: 64

我正在尝试使用以下命令配置它。

apt-get install virtualbox
apt-get install vagrant
git clone --recursive https://github.com/PyBossa/pybossa.git
cd pybossa
vagrant up

系统卡在“vagrant up”,跟踪如下。

# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'ubuntu/trusty64' (v0) for provider: virtualbox
default: Downloading: https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box
==> default: Successfully added box 'ubuntu/trusty64' (v0) for 'virtualbox'!
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: pybossa_default_1472726103015_90247
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 5000 (guest) => 5000 (host) (adapter 1)
default: 5001 (guest) => 5001 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...

尝试使用

更改 Vagrant 文件中的超时
config.vm.boot_timeout = 300

但是还是没有效果。您能提出解决方案吗?

问题出在 Virtualbox 版本上,它仅适用于 4.0、4.1、4.2、4.3。

现在将操作系统降级到版本 14.04,将虚拟盒降级到 4.3,现在正在继续,现在问题是这个跟踪。

[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 5000 => 5000 (adapter 1)
[default] -- 5001 => 5001 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' state. Please verify everything is configured
properly and try again.

如果您使用的提供商有附带的 GUI,打开它并观察机器通常会很有帮助,因为GUI 通常具有比 Vagrant 可以检索到的更多有用的错误消息。例如,如果您使用 VirtualBox,请运行 vagrant up,同时VirtualBox GUI 已打开。

如果您再次尝试此操作,Vbox 仍处于锁定状态。

# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "2b7f90da-d5a5-4782-a6a5-4e3e96838ed3", "--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp5000", "--natpf1", "delete", "tcp5001"]

Stderr: VBoxManage: error: The machine 'pybossa_default_1472733433672_71002' is already locked for a session (or being unlocked)
VBoxManage: error: Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "LockMachine(a->session, LockType_Write)" at line 471 of file VBoxManageModifyVM.cpp

现在,如果你终止进程并命令“vagrant up --debug”然后跟踪以 vbox 模式结束。

/usr/lib/ruby/vendor_ruby/vagrant/machine.rb:147:in `action'
/usr/lib/ruby/vendor_ruby/vagrant/batch_action.rb:63:in `block (2 levels) in run'
INFO interface: error: The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'gurumeditation' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

有什么解决方案吗?

最佳答案

我刚刚使用最新版本的 VirtualBox (v5.1.4) 和 Vagrant (v1.8.5) 测试了新安装的 PYBOSSA,一切都按预期运行。我不知道到底出了什么问题,但我在自己的笔记本电脑中运行 vagrant,而不是在虚拟机中运行(您是否在 Digital Ocean 中使用了虚拟机?)。因此,我的建议如下:

  • 安装最新版本的 Vagrant 和 VirtualBox
  • 重新运行 vagrant-up 看看会发生什么。

请务必清理以前的虚拟机,以便从全新安装开始。

关于python - PyBossa Vagrant 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39269483/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com