Dick Davies
2006-May-11 11:20 UTC
[Xen-users] FIX: was Re: "Exception starting xend ((2, ''No such file or directory''))" - what file?
Poor form to reply to myself, I know. Looks like Ubuntu Dapper clears out /var/run on reboot, so I needed to add: mkdir -p /var/run/xenstored to the top of the initscript to ensure dom0 comes up. IMO it''s usual to assume /var/run is transient, so it might be an idea for xenstored to ensure it''s created before trying to use it. (We don''t have a /var/lock/subsys either, but that looks less fatal :) ) On 11/05/06, Dick Davies <rasputnik@gmail.com> wrote:> Hi all, I can''t get xend to start and could do with some help. > > this is the stock 30.2 release. it was working fine on ubuntu breezy, > and since I''ve updated to dapper it''s boned... > > The odd thing is, if I run the installer, I can start xend ok. but when > I reboot it''s broken again. > > I''m guessing a directory is being deleted by ubuntu at reboot time - > is there an easy way to figure out what exactly xend is trying to open? > > [2006-05-11 11:17:21 xend] INFO (SrvDaemon:278) Xend Daemon started > [2006-05-11 11:17:21 xend] INFO (SrvDaemon:282) Xend changeset: Thu > Apr 13 15:18:37 2006 +0100 9617:5802713c159b. > [2006-05-11 11:17:21 xend] ERROR (SrvDaemon:292) Exception starting > xend ((2, ''No such file or directory'')) > Traceback (most recent call last): > File "/usr/lib/python/xen/xend/server/SrvDaemon.py", line 286, in run > servers = SrvServer.create() > File "/usr/lib/python/xen/xend/server/SrvServer.py", line 108, in create > root.putChild(''xend'', SrvRoot()) > File "/usr/lib/python/xen/xend/server/SrvRoot.py", line 40, in __init__ > self.get(name) > File "/usr/lib/python/xen/web/SrvDir.py", line 82, in get > val = val.getobj() > File "/usr/lib/python/xen/web/SrvDir.py", line 52, in getobj > self.obj = klassobj() > File "/usr/lib/python/xen/xend/server/SrvDomainDir.py", line 39, in __init__ > self.xd = XendDomain.instance() > File "/usr/lib/python/xen/xend/XendDomain.py", line 582, in instance > inst.init() > File "/usr/lib/python/xen/xend/XendDomain.py", line 70, in init > xstransact.Mkdir(VMROOT) > File "/usr/lib/python/xen/xend/xenstore/xstransact.py", line 317, in Mkdir > complete(path, lambda t: t.mkdir(*args)) > File "/usr/lib/python/xen/xend/xenstore/xstransact.py", line 323, in complete > t = xstransact(path) > File "/usr/lib/python/xen/xend/xenstore/xstransact.py", line 20, in __init__ > self.transaction = xshandle().transaction_start() > File "/usr/lib/python/xen/xend/xenstore/xsutil.py", line 18, in xshandle > xs_handle = xen.lowlevel.xs.xs() > RuntimeError: (2, ''No such file or directory'') > (END) > > -- > Rasputin :: Jack of All Trades - Master of Nuns > http://number9.hellooperator.net/ >-- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Frank Meyer
2006-May-11 13:43 UTC
Re: [Xen-users] FIX: was Re: "Exception starting xend ((2, ''No such file or directory''))" - what file?
Dick Davies wrote:> Looks like Ubuntu Dapper clears out /var/run on reboot, so > I needed to add: > > mkdir -p /var/run/xenstored > > to the top of the initscript to ensure dom0 comes up.Yesterday I had the same problem as you ;-)> IMO it''s usual to assume /var/run is transient, so it might be > an idea for xenstored to ensure it''s created before trying to use it.Yes, that would be a good idea. This problem appeared here with the directory /var/run/xend, too. This directory should also be created by start of xend, e.g. the init script or xend itself.> On 11/05/06, Dick Davies <rasputnik@gmail.com> wrote: > [...] >> xend ((2, ''No such file or directory''))Why do the xen tools (like xm) display such boring error messages, e.g. omitting the name of the file? Yesterday I searched a lot of time with strace to find the reason why my domU did not start... Each poor Unix/Linux tool displays missing file names using perror(3), why not xm? Regards, Frank _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dick Davies
2006-May-11 14:23 UTC
Re: [Xen-users] FIX: was Re: "Exception starting xend ((2, ''No such file or directory''))" - what file?
On 11/05/06, Frank Meyer <frank@fli4l.de> wrote:> Yesterday I had the same problem as you ;-) > > > IMO it''s usual to assume /var/run is transient, so it might be > > an idea for xenstored to ensure it''s created before trying to use it. > > Yes, that would be a good idea. This problem appeared here with > the directory /var/run/xend, too. This directory should also be > created by start of xend, e.g. the init script or xend itself.Someone on ubuntu-users mentioned that, but ...(removes it and reboots to check)... yeah, /var/run/xend *is* being created properly, with xen 3.0.2. xenstored just needs a similar fix.> >> xend ((2, ''No such file or directory''))> Why do the xen tools (like xm) display such boring error messages, e.g. > omitting the name of the file? Yesterday I searched a lot of time with > strace to find the reason why my domU did not start... > > Each poor Unix/Linux tool displays missing file names using perror(3), > why not xm?/usr/libpython/xen isn''t much fun to trawl through either ( especially if you''re a ruby programmer :) ) There is an environment variable, XENSTORED_TRACE, that /usr/sbin/xend suggests should do something, but that just created me an empty logfile. -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Vincent Hanquez
2006-May-11 14:35 UTC
Re: [Xen-users] FIX: was Re: "Exception starting xend ((2, ''No such file or directory''))" - what file?
On Thu, May 11, 2006 at 03:23:15PM +0100, Dick Davies wrote:> xenstored just needs a similar fix.done :) -- Vincent Hanquez _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Frank Meyer
2006-May-11 14:37 UTC
Re: [Xen-users] FIX: was Re: "Exception starting xend ((2, ''No such file or directory''))" - what file?
Dick Davies wrote:> Someone on ubuntu-users mentioned that, but > ...(removes it and reboots to check)... > yeah, /var/run/xend *is* being created properly, with xen 3.0.2.On my xen-3.0.2 system /var/run/xend has *not* being created by xend: eis # rm -r /var/run/xenstored /var/run/xend eis # /etc/init.d/xend start eis # ps -ef | grep xend root 2727 1 0 17:30 ? 00:00:00 python /usr/sbin/xend start root 2729 2727 0 17:30 ? 00:00:00 python /usr/sbin/xend start root 2731 2729 0 17:30 ? 00:00:00 python /usr/sbin/xend start root 2732 2731 0 17:30 ? 00:00:00 python /usr/sbin/xend start root 2738 2676 0 17:30 pts/0 00:00:00 grep xend eis # xm create -c xmeisfair Using config file "/etc/xen/xmeisfair". Error: (2, ''No such file or directory'') <----- here it is! eis # ls -l /var/run/xenstored /var/run/xend ls: /var/run/xenstored: No such file or directory ls: /var/run/xend: No such file or directory Sorry ;-), Frank _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Dick Davies
2006-May-11 14:57 UTC
Re: [Xen-users] FIX: was Re: "Exception starting xend ((2, ''No such file or directory''))" - what file?
On 11/05/06, Frank Meyer <frank@fli4l.de> wrote:> Dick Davies wrote: > > > Someone on ubuntu-users mentioned that, but > > ...(removes it and reboots to check)... > > yeah, /var/run/xend *is* being created properly, with xen 3.0.2. > > On my xen-3.0.2 system /var/run/xend has *not* being created by xend: > > eis # rm -r /var/run/xenstored /var/run/xend > eis # /etc/init.d/xend start > eis # ps -ef | grep xend > root 2727 1 0 17:30 ? 00:00:00 python /usr/sbin/xend start > root 2729 2727 0 17:30 ? 00:00:00 python /usr/sbin/xend start > root 2731 2729 0 17:30 ? 00:00:00 python /usr/sbin/xend start > root 2732 2731 0 17:30 ? 00:00:00 python /usr/sbin/xend start > root 2738 2676 0 17:30 pts/0 00:00:00 grep xend > eis # xm create -c xmeisfair > Using config file "/etc/xen/xmeisfair". > Error: (2, ''No such file or directory'') <----- here it is! > eis # ls -l /var/run/xenstored /var/run/xend > ls: /var/run/xenstored: No such file or directoryGot t. If you make the xenstored directory, then xend can do its own: planb:~/ $ rm -r /var/run/xend* /var/run/xenstore* planb:~/ $ /etc/init.d/xend start planb:~/ $ ls -ld /var/run/xend /var/run/xenstored ls: /var/run/xend: No such file or directory ls: /var/run/xenstored: No such file or directory planb:~/ $ /etc/init.d/xend stop planb:~/ $ vi /etc/init.d/xend # add a line at the top to ''mkdir -p /var/run/xenstored'' planb:~/ $ /etc/init.d/xend start planb:~/ $ ls -ld /var/run/xend /var/run/xenstored drwx------ 2 root root 60 2006-05-11 15:53 /var/run/xend drwxr-xr-x 2 root root 80 2006-05-11 15:53 /var/run/xenstored Probably worth doing it in xen itself, so you don''t pick up a screwy umask like I just did (755 probably not the best permissions to put on the xenstored/ directory...) -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Vincent Hanquez
2006-May-11 15:09 UTC
Re: [Xen-users] FIX: was Re: "Exception starting xend ((2, ''No such file or directory''))" - what file?
On Thu, May 11, 2006 at 03:57:20PM +0100, Dick Davies wrote:> Probably worth doing it in xen itself, so you don''t pick up a screwy umask > like I just did (755 probably not the best permissions to put on the > xenstored/ > directory...)0755 is fine. both sockets are only open-able by root anyway. -- Vincent Hanquez _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users