<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">You can add the option<br>
<br>
--control=/your/location/syslog-ng.ctl<br>
<br>
to the syslog-ng instance, and add the same option to the
syslog-ng-ctl program.<br>
<br>
Be sure that the user you run syslog-ng as has write permission in
the directory /usr/location<br>
<br>
Evan.<br>
<br>
On 04/15/2015 08:54 AM, Andrew Bell wrote:<br>
</div>
<blockquote
cite="mid:3CCBAB7590B2EF43B677C64CC9C2C757AB97E7@EXCHMBOXA02.pc.factset.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Hello,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Wondering if someone can help me with an
issue that I am currently having. I am running syslog-ng as a
local non-root user (I have it installed to a local instance
under my home directory) and am trying to use the
syslog-ng-ctl program in order to diagnose why certain log
files are not passing through syslog-ng to their log
destination (trying to rule out if it is a problem with the
location where the logs originate OR if there is an issue with
the syslog-ng setup and it is dropping or otherwise failing to
forward those incoming logs). However, when I try to run
syslog-ng-ctl under my local account I get the following
error, where it appears to reference a control socket that is
located in a directory that is owned and operated by the root
account (I should note that I am unable to sudo as root with
my setup on the system). <o:p>
</o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><i>/home/abell/syslog-ng-install/opt/syslog-ng/sbin$
./syslog-ng-ctl verbose<o:p></o:p></i></p>
<p class="MsoNormal"><i>Error connecting control socket,
socket='/opt/syslog-ng/var/run/syslog-ng.ctl', error='No
such file or directory'<o:p></o:p></i></p>
<p class="MsoNormal">This type of error above is also appearing
when I run syslog-ng program itself with the debug (‘-d –v’)
options set<o:p></o:p></p>
<p class="MsoNormal"><i>Error opening control socket, bind()
failed; socket='/opt/syslog-ng/var/run/syslog-ng.ctl',
error='No such file or directory (2)'<o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I did some searching online and did find
some manuals on syslog-ng-ctl that said I could specify a
different directory where the control socket resides to one
that isn’t in the root directory using the “-c” flag. This
mailing list post also mentioned that running a local instance
of syslog-ng-ctl should automatically create a local instance
of the control socket file located in the /var directory where
the local instance resides (so in my case, I imagine it would
be /home/abell/syslog-ng-install/var ???). Here’s the
reference link -> <a moz-do-not-send="true"
href="https://lists.balabit.hu/pipermail/syslog-ng/2009-June/013027.html">https://lists.balabit.hu/pipermail/syslog-ng/2009-June/013027.html</a>
- there weren’t any next messages to this thread so it is
difficult to tell if this solution worked for the original
author here or not…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So I created that “/var” directory as he
suggested but I still don’t see the .ctl file created when I
go to stop and restart syslog-ng … and so I don’t really have
anything to specify for the “-c” option as an alternative. I
tried touching the control socket file in that directory as a
zero byte file, but still nothing<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><i>/home/abell/syslog-ng-install/opt/syslog-ng/var$
touch syslog-ng.ctl<o:p></o:p></i></p>
<p class="MsoNormal"><i>/home/abell/syslog-ng-install/opt/syslog-ng/var$
cd ..<o:p></o:p></i></p>
<p class="MsoNormal"><i>/home/abell/syslog-ng-install/opt/syslog-ng$
cd sbin<o:p></o:p></i></p>
<p class="MsoNormal"><i>/home/abell/syslog-ng-install/opt/syslog-ng/sbin$
./syslog-ng-ctl verbose --set=on -c
/home/abell/syslog-ng-install/opt/syslog-ng/var/syslog-ng.ctl<o:p></o:p></i></p>
<p class="MsoNormal"><i>Error connecting control socket,
socket='/home/abell/syslog-ng-install/opt/syslog-ng/var/syslog-ng.ctl',
error='Connection refused'<o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any ideas as to how I can get this control
socket file created on my local syslog-ng – or if I can tell
syslog-ng itself to specify spinning up the control socket
file itself in a different location than the root one? I’d
really like to be able to use this tool to figure out what is
going on with my syslog-ng setup. Let me know if there’s any
other details or information that I can provide.
<o:p></o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Andrew<o:p></o:p></p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">______________________________________________________________________________
Member info: <a class="moz-txt-link-freetext" href="https://lists.balabit.hu/mailman/listinfo/syslog-ng">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a class="moz-txt-link-freetext" href="http://www.balabit.com/support/documentation/?product=syslog-ng">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a class="moz-txt-link-freetext" href="http://www.balabit.com/wiki/syslog-ng-faq">http://www.balabit.com/wiki/syslog-ng-faq</a>
</pre>
</blockquote>
<br>
<br>
</body>
</html>