<div dir="ltr"><div>Hi,<br><br></div>syslog-ng-ctl requires the same control file that you supplied to the 2nd syslog-ng instance, so this should work:<br><div><div><br>$ syslog-ng-ctl --control=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.ctl<br><br></div><div>If it started up, it should work though. Can you start syslog-ng in the foreground (-F) and request debug logs using -de, so it should look like this:<br><br>$ syslog-ng -Fed --cfgfile=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.conf --persist-file=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.persist --pidfile=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.pid --control=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.ctl<br><br></div><div>This should display a couple of debugging messages during startup and also whenever a message is received. You might find a clue there.<br></div><div><br></div><div>Also, this may or may not have a relation to the problem you are seeing, but 3.3.4 is pretty old, probably more than 5 years old. Our current version is 3.7.3.<br></div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <br>Bazsi<br></div></div></div>
<br><div class="gmail_quote">On Wed, Jun 29, 2016 at 3:33 PM, David Campeau <span dir="ltr"><<a href="mailto:David.Campeau@tn.gov" target="_blank">David.Campeau@tn.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm not sure of the syntax needed to connect to the socket or how to prepare the system.<br>
<br>
Below is just a blind attempt to connect to a socket. The 2nd instance of syslog-ng is running and listening on port 518.<br>
<br>
I created a directory under /run called "syslog-ng-Second-Instance" and tried to connect... However Connection is refused.<br>
<br>
Command Used:<br>
root@syslog-ng:# syslog-ng-ctl verbose --set=on --control=/run/syslog-ng-Second-Instance<br>
Error connecting control socket, socket='/run/syslog-ng-Second-Instance', error='Connection refused'<br>
<br>
<br>
Any thoughts on the correct syntax and preparation needed?<br>
<span class="im HOEnZb"><br>
<br>
Best Regards,<br>
<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:jrhendri@roadrunner.com">jrhendri@roadrunner.com</a> [mailto:<a href="mailto:jrhendri@roadrunner.com">jrhendri@roadrunner.com</a>]<br>
</span><div class="HOEnZb"><div class="h5">Sent: Tuesday, June 28, 2016 3:00 PM<br>
To: Syslog-ng users' and developers' mailing list; David Campeau<br>
Subject: RE: [syslog-ng] Syslog-ng Multiple Instances<br>
<br>
Maybe this?<br>
<br>
If you need to use a non-standard control socket to access syslog-ng,<br>
use the syslog-ng-ctl <command> --set=on --control=<socket> command to<br>
specify the socket to use.<br>
<br>
<br>
<br>
---- David Campeau <<a href="mailto:David.Campeau@tn.gov">David.Campeau@tn.gov</a>> wrote:<br>
> Jim,<br>
><br>
> No errors as the instance starts normally and listens on port 518. However, no logs are received or forwarded.<br>
><br>
> root@syslog-ng1:/usr/local/bin/syslog-ng-Second-Instance# netstat -an |grep 518<br>
> udp 0 0 <a href="http://0.0.0.0:518" rel="noreferrer" target="_blank">0.0.0.0:518</a> 0.0.0.0:*<br>
><br>
> The test device is on the same subnet as syslog-ng listening on port 518, so there aren't any firewall issues. I've verified the test device is configured for port 518.<br>
><br>
> However, when I check ctl stats, it's seeing the stats of the production syslog-ng instance. So, it appears this is improperly configured, but it's unknown what needs to be changed.<br>
><br>
> Best Regards,<br>
><br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:jrhendri@roadrunner.com">jrhendri@roadrunner.com</a> [mailto:<a href="mailto:jrhendri@roadrunner.com">jrhendri@roadrunner.com</a>]<br>
> Sent: Tuesday, June 28, 2016 12:53 PM<br>
> To: Syslog-ng users' and developers' mailing list<br>
> Cc: David Campeau<br>
> Subject: Re: [syslog-ng] Syslog-ng Multiple Instances<br>
><br>
> The only thing that would limit the number of instances that I am aware of are conflicts for opening things like network ports, connections to databases, maybe FIFOs, etc.<br>
><br>
> I would look at that as a place to start.<br>
><br>
> What kind of errors are you getting when you try to start the second instance?<br>
><br>
> Jim<br>
><br>
> ---- David Campeau <<a href="mailto:David.Campeau@tn.gov">David.Campeau@tn.gov</a>> wrote:<br>
> > Hello,<br>
> ><br>
> > I've been using syslog-ng to filter syslog before forwarding on to a log collector. However, I need to spin up a second instance for testing purposes. I've found a little bit of information on-line, but it hasn't completed the entire picture.<br>
> ><br>
> > This is the command used to start up the 2nd instance. I'm pointing to separate .conf .persist .pid and .ctl files -- However, it's still not working. I suspect the issue is due to OS log sources. How do a change log sources?<br>
> ><br>
> > syslog-ng --cfgfile=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.conf --persist-file=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.persist --pidfile=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.pid --control=/usr/local/bin/syslog-ng-Second-Instance/syslog-ng.ctl &<br>
> ><br>
> > This is the upper part of the syslog-ng.conf file for the 2nd instance I wish to run.<br>
> ><br>
> > @version: 3.3.4<br>
> > @include "scl.conf"<br>
> > options {<br>
> > time-reap(30);<br>
> > mark-freq(10);<br>
> > keep-hostname(yes);<br>
> > chain-hostnames(no);<br>
> > use-dns(no);<br>
> > ## log-fifo-size(500000); ## Tuning Options<br>
> > ## flush_lines(10000); ## Tuning Options<br>
> > ## flush_timeout(10000); ## Tuning Options<br>
> > };<br>
> ><br>
> > source s_second_instance {<br>
> > syslog(transport("udp") port("518")); #### Will receive test syslog on port 518<br>
> > };<br>
> ><br>
> > destination d_syslog_udp {<br>
> > syslog("10.X.X.X"<br>
> > transport("udp")<br>
> > port("514")<br>
> > throttle(4000)<br>
> > );<br>
> > };<br>
> ><br>
> ><br>
> ><br>
> > I'm hoping someone has experience or has seen information on how to run a 2nd instance on the same box.<br>
> ><br>
> > Best Regards,<br>
> ><br>
> > David<br>
><br>
<br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</div></div></blockquote></div><br></div>