LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 12-02-2011, 08:10 AM   #1
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 207
Blog Entries: 3

Rep: Reputation: 16
Lightbulb SYSLOG-NG ERROR "error='Address already in use (98)"


Hi All,

Please resolve this Problem
This is a rhel 5.5-64bit machine in which this is the configuration
IN other server i have done same config but this one stuck at this level.
\\[root@dk log]syslog-ng -f /etc/syslog-ng/syslog-ng.conf
Error binding socket; addr='AF_INET(0.0.0.0:514)', error='Address already in use (98)'
Error initializing source driver; source='tcpgateway'
\\[root@dk log]# cat /etc/syslog-ng/syslog-ng.conf
options {
create_dirs(no);dns_cache(yes);use_fqdn(no);keep_hostname(yes);
long_hostnames(no); use_dns(yes);
};

source gateway {

unix-stream("/dev/log");
internal();
udp(ip(0.0.0.0) port(514));
};
source tcpgateway {
unix-stream("/dev/log");
internal();
tcp (ip(0.0.0.0) port(514) max_connections(1000));
};

destination d_int
{
file("/var/log/localhost/$YEAR/$MONTH/$DAY/messages.log" \
owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));
};

destination d_ext
{
file("/var/log/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.log" \
owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));

# This seperated by severity too.
# file("/var/log/$HOST/$YEAR/$MONTH/$DAY/$FACILITY-$PRIORITY.log" \
# owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));
};

log {

source(gateway); destination (d_int);
};
log {
source(tcpgateway); destination (d_ext);
};
[root@dk log]#

Quote:
[root@dk log]# service syslog-ng restart
Stopping syslog-ng: [ OK ]
Starting syslog-ng: \\ [ OK ]
[root@dk log]#

[root@dk ~]# lsof -i
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
portmap 2772 rpc 3u IPv4 8451 UDP *:sunrpc
portmap 2772 rpc 4u IPv4 8452 TCP *:sunrpc (LISTEN)
rpc.statd 2804 root 3u IPv4 8636 UDP *:863
rpc.statd 2804 root 6u IPv4 8552 UDP *:iscsi
rpc.statd 2804 root 7u IPv4 8639 TCP *:866 (LISTEN)
hpiod 3016 root 0u IPv4 10803 TCP dk.pant.com:2208 (LISTEN)
python 3021 root 4u IPv4 10821 TCP dk.pant.com:2207 (LISTEN)
sshd 3034 root 3u IPv6 10857 TCP *:ssh (LISTEN)
cupsd 3043 root 4u IPv4 10892 TCP dk.pant.com:ipp (LISTEN)
cupsd 3043 root 6u IPv4 10895 UDP *:ipp
sendmail 3075 root 4u IPv4 11009 TCP dk.pant.com:smtp (LISTEN)
avahi-dae 3178 avahi 13u IPv4 11280 UDP *:mdns
avahi-dae 3178 avahi 14u IPv6 11281 UDP *:mdns
avahi-dae 3178 avahi 15u IPv4 11282 UDP *:48134
avahi-dae 3178 avahi 16u IPv6 11283 UDP *:53916
sshd 3378 root 3u IPv6 12227 TCP dk.pant.com:ssh->192.168.0.1:50651 (ESTABLISHED)
Quote:
syslog-ng 3981 root 4u IPv4 14128 UDP *:syslog
syslog-ng 3981 root 6u IPv4 14131 TCP *:shell (LISTEN)
[root@dk ~]#

Last edited by pantdk; 12-02-2011 at 08:46 AM.
 
Old 12-02-2011, 11:05 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
so syslog-ng is very clearly already running. so restart it with the service script instead of just running the daemon directly.
 
Old 12-02-2011, 10:01 PM   #3
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 207
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Hi acid_kewpie,
Thanks for reply

But what is this error

Quote:
[root@dk ~]# syslog-ng
Error binding socket; addr='AF_INET(0.0.0.0:514)', error='Address already in use (98)'
Error initializing source driver; source='tcpgateway'
Quote:
\\[root@dk ~] syslog-ng -f /etc/syslog-ng/syslog-ng.conf
Error binding socket; addr='AF_INET(0.0.0.0:514)', error='Address already in use (98)'
Error initializing source driver; source='tcpgateway'
\\[root@dk ~]#

my localhost log is been created as per define but not received the client logs
i have disable the iptables,selinux in both end
 
Old 12-03-2011, 03:03 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
the error is clearly that something is already running, i.e. syslog-ng. What's to not understand?
 
Old 12-03-2011, 03:15 AM   #5
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 207
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Hi acid_kewpie,

Now i got your point about the client script but i want just clearly few confusions if u can.
udp broadcast but tcp don't so if i remove the tcp entry from the the syslog-ng.conf in server then i didn't need of that script which is to been config at client end. we just mention
Quote:
'*.* @syslog-ng_server_name or ip"
but when we mention tcp then we have also define the ip of server in client with that scrip
so it is essential that tcp entry is required at that config in syslog-ng server

Last edited by pantdk; 12-04-2011 at 03:12 AM.
 
Old 12-04-2011, 11:22 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Sorry, I don't understand what you are asking here.
 
Old 12-04-2011, 12:29 PM   #7
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
Going back to the beginning: is rshd listening on your system on port 514 too? Hence rshd must be turned off (or use another port) or you need to use another port for syslog-ng using TCP.
 
Old 12-04-2011, 12:51 PM   #8
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 207
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Hi acid_kewpie,

sorry if u didn't understand but i will try to explain you & suggest, is it right or wrong
UDP works on broadcast
TCP didn't work on broadcast

in my configuration

Quote:
source tcpgateway {
unix-stream("/dev/log");
internal();
tcp (ip(0.0.0.0) port(514) max_connections(1000));
};
Quote:
destination d_ext
{
file("/var/log/$HOST/$YEAR/$MONTH/$DAY/$FACILITY.log" \
owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));
Quote:
log {
source(tcpgateway); destination (d_ext);
};
all these entry define the tcp,on that port with number of connection & how the logs are made .if we remove these entries from the servers then it will works on UDP

so at that time we didn't required any tcp entry at client side.Only one entry "*.* @Server_IP_or IP" required at the end of client server in syslog.conf


but if we define TCP then need some config at client end & we need syslog-ng-client Package to install at client with tcp & udp entries

So my question is that it is essential that tcp entry is required at that config in syslog-ng server

Last edited by pantdk; 12-04-2011 at 06:07 PM.
 
Old 12-04-2011, 01:09 PM   #9
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 207
Blog Entries: 3

Original Poster
Rep: Reputation: 16
Hi Reuti,

Thanks for reply

o ok rshd 514 port
but when i changed my TCP port from 514 to 51400 at that time received same error with that port 51400 number

But i did change in config & that's works for me. In my configuration i didn't change my port of TCP & UDP 514.

destination localhost {

file("/var/log/$HOST/$YEAR/$MONTH/$DAY/messages.log" \
owner(root) group(root) perm(0600) dir_perm(0700) create_dirs(yes));
};

in my previous conf their is "localhost" i just change it into HOST

Last edited by pantdk; 12-04-2011 at 06:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sendmail Error - Rejected after DATA: could not verify "From:" header address" soslinux Linux - Server 2 07-22-2010 08:09 AM
glibc2.3.4 make, produces error "memcmp... file address 68" tgp1994 Linux - Software 5 11-28-2009 09:51 AM
error: Error for wireless request "Set Mode" (8B06) : invalid argument "roaming" penguin chick Linux - Wireless Networking 5 08-22-2008 02:16 PM
Regular expression matching , match "error string" but not "other error" jmcmillan Programming 3 07-07-2008 10:50 AM
"ERROR: UDP_OpenSocket: bind: Cannot assign requested address" error trebor0926 Red Hat 1 09-26-2006 11:21 AM


All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration