[syslog-ng]΄πΈ΄: [syslog-ng]Can't receive syslog by UDP protocol

wei syslog-ng@lists.balabit.hu
Wed, 8 Dec 2004 08:52:57 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_0173_01C4DD03.50AB23D0
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

You are right!

It is really caused by my firewall setting, I have solved it=20

The conf file has no error.=20

  _____ =20

=B7=A2=BC=FE=C8=CB: syslog-ng-admin@lists.balabit.hu
[mailto:syslog-ng-admin@lists.balabit.hu] =B4=FA=B1=ED Manuel Jo?o S. =
Costa Amaro
=B7=A2=CB=CD=CA=B1=BC=E4: 2004=C4=EA12=D4=C28=C8=D5 5:59
=CA=D5=BC=FE=C8=CB: syslog-ng@lists.balabit.hu
=D6=F7=CC=E2: Re: [syslog-ng]Can't receive syslog by UDP protocol

=20

It works with udp() also.

Maybe your UDP port is closed (firewall ?) ....





Xiaodong Lin wrote:=20

I think you should use the following:

udp(ip(0.0.0.0) port(514));

=20

instead of udp();

=20

Xiaodong

=20

  _____ =20

From: syslog-ng-admin@lists.balabit.hu
[mailto:syslog-ng-admin@lists.balabit.hu] On Behalf Of wei
Sent: Tuesday, December 07, 2004 3:29 AM
To: syslog-ng@lists.balabit.hu
Subject: [syslog-ng]Can't receive syslog by UDP protocol

Greeting!

=20

I have set up my syslog-ng environment by the default syslog-ng.conf =
file.
By the linux default logger command, I can generate syslog to file.=20

But when I use a syslog client send out syslog to the syslog-ng server, =
I
can=A1=AFt receive the log by UDP protocol. But I can get TCP protocol =
syslog.
Could anyone tell me why?

=20

Thanks!

=20

My system is RedHat 9.0. The syslog client is Kiwi Syslog Gen in =
windows.
The following is part of my syslog.conf file:

=20

source src {=20

         pipe("/proc/kmsg");=20

         unix-stream("/dev/log");=20

         internal();=20

         udp();

         tcp(port(5140) keep-alive(yes));=20

};

=20

log {=20

         source(src);=20

         destination(file);=20

};


------=_NextPart_000_0173_01C4DD03.50AB23D0
Content-Type: text/html;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dgb2312">
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:st1=3D"urn:schemas-microsoft-com:office:smarttags" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>

<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags" =
name=3D"chsdate"
 downloadurl=3D""/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:"Times New Roman";
	color:black;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal;
	font-family:Arial;
	color:windowtext;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	layout-grid:15.6pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=3Dwhite lang=3DZH-CN link=3Dblue vlink=3Dpurple>

<div class=3DSection1 style=3D'layout-grid:15.6pt'>

<p class=3DMsoNormal><font size=3D1 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial;color:navy'>You are =
right!<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D1 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial;color:navy'>It is really =
caused by my
firewall setting, I have solved it <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D1 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial;color:navy'>The conf file has =
no
error. <o:p></o:p></span></font></p>

<div>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
color=3Dblack face=3D"Times New Roman"><span lang=3DEN-US =
style=3D'font-size:12.0pt;
color:windowtext'>

<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>

</span></font></div>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><b><font =
size=3D2
color=3Dblack face=3D&#23435;&#20307;><span =
style=3D'font-size:10.0pt;font-family:
SimSun;color:windowtext;font-weight:bold'>=B7=A2=BC=FE=C8=CB<span
lang=3DEN-US>:</span></span></font></b><font size=3D2 color=3Dblack =
face=3D&#23435;&#20307;><span
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:SimSun;color:windowtext'>
syslog-ng-admin@lists.balabit.hu =
[mailto:syslog-ng-admin@lists.balabit.hu] </span></font><b><font
size=3D2 color=3Dblack face=3D&#23435;&#20307;><span =
style=3D'font-size:10.0pt;
font-family:SimSun;color:windowtext;font-weight:bold'>=B4=FA=B1=ED =
</span></font></b><font
size=3D2 color=3Dblack face=3D&#23435;&#20307;><span lang=3DEN-US =
style=3D'font-size:
10.0pt;font-family:SimSun;color:windowtext'>Manuel Jo?o S. Costa =
Amaro<br>
</span></font><b><font size=3D2 color=3Dblack =
face=3D&#23435;&#20307;><span
style=3D'font-size:10.0pt;font-family:SimSun;color:windowtext;font-weight=
:bold'>=B7=A2=CB=CD=CA=B1=BC=E4<span
lang=3DEN-US>:</span></span></font></b><font size=3D2 color=3Dblack =
face=3D&#23435;&#20307;><span
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:SimSun;color:windowtext'> =
<st1:chsdate
IsROCDate=3D"False" IsLunarDate=3D"False" Day=3D"8" Month=3D"12" =
Year=3D"2004" w:st=3D"on">2004<span
 lang=3DEN-US><span lang=3DEN-US>=C4=EA12</span></span><span =
lang=3DEN-US><span
 lang=3DEN-US>=D4=C28</span></span><span lang=3DEN-US><span =
lang=3DEN-US>=C8=D5</span></span></st1:chsdate>
5:59<br>
</span></font><b><font size=3D2 color=3Dblack =
face=3D&#23435;&#20307;><span
style=3D'font-size:10.0pt;font-family:SimSun;color:windowtext;font-weight=
:bold'>=CA=D5=BC=FE=C8=CB<span
lang=3DEN-US>:</span></span></font></b><font size=3D2 color=3Dblack =
face=3D&#23435;&#20307;><span
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:SimSun;color:windowtext'> =
syslog-ng@lists.balabit.hu<br>
</span></font><b><font size=3D2 color=3Dblack =
face=3D&#23435;&#20307;><span
style=3D'font-size:10.0pt;font-family:SimSun;color:windowtext;font-weight=
:bold'>=D6=F7=CC=E2<span
lang=3DEN-US>:</span></span></font></b><font size=3D2 color=3Dblack =
face=3D&#23435;&#20307;><span
lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:SimSun;color:windowtext'> Re:
[syslog-ng]Can't receive syslog by UDP protocol</span></font><font =
size=3D3
color=3Dblack><span lang=3DEN-US =
style=3D'font-size:12.0pt;color:windowtext'><o:p></o:p></span></font></p>=


</div>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D2 color=3Dblack
face=3D"Times New Roman"><span lang=3DEN-US =
style=3D'font-size:10.5pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dblack face=3D"Times New =
Roman"><span
lang=3DEN-US style=3D'font-size:10.0pt'>It works with udp() also.<br>
<br>
Maybe your UDP port is closed (firewall ?) ....<br>
<br>
<br>
<br>
<br>
</span></font><span lang=3DEN-US><br>
Xiaodong Lin wrote: <o:p></o:p></span></p>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D2 color=3Dblue
face=3DArial><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Arial;
color:blue'>I think you should use the following:</span></font><font =
size=3D3><span
lang=3DEN-US style=3D'font-size:12.0pt'><o:p></o:p></span></font></p>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D2 color=3Dblue
face=3DArial><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Arial;
color:blue'>udp(ip(<st1:chsdate IsROCDate=3D"False" =
IsLunarDate=3D"False" Day=3D"30"
Month=3D"12" Year=3D"1899" w:st=3D"on">0.0.0</st1:chsdate>.0) =
port(514));</span></font><font
size=3D3><span lang=3DEN-US =
style=3D'font-size:12.0pt'><o:p></o:p></span></font></p>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D3 color=3Dblack
face=3D"Times New Roman"><span lang=3DEN-US =
style=3D'font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D2 color=3Dblue
face=3DArial><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Arial;
color:blue'>instead of udp();</span></font><font size=3D3><span =
lang=3DEN-US
style=3D'font-size:12.0pt'><o:p></o:p></span></font></p>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D3 color=3Dblack
face=3D"Times New Roman"><span lang=3DEN-US =
style=3D'font-size:12.0pt'>&nbsp;<o:p></o:p></span></font></p>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D2 color=3Dblue
face=3DArial><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Arial;
color:blue'>Xiaodong</span></font><font size=3D3><span lang=3DEN-US
style=3D'font-size:12.0pt'><o:p></o:p></span></font></p>

<p class=3DMsoNormal align=3Dleft style=3D'text-align:left'><font =
size=3D3 color=3Dblack
face=3D"Times New Roman"><span lang=3DEN-US =
style=3D'font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
color=3Dblack face=3D"Times New Roman"><span lang=3DEN-US =
style=3D'font-size:12.0pt'>

<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>

</span></font></div>

<p class=3DMsoNormal align=3Dleft =
style=3D'margin-bottom:12.0pt;text-align:left'><b><font
size=3D2 color=3Dblack face=3DTahoma><span lang=3DEN-US =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font =
size=3D2
face=3DTahoma><span lang=3DEN-US =
style=3D'font-size:10.0pt;font-family:Tahoma'> <a
href=3D"mailto:syslog-ng-admin@lists.balabit.hu">syslog-ng-admin@lists.ba=
labit.hu</a>
[<a =
href=3D"mailto:syslog-ng-admin@lists.balabit.hu">mailto:syslog-ng-admin@l=
ists.balabit.hu</a>]
<b><span style=3D'font-weight:bold'>On Behalf Of </span></b>wei<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Tuesday, December =
07, 2004
3:29 AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> <a
href=3D"mailto:syslog-ng@lists.balabit.hu">syslog-ng@lists.balabit.hu</a>=
<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [syslog-ng]Can't =
receive
syslog by UDP protocol</span></font><font size=3D3><span lang=3DEN-US
style=3D'font-size:12.0pt'><o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>Greeting!<u1:p></u1:p></span>=
</font><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></f=
ont><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>I have set up my syslog-ng
environment by the default syslog-ng.conf file. By the linux default =
logger
command, I can generate syslog to file. <u1:p></u1:p></span></font><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>But when I use a syslog =
client send
out syslog to the syslog-ng server, I can=A1=AFt receive the log by UDP
protocol. But I can get TCP protocol syslog. Could anyone tell me =
why?<u1:p></u1:p></span></font><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></f=
ont><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>Thanks!<u1:p></u1:p></span></=
font><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></f=
ont><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>My system is RedHat 9.0. The =
syslog
client is Kiwi Syslog Gen in windows. The following is part of my =
syslog.conf
file:<u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></f=
ont><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>source src { =
<u1:p></u1:p></span></font><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;
pipe(&quot;/proc/kmsg&quot;); <u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;
unix-stream(&quot;/dev/log&quot;); <u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;
internal(); <u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;
udp();<u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;
tcp(port(5140) keep-alive(yes)); <u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>};<u1:p></u1:p></span></font>=
<span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'><u1:p>&nbsp;</u1:p></span></f=
ont><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>log { =
<u1:p></u1:p></span></font><span
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;
source(src); <u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;
destination(file); <u1:p></u1:p></span></font><span =
lang=3DEN-US><o:p></o:p></span></p>

<p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span =
lang=3DEN-US
style=3D'font-size:9.0pt;font-family:Arial'>};<u1:p></u1:p></span></font>=
<span
lang=3DEN-US><o:p></o:p></span></p>

</div>

</body>

</html>

------=_NextPart_000_0173_01C4DD03.50AB23D0--