LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-03-2010, 12:21 PM   #1
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Rep: Reputation: 0
Java Daemon Dies Quietly


I have a java processing running as a system service using a shell script to launch it. It runs under a user other than root via sudo -u.

The process runs just fine but seems to die sometimes for no apparent reason. When the process is killed normally (via service stop), it fires a shutdown hook in java and you can see the process going away.

What I see in the log now is nothing the process just dies. When I checked the system.log I found at the same time this:
Code:
messages:Mar  2 19:43:22 beta_web gconfd (sifagent-16786): starting (version 2.14.0), pid 16786 user 'sifagent'
messages:Mar  2 19:43:22 beta_web gconfd (sifagent-16786): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0
messages:Mar  2 19:43:22 beta_web gconfd (sifagent-16786): Resolved address "xml:readwrite:/home/sifagent//.gconf" to a writable configuration source at position 1
messages:Mar  2 19:43:22 beta_web gconfd (sifagent-16786): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2
The user is just for this service, so they didn't have a home. Previously the same gconfd message appeared but with an error about not having a writable home. I fixed that and part but the apparent connection between the gconfd messages in system.log and the java process having died persist.

Any ideas?

Thanks
-Doug
 
Old 03-03-2010, 05:01 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Are there any application specific logs ? You should also be able to set up debug level logging in the JAVA_OPTS
 
Old 03-04-2010, 11:33 AM   #3
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Yes there are, but nothing in there at stop time. When the process is shutdown in an orderly fashion (via kill) its shutdown hook fires and it does log - so its not getting stopped via service or a direct garden variety kill as nothing gets logged.

Its happened two more times - both with the gconfd activity for the daemon user at the same instant.
 
Old 03-04-2010, 01:20 PM   #4
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
I tried changing the daemon user's shell to noshell to see if that stopped the gconfd activity, but no luck. The daemon process just died a few hours after making that change.
 
Old 03-09-2010, 09:02 AM   #5
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Any ideas?
 
Old 03-09-2010, 10:09 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I'm not convinced that the gconf stuff is related... can you enable debug level logging ?
 
Old 03-10-2010, 02:22 PM   #7
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
I'm not convinced either, but its the only lead at this point. The only thing that seems clear is that the gconfd activity happens at the same time (every time) and only when it (java process dies) so its either a symptom or disease.

The logging level isn't external to the install so I have to have the developer rebuild and see what that yields. I'll post those results when I get them.
 
Old 03-10-2010, 02:52 PM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I'm not sure what platform you're running this on, but is selinux present or active ?
 
Old 03-10-2010, 02:58 PM   #9
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
RHEL 5.3 and selinux is in permissive.
 
Old 03-10-2010, 05:28 PM   #10
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Which jdk are you using ?
 
Old 03-11-2010, 08:21 AM   #11
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)

We've got a version of the app now that logs everything from the 3rd party libraries that we're using, hopefully that will point out something.
 
Old 03-30-2010, 07:50 AM   #12
dswanson99
LQ Newbie
 
Registered: Mar 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Just wanted to say thanks for your help. We still don't know anything but the inquiry has moved from the server to the java code, so I'm off the hook for now!
 
  


Reply

Tags
daemon, java


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
irexec --daemon dies after box goes idle. engtech Ubuntu 0 06-19-2008 03:57 PM
daemon dies !!!!!!!! sachinh Linux - General 5 12-05-2007 01:38 AM
My pppd daemon dies unexpectantly. Matt Barnes Slackware 6 12-08-2004 09:51 AM
pppd daemon dies, return value of 4 eed Linux - Networking 0 02-17-2004 09:41 AM
PPP Daemon dies on connection, but no when I'm in root Manyguns Linux - Newbie 1 05-27-2001 09:21 AM


All times are GMT -5. The time now is 11:38 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration