Am I an idiot? (tcp destinations)
Okay, perhaps I'm an idiot, but with a freshly downloaded and compiled syslog-ng 1.6.6, I get the following: syslogng.conf (one line long): destination d_tcp { tcp("10.1.2.3") port(1999); localport(999)); }; (which is, you'll notice, copied directly out of the docs) But I get: : [elfchief@bluetail /tmp]% /sbin/syslog-ng --cfgfile=/tmp/syslogng.conf --syntax-only : syntax error at 1 : Parse error reading configuration file, exiting. (line 1) ... and no matter what I put in there (I tried a lot of permutations, and even cut&pasted bits of other people's configs I saw in the mailing list archives), I can't seem to get the option to parse. Am I missing something fundamental here? Given that this is the one feature I'd really like to use syslog-ng for, it'd be nice if I could get it to work! I appreciate any thoughts anyone cares to share... -jay
Jay-- Assuming you have source {}; and log {}; defined in the file elsewhere. As for that line... Are you missing a left parans? I configure it this way: destination remote { tcp ( rem.host.name port (514) ); }; On Tue, 8 Feb 2005 15:35:18 -0800, Jay 'Whip' Grizzard <elfchief-syslogng@lupine.org> wrote:
Okay, perhaps I'm an idiot, but with a freshly downloaded and compiled syslog-ng 1.6.6, I get the following:
syslogng.conf (one line long):
destination d_tcp { tcp("10.1.2.3") port(1999); localport(999)); };
(which is, you'll notice, copied directly out of the docs)
But I get:
: [elfchief@bluetail /tmp]% /sbin/syslog-ng --cfgfile=/tmp/syslogng.conf --syntax-only : syntax error at 1 : Parse error reading configuration file, exiting. (line 1)
... and no matter what I put in there (I tried a lot of permutations, and even cut&pasted bits of other people's configs I saw in the mailing list archives), I can't seem to get the option to parse. Am I missing something fundamental here? Given that this is the one feature I'd really like to use syslog-ng for, it'd be nice if I could get it to work!
I appreciate any thoughts anyone cares to share...
-jay _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
On Tue, Feb 08, 2005 at 07:45:13PM -0600, Dave Johnson wrote:
Jay--
Assuming you have source {}; and log {}; defined in the file elsewhere.
As for that line... Are you missing a left parans?
I configure it this way: destination remote { tcp ( rem.host.name port (514) ); };
Okay, so I typoed on my one example line (had an extra closing parens right after the address), that comes from emailing on a different computer than I'm setting this up. D'oh! The particular config file I was testing for this particular example was /just/ the one destination line and nothing else, under the theory that even if it didn't want to run with no other entries, it'd parse the line and kick out something other than simply 'syntax error'. I was trying to reduce things to the minimum reproducable case, and you can't get more minimum than that! Putting the same thing in a full config file doesn't change anything but the line number of the syntax error, though, and I did just doublecheck to make sure I had matching sections everywhere. So... I'm confused. -jay
On Tue, 8 Feb 2005 15:35:18 -0800, Jay 'Whip' Grizzard <elfchief-syslogng@lupine.org> wrote:
Okay, perhaps I'm an idiot, but with a freshly downloaded and compiled syslog-ng 1.6.6, I get the following:
syslogng.conf (one line long):
destination d_tcp { tcp("10.1.2.3") port(1999); localport(999)); };
(which is, you'll notice, copied directly out of the docs)
But I get:
: [elfchief@bluetail /tmp]% /sbin/syslog-ng --cfgfile=/tmp/syslogng.conf --syntax-only : syntax error at 1 : Parse error reading configuration file, exiting. (line 1)
... and no matter what I put in there (I tried a lot of permutations, and even cut&pasted bits of other people's configs I saw in the mailing list archives), I can't seem to get the option to parse. Am I missing something fundamental here? Given that this is the one feature I'd really like to use syslog-ng for, it'd be nice if I could get it to work!
I appreciate any thoughts anyone cares to share...
-jay _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
Hello Jay, there is a wrong double closing bracket at the localport definition. Jörg On Tue, 8 Feb 2005 15:35:18 -0800 Jay 'Whip' Grizzard <elfchief-syslogng@lupine.org> wrote:
Okay, perhaps I'm an idiot, but with a freshly downloaded and compiled syslog-ng 1.6.6, I get the following:
syslogng.conf (one line long):
destination d_tcp { tcp("10.1.2.3") port(1999); localport(999)); };
(which is, you'll notice, copied directly out of the docs)
But I get:
: [elfchief@bluetail /tmp]% /sbin/syslog-ng --cfgfile=/tmp/syslogng.conf --syntax-only : syntax error at 1 : Parse error reading configuration file, exiting. (line 1)
... and no matter what I put in there (I tried a lot of permutations, and even cut&pasted bits of other people's configs I saw in the mailing list archives), I can't seem to get the option to parse. Am I missing something fundamental here? Given that this is the one feature I'd really like to use syslog-ng for, it'd be nice if I could get it to work!
I appreciate any thoughts anyone cares to share...
-jay _______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html
-- Joerg Michels teamnet GmbH Voice +49 5251 879293 30 Technologiepark 20 Fax +49 5251 879293 99 D-33100 Paderborn EMail michels@teamnet.de
Yeah, I typoed transferring the config line to my mailer. The line as it actually appears in my test config file is: destination d_tcp { tcp("10.1.2.3" port (1999); localport(999)); }; ... which has matching parentheses, and should exactly match the example line given in the documentation. This -should- work, yes? Or does the documentation have a typo as well? -jay
Hello Jay,
there is a wrong double closing bracket at the localport definition.
Okay, perhaps I'm an idiot, but with a freshly downloaded and compiled syslog-ng 1.6.6, I get the following:
syslogng.conf (one line long):
destination d_tcp { tcp("10.1.2.3") port(1999); localport(999)); };
On Wed, 2005-02-09 at 10:08 -0800, Jay 'Whip' Grizzard wrote:
Yeah, I typoed transferring the config line to my mailer.
The line as it actually appears in my test config file is:
destination d_tcp { tcp("10.1.2.3" port (1999); localport(999)); };
... which has matching parentheses, and should exactly match the example line given in the documentation. This -should- work, yes? Or does the documentation have a typo as well?
As I already said the semicolon after port() should not be there, I've also fixed the docs. -- Bazsi
On Tue, 2005-02-08 at 15:35 -0800, Jay 'Whip' Grizzard wrote:
Okay, perhaps I'm an idiot, but with a freshly downloaded and compiled syslog-ng 1.6.6, I get the following:
syslogng.conf (one line long):
destination d_tcp { tcp("10.1.2.3") port(1999); localport(999)); };
(which is, you'll notice, copied directly out of the docs)
apart from the wrong pairing of parens, the ';' is at the wrong place there. I fixed the documentation, it should be something like: destination d_tcp { tcp("10.1.2.3" port(1999) localport(999)); }; syslog-ng parses the line above just fine. (note that localport() does not usually need to be specified unless you want syslog-ng to bind to a fixed port when sending messages) -- Bazsi
participants (4)
-
Balazs Scheidler
-
Dave Johnson
-
Jay 'Whip' Grizzard
-
Joerg Michels