Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

ajain07 avatar image
ajain07 asked ·

Cannot start DSE on DS220 Academy course VM

Not able to start cassandra instance for the DS220 Lab VM.

Getting the following error:

INFO [main] 2020-05-17 12:40:50,175 RemoteMessageServer.java:76 - Starting internode-messaging internal message server on [/10.0.2.15]:8609
ERROR [main] 2020-05-17 12:40:50,368 CassandraDaemon.java:809 - Exception encountered during startup
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128)
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:554)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1258)
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501)
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486)
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:980)
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:250)
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:365)
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
        at java.lang.Thread.run(Thread.java:748)
academyds220
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@ajain07 The DSE instance on the VM is unable to start because it cannot bind the process to the IP 10.0.2.15. This is the reason you're getting the startup error which looks like this:

ERROR [main] 2020-05-18 03:55:29,965  CassandraDaemon.java:809 - Exception encountered during startup
java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128)
        ...

Cause

The error above is due to the configuration of DSE where it is configured in cassandra.yaml to run on an IP which is not available on your PC/laptop:

listen_address: 10.0.2.15
          - seeds: "10.0.2.15"

There are several workarounds available to you which I'll list below.

Workaround 1

Reconfigure /etc/dse/cassandra/cassandra.yaml on your VM.

STEP 1 - Set the seeds list to use the loopback IP:

          - seeds: "127.0.0.1"

STEP 2 - Set the listen_address to localhost:

listen_address: localhost

STEP 3 - Save the changes to cassandra.yaml.

STEP 4 - Start DSE on the VM:

$ sudo service dse start

Workaround 2

Use the VM from DS201 if you still have them.

Workaround 3

Use DataStax Astra -- the cloud DB-as-a-service offering from DataStax. It is FREE to try and no credit card required to create an account. It only takes a few clicks to launch an Apache Cassandra database.

Thanks for bringing this to our attention and I'll alert the DataStax Academy team. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.