LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-23-2009, 01:34 PM   #1
WhiskeyTangoFoxtrot
Member
 
Registered: Oct 2005
Location: Windsor, Ontario, Canada
Distribution: Fedora Core 5,4,3 & Ubuntu 6.06, 8.10
Posts: 403
Blog Entries: 1

Rep: Reputation: 30
Mesh networking issue "Can't bind send socket: address already in use"


G'day

I am currently trying to get a B.A.T.M.A.N mesh network up and running. the thing uses UDP port 4305 for broadcasting to nearby nodes and it seems this port is closed or used by something else.

now i have tried to open this port with commands like
Code:
iptables -A INPUT -p udp --dport 4305 -j ACCEPT
iptables -A OUTPUT -p udp --dport 4305 -j ACCEPT
it still gives me the same error saying the socket cannot connect.any way for me to scan that udp port, see what is blocking it and open the thing up ?

thanks.
 
Old 02-23-2009, 02:11 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Run any of the following commands:
Code:
netstat -unapl|grep 4305
fuser -v -n udp 4305
to find what's listening on that port.

Regards
 
Old 02-23-2009, 02:21 PM   #3
WhiskeyTangoFoxtrot
Member
 
Registered: Oct 2005
Location: Windsor, Ontario, Canada
Distribution: Fedora Core 5,4,3 & Ubuntu 6.06, 8.10
Posts: 403

Original Poster
Blog Entries: 1

Rep: Reputation: 30
thanks for the quick reply.

interesting result, netstat says the only 2 things listening are batmand, the BATMAN daemon which does the mesh networking. using fuser shows no output.

Quote:
udp 0 0 192.168.10.255:4305 0.0.0.0:* 3470/batmand
udp 0 0 192.168.10.10:4305 0.0.0.0:* 3470/batmand
is it possible the two are interfering with each other ? heres an extract of what happens when i try to tell BATMAN to scan for neighboring nodes
Quote:
root@fit-4:/home/fit# batmand -d 1 wlan0
Deleting default route via unknown (table 67)
Deleting default route via unknown (table 67)
Error - can't bind send socket: Address already in use
Interface deactivated: wlan0
Not using interface wlan0 (retrying later): interface not active
B.A.T.M.A.N. 0.3.1 (compatibility version 5)
debug level: 1
BOD
Originator (#/255) Nexthop [outgoingIF]: Potential nexthops ... [B.A.T.M.A.N. 0.3.1, MainIF/IP: wlan0/192.168.10.10, UT: 0d 0h 0m]
No batman nodes in range ...
EOD
BOD
Originator (#/255) Nexthop [outgoingIF]: Potential nexthops ... [B.A.T.M.A.N. 0.3.1, MainIF/IP: wlan0/192.168.10.10, UT: 0d 0h 0m]
No batman nodes in range ...
EOD
and it goes on.

Last edited by WhiskeyTangoFoxtrot; 02-23-2009 at 02:24 PM.
 
Old 02-23-2009, 04:55 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I don't know how batman works, but you can try to stop/kill batmand before running the "batmand -d 1 wlan0" command. This way when you run the above command it will not complain and will start listening on udp port 4305. The batmand pid is 3470, thus you can also use:
Code:
kill -9 3470
 
Old 02-24-2009, 10:38 AM   #5
WhiskeyTangoFoxtrot
Member
 
Registered: Oct 2005
Location: Windsor, Ontario, Canada
Distribution: Fedora Core 5,4,3 & Ubuntu 6.06, 8.10
Posts: 403

Original Poster
Blog Entries: 1

Rep: Reputation: 30
interesting suggestion bathory, it doesnt seem to give me the socket error anymore when I try scanning for nearby mesh nodes. will get to the lab ASAP and test it out with the other nodes and post back on results.

thanks again.

Update:Success. Thanks to both of you guys.What i needed was :

netstat -unapl|grep 4305

based on the output i simply did:

kill -9 <whatever number was given by prev step>

Last edited by WhiskeyTangoFoxtrot; 03-03-2009 at 01:28 PM.
 
  


Reply



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
dhcpd error "Can't bind to dhcp address" msjenkins Linux - Networking 4 10-06-2010 05:16 PM
"unable to bind socket - Address already in use" engineerwell Linux - General 7 05-12-2010 02:46 AM
Buzilla issue: "Can't connect to local MySQL server through socket '/tmp/mysql.sock'" vitopn Linux - General 3 05-21-2007 10:13 AM
bind error on high ports "address already in use" DCalabrese Linux - Networking 2 05-25-2005 09:21 AM
Quagga "Can't bind socket: Invalid argument" JJX Linux - Networking 0 04-29-2004 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:53 AM.

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
Open Source Consulting | Domain Registration