VirtualBox

Ticket #2335 (closed defect: worksforme)

Opened 6 years ago

Last modified 15 months ago

Unable to create Virtualbox COM object => check /tmp permissions

Reported by: pacowu Owned by:
Priority: major Component: VMM
Version: VirtualBox 2.0.2 Keywords:
Cc: Guest type: other
Host type: Mac OS X

Description

Attempted to start VirtualBox on Mac OS 10.4. Message came up saying, "Failed to created VirtualBox object." Error code was NS_ERROR_FACTORY_NOT_REGISTERED. Just upgraded to Firefox 3.0.3.

Change History

comment:1 Changed 6 years ago by uhhu

I got the same error in Fedora 8 after playing around with VirtualBox as root.

I was able to fix it when I typed "VirtualBox" in the console (NOT as root), checked the error messages, and deleted two temporary files in /tmp/ (as root).

comment:2 Changed 5 years ago by josir

I got the same error in Ubuntu 8.0.4.2 with Virtual Box 2.0, 2.1 and the repository version. Kernel 2.6.24-23-generic #1 SMP

I tried to open by console and got error:

josir@linux7:/tmp$ VirtualBox Wrong mode (42700) of '/tmp/.vbox-josir-ipc'. Wrong mode (42700) of '/tmp/.vbox-josir-ipc'.

On dialog, I got NS_ERROR_FACTORY_NOT_REGISTERED (0x80040154)

I tried also to remove /tmp/.vbox... directories but error persist.

comment:3 Changed 5 years ago by innusius

The same problem on Archlinux

comment:4 Changed 5 years ago by frank

Please could you post the output of

/bin/ls -ld /tmp

Thank you!

comment:5 Changed 5 years ago by innusius

I had : /bin/ls -ld /tmp drwsrwsrwx 14 rene users 4096 2009-02-18 12:25 /tmp

Now I have: /bin/ls -ld /tmp drwsrwsrwx 16 root root 4096 2009-02-18 12:45 /tmp

comment:6 Changed 5 years ago by frank

Both permissions are wrong. Please do the following as root:

chown root.root /tmp
chmod ug-s /tmp
chmod 1777 /tmp

Never set the user/group ID of the /tmp directory as the owner/group of an object in /tmp should be set to the user creating this object. What you really want is the 't' bit. See man chmod. I expect that your problems go away after you fixed the permissions.

comment:7 Changed 5 years ago by innusius

You are right , I had to do

chmod ug-s /tmp

and remove old virtualbox dir

rm -fr /tmp/.vbox-rene-ipc/

then it is working . Thank you , anyway litle bit corrected error message would help future users of virtualbox , this bug report will guide them though.

comment:8 Changed 5 years ago by josir

Works perfect for me too on Ubuntu.

I agree with innusius about a better error messages - googling a litte, you can see that a lot of users is getting this error but few had the opportunity to fill the bugtrack.

But this is not a bug anymore - it's now an improvement :)

Thanks a lot Frank.

comment:9 Changed 5 years ago by frank

I still wonder why the permission of the /tmp directory were wrong. Is that a default Ubuntu setting?

comment:10 Changed 5 years ago by josir

Not at all Frank. When I got the /tmp/.vbox-user-ipc error, I tried to grant all permissions (drwxrwxrwx) and then I messed everything....

In a regular installation, the permission are: drwxrwxrwt

If you need to do any other test, I will be glad to help. Josir

comment:11 Changed 5 years ago by frank

  • Summary changed from Unable to create Virtualbox COM object to Unable to create Virtualbox COM object => check /tmp permissions

comment:12 Changed 4 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Guess this is obsolete.

comment:13 Changed 18 months ago by vroomanj

  • Status changed from closed to reopened
  • Resolution fixed deleted

I am currently using the app-emulation/virtualbox-bin-4.1.22 ebuild from Gentoo Portage and I am receiving this same error when trying to launch VirtualBox. I have fixed permissions on the /tmp directory and removed /tmp/.vbox-rene-ipc/ and this did not solve my problem. I went a step further and removed the .virtualbox folder from my home directory (also tried removing it from root's).

Current permissions on /tmp:

drwxrwxrwt 24 root root 20480 Oct 19 08:43 /tmp/

Strangely enough if I cd to /opt/VirtualBox and then run the VirtualBox command the application launches.

All of the VirtualBox modules are loaded as far as I can tell.

Output from lsmod:

 Module                  Size  Used by
 vboxnetadp             17158  0 
 vboxnetflt             12973  0 
 vboxdrv              1754508  2 vboxnetadp,vboxnetflt
 nvidia              12276138  30 
 hid_logitech_dj         8918  0

Running an id on my user account my account is definitely in the vboxusers group.

I tried running /opt/bin/VirtualBox with sh -x (since it is a symlink to a shell script) both with my pwd as /tmp and my pwd as /opt/VirtualBox and the output all looks the same.

vroomanj@arceus ~ $ sh -x /opt/bin/VirtualBox
+ PATH=/usr/bin:/bin:/usr/sbin:/sbin
+ CONFIG=/etc/vbox/vbox.cfg
+ '[' '!' -r /etc/vbox/vbox.cfg ']'
+ . /etc/vbox/vbox.cfg
++ INSTALL_DIR=/opt/VirtualBox
+ '[' '' = shutdown ']'
+ lsmod
+ grep -q vboxdrv
+ '[' '!' -c /dev/vboxdrv ']'
+++ whoami
++ grep VBoxSVC
++ awk '{ print $1 }'
++ ps -U vroomanj
+ SERVER_PID=
+ '[' -z '' ']'
+ '[' -n vroomanj ']'
+ rm -rf /tmp/.vbox-vroomanj-ipc
+ '[' '' = true ']'
++ which /opt/bin/VirtualBox
+ APP=/opt/bin/VirtualBox
++ basename /opt/bin/VirtualBox
+ APP=VirtualBox
+ APP=VirtualBox
+ case "$APP" in
+ exec /opt/VirtualBox/VirtualBox
vroomanj@arceus /opt/VirtualBox $ sh -x /opt/bin/VirtualBox
+ PATH=/usr/bin:/bin:/usr/sbin:/sbin
+ CONFIG=/etc/vbox/vbox.cfg
+ '[' '!' -r /etc/vbox/vbox.cfg ']'
+ . /etc/vbox/vbox.cfg
++ INSTALL_DIR=/opt/VirtualBox
+ '[' '' = shutdown ']'
+ lsmod
+ grep -q vboxdrv
+ '[' '!' -c /dev/vboxdrv ']'
+++ whoami
++ grep VBoxSVC
++ awk '{ print $1 }'
++ ps -U vroomanj
+ SERVER_PID=
+ '[' -z '' ']'
+ '[' -n vroomanj ']'
+ rm -rf /tmp/.vbox-vroomanj-ipc
+ '[' '' = true ']'
++ which /opt/bin/VirtualBox
+ APP=/opt/bin/VirtualBox
++ basename /opt/bin/VirtualBox
+ APP=VirtualBox
+ APP=VirtualBox
+ case "$APP" in
+ exec /opt/VirtualBox/VirtualBox

I then tried using strace to see what I could find out but this introduced new strange behavior in that "strace VirtualBox" with a pwd of /opt/VirtualBox fails with the error:

VirtualBox - Error In SUPR3HardenedMain

Effective UID is not root (euid=1000 egid=1000 uid=1000 gid=1000)(rc=-10)

Please try reinstalling VirtualBox.

Which is strange because running VirtualBox from this directory without strace works fine. Anyhow, for the sake of being thorough I removed VirtualBox and reinstalled it and the behavior as described above persists.

I also tried suggestions found here:  https://forums.virtualbox.org/viewtopic.php?f=10&t=16090 regarding creating symlinks but found that they already exist:

arceus ~ # find /opt/VirtualBox -maxdepth 1 -name '*.so' -exec ln -s \{\} /opt/VirtualBox/components/ \;
ln: failed to create symbolic link ‘/opt/VirtualBox/components/VBoxVMM.so’: File exists
ln: failed to create symbolic link ‘/opt/VirtualBox/components/VBoxREM.so’: File exists
ln: failed to create symbolic link ‘/opt/VirtualBox/components/VBoxRT.so’: File exists
ln: failed to create symbolic link ‘/opt/VirtualBox/components/VBoxDDU.so’: File exists
ln: failed to create symbolic link ‘/opt/VirtualBox/components/VBoxXPCOM.so’: File exists

I'm at a loss as to what I should try next. Does anyone have any suggestions?

comment:14 Changed 18 months ago by frank

  • Status changed from reopened to closed
  • Resolution set to worksforme

Please ask such questions in the forum. The error message of VirtualBox makes it clear: The permissions are somehow wrong and it's a fault of your installation. The owner of the hardened VirtualBox stubs is not correct. This could also be a problem of the Gentoo packaging.

comment:15 Changed 15 months ago by dvo

  • Status changed from closed to reopened
  • Resolution worksforme deleted

On a brand new VMWare (9.0.1) installation, I got essentially the same error message. In my case the problem was simply that my Linux host's root partition (including /tmp) was full! VirtualBox should provide a more useful error message in this case.

comment:16 Changed 15 months ago by frank

  • Status changed from reopened to closed
  • Resolution set to worksforme

Why do you waste our time and re-open 2 different tickets?

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use