Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
Guillaume Cottenceau wrote on Thu, Jun 13, 2002 at 09:26:52PM +0200 : > > > > Hmm, maybe. But there's something really strange - when I run service > > webmin start, I do not get any error message. Only during bootup I get > > this error message?! There's also no error message in some log file in > > /var/log. > > Strange. > Agreed. I too experienced very strange issues when writing an init script to start Jakarta Tomcat with Java. I've quoted the final init script at the end of this email. The issue I had was it died when I did a "service xxxname restart". It *seemed* to start ok, but as soon as you pointed a browser at it, it died. If I did stop, then a start, everything worked fine. Restart was the only thing that didn't work. I suspect it has to do with spawning a shell that spawns a shell. Look at the script: start() { gprintf "Starting up Apache daemon: " daemon /usr/local/apache/bin/apachectl start RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/httpd echo gprintf "Cleaning up stray java processes" sleep 1 killall java sleep 1 killall -9 java echo gprintf "Starting up Jakarta Tomcat daemon: " daemon $TOMCAT/bin/startup.sh RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/jakarta echo gprintf "Starting up Jakarta Tomcat (external) daemon: " export CATALINA_BASE=$TOMCAT-external daemon $TOMCAT/bin/startup.sh RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/jakarta-external } stop() { gprintf "Shutting down Jakarta Tomcat daemon: " $TOMCAT/bin/shutdown.sh RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/jakarta echo gprintf "Shutting down Jakarta Tomcat (external) daemon: " export CATALINA_BASE=$TOMCAT-external $TOMCAT/bin/shutdown.sh RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/jakarta-external echo } restart() { echo echo "Sorry, java has weird issues when the restart is invoked" echo "from the init script. Please manually call:" echo " service `basename $0` stop" echo " service `basename $0` start" echo RETVAL=$? } # See how we were called. case "$1" in start) start ;; stop) stop ;; status) dostatus ;; restart|reload) restart ;; condrestart) condrestart ;; *) gprintf "Usage: `basename $0` {start|stop|status|restart|reload|condrest art}\n" exit 1 esac I suspect that if I changed it to look like: restart|reload) stop start ;; Then that might make it work properly (because it spawns one less shell in the whole process. Feedback welcome. Blue skies... Todd -- Todd Lyons -- MandrakeSoft, Inc. http://www.mandrakesoft.com/ UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn Cooker Version mandrake-release-8.3-0.2mdk Kernel 2.4.18-19mdk msg66178/pgp0.pgp Description: PGP signature
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
Guillaume Cottenceau <[EMAIL PROTECTED]> writes: > > So the bug is someplace else. Maybe it's also a "bug" that the logs are > > stored in /var/run/webmin? > > Well yes, I suppose logs should go to /var/log rather than > /var/run/webmin; I will investigate that with Webmin author. Ok, after a check in the setup stuff, the problem is the following: by default, a variable set to /var/webmin is used to store the pidfile -and- the logfiles. 2 years ago, when I first packaged Webmin, it seems I chose to use /root/tmp (I don't know why exactly). Then on Tue Sep 26 2000, Florin changed that to /var/log (appears nice). Then on Wed Oct 3 2001, I fixed bug #5580 by using /var/run.. because the pidfile -needs- to be in /var/run.. but then the logfiles were not in the correct place. So you were right, the problem really is specific to Mandrake package :-(. Fixing that. -- Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
Alexander Skwar <[EMAIL PROTECTED]> writes: > So sprach Guillaume Cottenceau am 2002-06-13 um 21:26:52 +0200 : > > Agreed. > > As I said - maybe it's not the webmin script at all. > > I actually think now, that it really isn't. I get the error message > after the backspace key is set ("Die Rücktaste sendet..") and before > swap is activated (I think - got to check this evening). But the point > is, that I don't get the error message when webmin is started. Well, /etc/rc.sysinit cleans some /var stuff at startup including /var/run, yep. > So the bug is someplace else. Maybe it's also a "bug" that the logs are > stored in /var/run/webmin? Well yes, I suppose logs should go to /var/log rather than /var/run/webmin; I will investigate that with Webmin author. -- Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
So sprach Guillaume Cottenceau am 2002-06-13 um 21:26:52 +0200 : > Agreed. As I said - maybe it's not the webmin script at all. I actually think now, that it really isn't. I get the error message after the backspace key is set ("Die Rücktaste sendet..") and before swap is activated (I think - got to check this evening). But the point is, that I don't get the error message when webmin is started. So the bug is someplace else. Maybe it's also a "bug" that the logs are stored in /var/run/webmin? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de |Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 1 hour 44 minutes
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
Alexander Skwar <[EMAIL PROTECTED]> writes: > So sprach Guillaume Cottenceau am 2002-06-10 um 09:03:05 +0200 : > > I think they got disrupted by the fact you specifically stated > > that it was "Mandrake init script" that removed the files. Which > > is not. > > Hmm, maybe. But there's something really strange - when I run service > webmin start, I do not get any error message. Only during bootup I get > this error message?! There's also no error message in some log file in > /var/log. > > Strange. Agreed. [...] > > > Will you get in touch with them, or should I do it? > > > > No :-). > > Aha ;) > > Q: Is your car red or green? > A: Yes. Sorry I misunderstood your question, I was not trying to joke/whatever. > So I take this to mean that I should not get in touch with them? *G* Well I think this is not a bug in Mandrake package since I don't change anything in this field and what you reported doesn't seem very convincing :-). -- Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
So sprach Guillaume Cottenceau am 2002-06-10 um 09:03:05 +0200 : > I think they got disrupted by the fact you specifically stated > that it was "Mandrake init script" that removed the files. Which > is not. Hmm, maybe. But there's something really strange - when I run service webmin start, I do not get any error message. Only during bootup I get this error message?! There's also no error message in some log file in /var/log. Strange. > > > Will you get in touch with them, or should I do it? > > No :-). Aha ;) Q: Is your car red or green? A: Yes. So I take this to mean that I should not get in touch with them? *G* Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de |Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 14 hours 35 minutes
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
Alexander Skwar <[EMAIL PROTECTED]> writes: > So sprach Guillaume Cottenceau am 2002-06-08 um 14:43:53 +0200 : > > Alexander Skwar <[EMAIL PROTECTED]> writes: > > > > > As you can see, that's a bug in the Mandrake init script. > > > > Sorry but I don't find anywhere in Mandrake init script for > > Webmin (/etc/init.d/webmin) any reference to something which > > would remove /var/run/webmin/diffs or anything. This > > file/directory is only referenced inside Webmin program files. > > Well, I haven't checked it myself yet. But since the webmin developers > say that it's not their fault, I don't think that they'll do anything > about it. I think they got disrupted by the fact you specifically stated that it was "Mandrake init script" that removed the files. Which is not. > Will you get in touch with them, or should I do it? No :-). -- Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
So sprach Guillaume Cottenceau am 2002-06-08 um 14:43:53 +0200 : > Alexander Skwar <[EMAIL PROTECTED]> writes: > > > As you can see, that's a bug in the Mandrake init script. > > Sorry but I don't find anywhere in Mandrake init script for > Webmin (/etc/init.d/webmin) any reference to something which > would remove /var/run/webmin/diffs or anything. This > file/directory is only referenced inside Webmin program files. Well, I haven't checked it myself yet. But since the webmin developers say that it's not their fault, I don't think that they'll do anything about it. Will you get in touch with them, or should I do it? Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.iso-top.de |Jabber: [EMAIL PROTECTED] iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 20 hours 30 minutes
Re: [Cooker] [fwd] [ webadmin-Bugs-565830 ] init script tries to remove log dir (from: noreply@sourceforge.net)
Alexander Skwar <[EMAIL PROTECTED]> writes: > As you can see, that's a bug in the Mandrake init script. Sorry but I don't find anywhere in Mandrake init script for Webmin (/etc/init.d/webmin) any reference to something which would remove /var/run/webmin/diffs or anything. This file/directory is only referenced inside Webmin program files. -- Guillaume Cottenceau - http://people.mandrakesoft.com/~gc/