Zeek Anow <zeekstern@gmail.com> writes:
We are running Solaris 10 Update 9, syslog-ng 3.1.2 - version details at bottom of this msg.
I wanted the syslog-ng.pid file to be located in swap so it would be cleared after a reboot. I also did not like the idea of creating the /usr/local/var/run directories, so:
I modified the /lib/svc/method file and then validated and imported the syslog-ng.xml file. I stopped/disabled the syslog-ng process to make this change.
So now, I have 3 problems, but syslog-ng is running, and I can't imagine how:)).
1. I cannot find the 2 files syslog-ng.pid or syslog-ng.ctl files anywhere on the system. I did a global find which searches the entire disk.
2. When syslog-ng started up, I got the following msg, and it is true: Error opening control socket, bind() failed; socket='/usr/local/var/syslog- ng.ctl', error='No such file or directory.
3. Before I made the change, a ps was showing: root 5769 1 7 7 0 Apr 21 ? 0:00 /usr/local/sbin/syslog-ng root 5770 5769 5770 5770 13 Apr 21 ? 5618:33 /usr/local/sbin/syslog-ng
cat /usr/local/var/syslog-ng.pid 5770
As you can see, the PID is 5770. Shouldn't that be 5769??
The problem is, according to the error message you quoted above, is that syslog-ng is trying to put its pidfile and the control socket to the location that was specified at build time. To override that, you can change the method file to actually pass the $PIDFILE to syslog-ng. It seems to me, that it doesn't do that, and only uses the PIDFILE option for itself. If you change the syslog-ng invocation in that method file to run syslog-ng with the -p $PIDFILE and -c /path/to/syslog-ng.ctl parameters, that should do the trick. If you're using the method file that comes with syslog-ng, then if you add the two parameters I mentioned earlier to the OPTIONS variable, that should do just what you want. -- |8]