You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by vikram prajapati <pr...@hotmail.com> on 2011/01/13 17:22:44 UTC

Re: java.net.BindException: Cannot assign requested address


Gary Dusbabek <gdusbabek <at> gmail.com> writes:

> 
> On Tue, Nov 3, 2009 at 15:44,  <mobiledreamers <at> gmail.com> wrote:
> > ERROR - Exception encountered during startup.
> > java.net.BindException: Cannot assign requested address
> >     at sun.nio.ch.Net.bind(Native Method)
> >     at
> > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
> >     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
> >     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
> >     at
> 
> You will see that error if <StoragePort> is being used by other system
> processes.  Try using a different port.  If you're using a unixy
> system, you can get a good idea if the port is in use from netstat:
> 
> E.g. see if port 7000 is being listened on:
> 
> netstat -an | grep 7000
> 
> Cheers,
> 
> Gary.
> 
> 
I am using 0.6.9 version. I am able to run it successfully on my windows 
machine. On ubuntu I get Cannot assign requested address error. I checked 
whether storage port (7000) and thriftport(9160) is being used by running the 
command u mentioned. They are not being used. I even tried using different ports 
but am getting same error. I also tried putting 0.0.0.0 in Thrift Address.








RE: java.net.BindException: Cannot assign requested address

Posted by "raoyixuan (Shandy)" <ra...@huawei.com>.
It's ip address problem, whether you ip address had changed? Please confirm it and restart the Cassandra.

-----Original Message-----
From: vikram prajapati [mailto:prajapativikram@hotmail.com] 
Sent: Friday, January 14, 2011 12:23 AM
To: user@cassandra.apache.org
Subject: Re: java.net.BindException: Cannot assign requested address



Gary Dusbabek <gdusbabek <at> gmail.com> writes:

> 
> On Tue, Nov 3, 2009 at 15:44,  <mobiledreamers <at> gmail.com> wrote:
> > ERROR - Exception encountered during startup.
> > java.net.BindException: Cannot assign requested address
> >     at sun.nio.ch.Net.bind(Native Method)
> >     at
> > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
> >     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
> >     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
> >     at
> 
> You will see that error if <StoragePort> is being used by other system
> processes.  Try using a different port.  If you're using a unixy
> system, you can get a good idea if the port is in use from netstat:
> 
> E.g. see if port 7000 is being listened on:
> 
> netstat -an | grep 7000
> 
> Cheers,
> 
> Gary.
> 
> 
I am using 0.6.9 version. I am able to run it successfully on my windows 
machine. On ubuntu I get Cannot assign requested address error. I checked 
whether storage port (7000) and thriftport(9160) is being used by running the 
command u mentioned. They are not being used. I even tried using different ports 
but am getting same error. I also tried putting 0.0.0.0 in Thrift Address.








Re: java.net.BindException: Cannot assign requested address

Posted by Aaron Morton <aa...@thelastpickle.com>.
Can you post the settings you have for 
- listen_address
- storage_port
- rpc_address
- rpc_port

Also the full error stack again, your original email has dropped off. can you use cassanra 0.7 ? 

Aaron


On 14 Jan, 2011,at 05:22 AM, vikram prajapati <pr...@hotmail.com> wrote:



ERROR 11:33:56,246 Exception encountered during startup.
java.io.IOException: Unable to create thrift socket to /10.00.1:9160
        at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:73)
        at org.apache.cassandra.service.AbstractCassandraDaemon.activate(AbstractCassandraDaemon.java:217)
        at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:134)
Caused by: org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address /10.0.0.1:9160.
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:99)
        at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:85)
        at org.apache.cassandra.thrift.TCustomServerSocket.<init>(TCustomServerSocket.java:59)
        at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:66)
Gary Dusbabek <gdusbabek <at> gmail.com> writes:

> 
> On Tue, Nov 3, 2009 at 15:44, <mobiledreamers <at> gmail.com> wrote:
> > ERROR - Exception encountered during startup.
> > java.net.BindException: Cannot assign requested address
> >     at sun.nio.chNet.bind(Native Method)
> >     at
> > sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
> >     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
> >     at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
> >     at
> 
> You will see that error if <StoragePort> is being used by other system
> processes. Try using a different port. If you're using a unixy
> system, you can get a good idea if the port is in use from netstat:
> 
> E.g. see if port 7000 is being listened on:
> 
> netstat -an | grep 7000
> 
> Cheers,
> 
> Gary.
> 
> 
I am using 0.6.9 version. I am able to run it successfully on my windows 
machine. On ubuntu I get Cannot assign requested address error. I checked 
whether storage port (7000) and thriftport(9160) is being used by running the 
command u mentioned. They are not being used. I even tried using different ports 
but am getting same error. I also tried putting 0.0.0.0 in Thrift Address.