LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 02:49 AM   #1
threezerous
Member
 
Registered: Jul 2009
Posts: 96

Rep: Reputation: 16
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, 01:30 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
- 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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:06 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
Open Source Consulting | Domain Registration