Edx_errors - WBowam/wbowam.github.com GitHub Wiki
Date: 2014-04-14 Title: Edx_errors Tags: Edx Category: It
1. 用Vagrant+Virtualbox+Ubuntu搭好Edx—paltform,执行启动命令:
vagrant up
错误:
"The guest machine entered an invalid state while waiting for it to boot.
Valid states are 'starting, running'. The machine is in the 'poweroff' state.
Please verify everything is configured properly and try again."
原因:
这是因为CPU不支持VT-X技术或者VT-X技术被锁定。
如果不打开虚拟化支持,是不能在虚拟机装64位操作系统或者安装操作系统设置多个CPU,如果安装32位操作系统只设置一个CPU,则不会出现上述错误。
解决方案一
VT-X是Intel CPU虚拟化技术,查看CPU是否支持VT-x技术:
cat /proc/cpuinfo | grep flags
如果存在 vmx 选项,则说明支持。
设置CPU开启VT-x技术。
开机进入BIOS选项 ,依次选Config->CPU->Intel Virtualization Technology,里面有个Intel VT-d Feature ,改成Enabled ,保存退出,关机,然后启动机器。
解决方案二
改虚拟机配置:
vim Vagrantfile
即改CPU
CPU_COUNT = 1
vagrant ssh
2.用Vagrant+Virtualbox+Ubuntu搭好Edx—paltform,执行启动命令:错误:
ssh_exchange_identification: Connection closed by remote host
原因:
典型的tcp_wrapper配置了不允许你这个ip登录ssh
解决方案:
让/etc/hosts.allow 和/etc/hosts.deny里面的所有信息都不生效,全部注销掉,重启SSH服务
3. 阿里云上部署好Edx-platform后,vagrant up 报了一些错
第一个错误:语法错误
#####原因:vagrant 版本过低(因为阿里云的源只有1.0.1版) #####解决方案: Go to the downloads page of Vagrant and check for the latest release. Once you are looking at the different versions of the latest release, right click over the one with the .deb extension and copy the link address. Then head back to your terminal and run the following command:
wget http://files.vagrantup.com/packages/0219bb87725aac28a97c0e924c310cc97831fd9d/vagrant_1.2.4_i686.deb
Replace the URL you see above (following the wget command) with the one you just copied. This will download Vagrant to your system. Next, install the package with the following command:
dpkg -i vagrant_1.2.4_i686.deb
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.
####### 下面问题的解决方案,被作者怀疑,准确性有待考察,请小伙伴们慎用!
第二个错误:
VirtualBox is complaining that the installation is incomplete. Please
run `VBoxManage --version` to see the error message which should contain
instructions on how to fix this error.
解决方案
sudo apt-get install dpkg-dev virtualbox-dkms
sudo apt-get install linux-headers-$(uname -r)
sudo dpkg-reconfigure virtualbox-dkms
####### 上面问题的解决方案,被作者怀疑,准确性有待考察,请小伙伴们慎用!
4.阿里云上部署好,vagrant up
wwj@AY14051916372845353bZ:~/fullstack$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'injera-fullstack' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'injera-fullstack' (v0) for provider: virtualbox
default: Downloading: file:///home/wwj/fullstack/20140418-injera-fullstack.box
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):
bsdtar: Failed to set default locale
x ./Vagrantfile
x ./box-disk1.vmdk: Write failed
x ./box.ovf: Write failed
bsdtar: Error exit delayed from previous errors.
5.阿里云上部署Edx-platform,vagrant up后,
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Failed writing body (488 != 16383)
原因:磁盘空间不足,阿里云服务器系统盘只有20G,已用16G,加载虚拟机,开始展开镜像,导致磁盘空间不足
解决方案:
第一步:买了个阿里云130G的数据盘
数据盘的挂载及使用,请参考阿里云帮助文档——挂载数据盘
第二部:更改Vagrant的根目录(VAGRANT_HOME)
在~/.bashrc
中加入:
export VAGRANT_HOME=/path/to/vagrant
6.阿里云上部署Edx-platform,vagrant up后,
vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'injera-fullstack' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Adding box 'injera-fullstack' (v0) for provider: virtualbox
default: Downloading: file:///home/wwj/fullstack/20140418-injera-fullstack.box.1
==> default: Successfully added box 'injera-fullstack' (v0) for 'virtualbox'!
There are errors in the configuration of this machine. Please fix
the following errors and try again:
Vagrant:
* Unknown configuration section 'hostsupdater'.
原因:
vagrant plugin list
发现 plugin hostsupdater
没了,
还记得问题5里,我们改了VAGRANT_HOME,但是没copy ~/.vagrant.d/
因此得重新装一下hostsupdater
:
vagrant plugin install vagrant-hostsupdater
7.vagrant
vagrant -v
/opt/vagrant/bin/vagrant: line 64:
/opt/vagrant/bin/../embedded/bin/ruby: No such file or directory
原因:装错包了
i686.deb
不是64位的意思
解决方案:装vagrant_x86_64.deb而不是vagrant_i686.deb
8.
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.2.0-29-generic) or it failed to
load. Please recompile the kernel module and install it by
sudo /etc/init.d/vboxdrv setup
You will not be able to start VMs until this problem is fixed.
4.3.12r93733
原因:
he vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.2.0-29-generic) or it failed to
load. Please recompile the kernel module and install it by
解决方案:
make sure: setup vboxdrv, and it is successful
$ sudo /etc/rc.d/vboxdrv setup
:: Unloading VirtualBox kernel modules [DONE]
:: Removing old VirtualBox netadp kernel module [DONE]
:: Removing old VirtualBox netflt kernel module [DONE]
:: Removing old VirtualBox kernel module [DONE]
:: Recompiling VirtualBox kernel modules [DONE]
:: Reloading VirtualBox kernel modules [DONE]
If the warning is still given, go ahead! Else GoodBye!
you need to either manually load the module or add it in the MODULES array in rc.conf
to auto load the module at boot add vboxdrv
to modules array in /etc/rc.conf
,by the command:
sudo modprobe vboxdrv