New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to bind port 9042 on 127.0.0.1 #87

Closed
alparslanuysal opened this Issue Dec 1, 2016 · 7 comments

Comments

Projects
None yet
2 participants
@alparslanuysal

alparslanuysal commented Dec 1, 2016

When i type the gradle test in the stream-reactor directory.It shows an error;

2016-12-01 18:42:13,808 ERROR [pool-2-thread-1] [service.StartupChecks] [execute:153] cassandra.jmx.local.port missing from cassandra-env.sh, unable to start local JMX service.
TestCassandraReaderIncr:
Exception (java.lang.IllegalStateException) encountered during startup: Failed to bind port 9042 on 127.0.0.1.
java.lang.IllegalStateException: Failed to bind port 9042 on 127.0.0.1.
at org.apache.cassandra.transport.Server.run(Server.java:189)
at org.apache.cassandra.transport.Server.start(Server.java:122)
at org.apache.cassandra.service.CassandraDaemon.start(CassandraDaemon.java:430)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:531)
at org.cassandraunit.utils.EmbeddedCassandraServerHelper$1.run(EmbeddedCassandraServerHelper.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2016-12-01 18:42:22,889 ERROR [pool-2-thread-1] [service.CassandraDaemon] [exitOrFail:638] Exception encountered during startup
java.lang.IllegalStateException: Failed to bind port 9042 on 127.0.0.1.
at org.apache.cassandra.transport.Server.run(Server.java:189)
at org.apache.cassandra.transport.Server.start(Server.java:122)
at org.apache.cassandra.service.CassandraDaemon.start(CassandraDaemon.java:430)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:531)
at org.cassandraunit.utils.EmbeddedCassandraServerHelper$1.run(EmbeddedCassandraServerHelper.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
:kafka-connect-cassandra:test FAILED

FAILURE: Build failed with an exception.

@andrewstevenson

This comment has been minimized.

Show comment
Hide comment
@andrewstevenson

andrewstevenson Dec 1, 2016

Collaborator
Collaborator

andrewstevenson commented Dec 1, 2016

@andrewstevenson

This comment has been minimized.

Show comment
Hide comment
@andrewstevenson

andrewstevenson Dec 5, 2016

Collaborator

@alparslanuysal Did you get this resolved?

Collaborator

andrewstevenson commented Dec 5, 2016

@alparslanuysal Did you get this resolved?

@alparslanuysal

This comment has been minimized.

Show comment
Hide comment
@alparslanuysal

alparslanuysal Dec 5, 2016

Hi, Gradle version:3.2.1 and yes i'm building from master.First, I tried to build when cassandra running on the machine and then stopped cassandra but, build failed again

alparslanuysal commented Dec 5, 2016

Hi, Gradle version:3.2.1 and yes i'm building from master.First, I tried to build when cassandra running on the machine and then stopped cassandra but, build failed again

@andrewstevenson

This comment has been minimized.

Show comment
Hide comment
@andrewstevenson

andrewstevenson Dec 5, 2016

Collaborator

Are you sure cassandra is stopped? Sometimes I've set an unclean shutdown can test failures. Anything active on port 9042?

Collaborator

andrewstevenson commented Dec 5, 2016

Are you sure cassandra is stopped? Sometimes I've set an unclean shutdown can test failures. Anything active on port 9042?

@alparslanuysal

This comment has been minimized.

Show comment
Hide comment
@alparslanuysal

alparslanuysal Dec 5, 2016

I have build again and it says successful.However, I faced some logs multiple times:

2016-12-05 17:23:54,625 ERROR [ScalaTest-1-running-TestCassandraJsonWriterNoop] [sink.CassandraJsonWriter] [handleTry:46] Encountered error All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.DriverException: Error preparing query, got ERROR INVALID: unconfigured table sink_test))
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.DriverException: Error preparing query, got ERROR INVALID: unconfigured table sink_test))
at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:37)
at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:245)
at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:63)
at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter$$anonfun$3$$anonfun$apply$1.apply$mcV$sp(CassandraJsonWriter.scala:131)
at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter$$anonfun$3$$anonfun$apply$1.apply(CassandraJsonWriter.scala:126)
at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter$$anonfun$3$$anonfun$apply$1.apply(CassandraJsonWriter.scala:126)
at com.datamountaineer.streamreactor.connect.concurrent.ExecutorExtension$RunnableWrapper$$anon$1.run(ExecutorExtension.scala:30)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Is it OK?

alparslanuysal commented Dec 5, 2016

I have build again and it says successful.However, I faced some logs multiple times:

2016-12-05 17:23:54,625 ERROR [ScalaTest-1-running-TestCassandraJsonWriterNoop] [sink.CassandraJsonWriter] [handleTry:46] Encountered error All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.DriverException: Error preparing query, got ERROR INVALID: unconfigured table sink_test))
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: localhost/127.0.0.1:9042 (com.datastax.driver.core.exceptions.DriverException: Error preparing query, got ERROR INVALID: unconfigured table sink_test))
at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:37)
at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:245)
at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:63)
at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter$$anonfun$3$$anonfun$apply$1.apply$mcV$sp(CassandraJsonWriter.scala:131)
at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter$$anonfun$3$$anonfun$apply$1.apply(CassandraJsonWriter.scala:126)
at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter$$anonfun$3$$anonfun$apply$1.apply(CassandraJsonWriter.scala:126)
at com.datamountaineer.streamreactor.connect.concurrent.ExecutorExtension$RunnableWrapper$$anon$1.run(ExecutorExtension.scala:30)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Is it OK?

@andrewstevenson

This comment has been minimized.

Show comment
Hide comment
@andrewstevenson

andrewstevenson Dec 5, 2016

Collaborator
Collaborator

andrewstevenson commented Dec 5, 2016

@alparslanuysal

This comment has been minimized.

Show comment
Hide comment
@alparslanuysal

alparslanuysal commented Dec 5, 2016

Ok, Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment