LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2014, 03:49 AM   #1
threezerous
Member
 
Registered: Jul 2009
Posts: 89

Rep: Reputation: 15
service fails while creating pid file in /ccustomdir/tmp/


Hello all,

I have a service file to start/top tomcat. While starting tomcat, the tomcat starts up correctly....but the service returns a failed state. After running an strace on service startup process, I get the following output. I gather this means it is unable to create the pid file under /ccustomdir/tmp/ and I did NOT find the pid file. The permissions on
ccustomdir are drwxr-xr-x and on
subdir tmp are drwxrwxrwt.
I was able to manually create/edit the file in that directory. Anything that I missed or any suggestions?

Thanks

open("/ccustomdir/tmp/tomcat-bir-service.pid", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, ".", 1.) = 1
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0}) = 0
open("/ccustomdir/tmp/tomcat-bir-service.pid", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, ".", 1.) = 1
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0}) = 0
write(1, "... failed!\n", 12... failed!
 
Old 07-15-2014, 02:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
- There's been SysV init scripts for Tomcat since ages ago, ensure you use an authoritative one as template.
- I notice the PID name says "bir". Could it be a script typo and should it check "bin"?
- Why force the use of "/ccustomdir/tmp" instead of standards compliant locations like /var/run or /run?
- You talk about directory access rights but how about directory ownership (compare with /var/run and the likes)?
 
  


Reply


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
auto-creating a pid file when starting a process tonj Linux - Software 5 05-09-2014 04:36 PM
sshd not creating PID file [CentOS5] neocookie Linux - Server 4 12-17-2008 08:36 AM
Why pid file is needed for service in linux? techie_techie Linux - General 2 01-05-2006 07:27 PM
httpd service stop fails, no pid, this after latest update squadja Red Hat 2 08-11-2004 03:29 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 04:36 AM


All times are GMT -5. The time now is 01:20 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration