LinuxQuestions.org
Review your favorite Linux distribution.
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 11-22-2015, 11:00 PM   #1
beginner1
LQ Newbie
 
Registered: Nov 2015
Posts: 7

Rep: Reputation: Disabled
failed to bin port


I'm new to Ubuntu 12.04 LTS and using it via VMware

My problem is to bind port 6703

Failed to bind to: 0.0.0.0/0.0.0.0:6703

this port that i should use it in my program called storm and it's open source has a config file i set this port in the file

i checked the port and found that it has listen to my process already !! however i got this error message !!

i tried another ports and got same error !
 
Old 11-23-2015, 12:38 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
There are several possible error conditions. Check errno, and read the man page http://linux.die.net/man/2/bind.
 
Old 11-23-2015, 12:54 AM   #3
beginner1
LQ Newbie
 
Registered: Nov 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
thanks for replying the message i got
of server mk-worker
org.apache.storm.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:6710
at org.apache.storm.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[storm-core-0.9.5.jar:0.9.5]
at backtype.storm.messaging.netty.Server.<init>(Server.java:130) ~[storm-core-0.9.5.jar:0.9.5]
at backtype.storm.messaging.netty.Context.bind(Context.java:75) ~[storm-core-0.9.5.jar:0.9.5]
at backtype.storm.messaging.loader$launch_receive_thread_BANG_.doInvoke(loader.clj:68) ~[storm-core-0.9.5.jar:0.9.5]
at clojure.lang.RestFn.invoke(RestFn.java:668) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$launch_receive_thread.invoke(worker.clj:378) ~[storm-core-0.9.5.jar:0.9.5]
at backtype.storm.daemon.worker$fn__6959$exec_fn__1103__auto____6960.invoke(worker.clj:413) ~[storm-core-0.9.5.jar:0.9.5]
at clojure.lang.AFn.applyToHelper(AFn.java:185) [clojure-1.5.1.jar:na]
at clojure.lang.AFn.applyTo(AFn.java:151) [clojure-1.5.1.jar:na]
at clojure.core$apply.invoke(core.clj:617) ~[clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$fn__6959$mk_worker__7015.doInvoke(worker.clj:391) [storm-core-0.9.5.jar:0.9.5]
at clojure.lang.RestFn.invoke(RestFn.java:512) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$_main.invoke(worker.clj:502) [storm-core-0.9.5.jar:0.9.5]
at clojure.lang.AFn.applyToHelper(AFn.java:172) [clojure-1.5.1.jar:na]
at clojure.lang.AFn.applyTo(AFn.java:151) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker.main(Unknown Source) [storm-core-0.9.5.jar:0.9.5]
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method) ~[na:1.6.0_38]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:124) ~[na:1.6.0_38]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) ~[na:1.6.0_38]
at org.apache.storm.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193) ~[storm-core-0.9.5.jar:0.9.5]
at org.apache.storm.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.j ava:372) ~[storm-core-0.9.5.jar:0.9.5]
at org.apache.storm.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) ~[storm-core-0.9.5.jar:0.9.5]
at org.apache.storm.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42) ~[storm-core-0.9.5.jar:0.9.5]
at org.apache.storm.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[storm-core-0.9.5.jar:0.9.5]
at org.apache.storm.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[storm-core-0.9.5.jar:0.9.5]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) ~[na:1.6.0_38]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) ~[na:1.6.0_38]
at java.lang.Thread.run(Thread.java:662) ~[na:1.6.0_38]
2015-11-19T02:09:33.239+0200 b.s.util [ERROR] Halting process: ("Error on initialization")
java.lang.RuntimeException: ("Error on initialization")
at backtype.storm.util$exit_process_BANG_.doInvoke(util.clj:325) [storm-core-0.9.5.jar:0.9.5]
at clojure.lang.RestFn.invoke(RestFn.java:423) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$fn__6959$mk_worker__7015.doInvoke(worker.clj:391) [storm-core-0.9.5.jar:0.9.5]
at clojure.lang.RestFn.invoke(RestFn.java:512) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$_main.invoke(worker.clj:502) [storm-core-0.9.5.jar:0.9.5]
at clojure.lang.AFn.applyToHelper(AFn.java:172) [clojure-1.5.1.jar:na]
at clojure.lang.AFn.applyTo(AFn.java:151) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker.main(Unknown Source) [storm-core-0.9.5.jar:0.9.5]

i checked the link but didn't get what should i do ?
 
Old 11-23-2015, 03:13 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I didn't know it was a Java program. The man page tells you what to do when you program in C, that is, you check the value of errno. I guess there are ways to do the same in Java, but I wouldn't know.

Address already in use is quite clear - a port can be bound only once at a time, and some other process (or the same process) has bound a socket to this port already. If you don't know which process that is, you can use one of these commands to find out:
Code:
lsof -i :6703 
ss -lntp | grep 6703 
netstat -lntp | grep 6703
 
Old 11-24-2015, 06:06 PM   #5
beginner1
LQ Newbie
 
Registered: Nov 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I didn't know it was a Java program. The man page tells you what to do when you program in C, that is, you check the value of errno. I guess there are ways to do the same in Java, but I wouldn't know.

Address already in use is quite clear - a port can be bound only once at a time, and some other process (or the same process) has bound a socket to this port already. If you don't know which process that is, you can use one of these commands to find out:
Code:
lsof -i :6703 
ss -lntp | grep 6703 
netstat -lntp | grep 6703
i read that "already in use " and got what you pointed to >>>> and used this command

lsof -i :6703 before running my process and got nothing then
used same command after running process and got that it listening to java process , i guess that mine java process
i'm wondering what is that problem really and where "already in use " then !!

there is another problem , i was using old version of the program "storm" and when need to upgrade it , i just delete folder of the old version from the directory ! i knew after that ,, that is wrong way to delete , but i noticed that every time i run new version with the port 6703 , empty old version created !! is it possible that it using port !!

Last edited by beginner1; 11-24-2015 at 06:37 PM.
 
Old 11-24-2015, 06:30 PM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by beginner1 View Post
i read that "already in use " and got what you pointed to >>>> and used this command

lsof -i :6703 before running my process and got nothing then
used same command after running process and got that it listening to java process , i guess that mine java process
i'm wondering what is that problem really and where "already in use " then !!
I'd say your program successfully binds to this port, then tries to bind again and fails.
 
Old 11-24-2015, 06:40 PM   #7
beginner1
LQ Newbie
 
Registered: Nov 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
I'd say your program successfully binds to this port, then tries to bind again and fails.
yes that's right , but can you read my edit reply i guess that is the cause !
 
  


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] Failed to load firmware "radeon/R700_rlc.bin nicksmaddog Linux From Scratch 3 02-20-2012 11:04 AM
Warning: remote port forwarding failed for listen port 7869 windstory Linux - Newbie 1 08-02-2010 10:07 AM
setting /bin/hostname [failed] tulsi Linux - Networking 6 11-29-2009 06:36 AM
Failed to chck remot comnd executin using shells /usr/bin/ssh and /usr/bin/rsh farnaw4u Linux - Software 2 04-06-2009 12:08 AM
BEGIN failed--compilation aborted at /usr/bin/autom4te cramerdy Linux - Software 0 05-30-2008 12:40 AM

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

All times are GMT -5. The time now is 02:16 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
Open Source Consulting | Domain Registration