Ports required to run Vert.x clustered with Hazelcast on docker-compose

305 views
Skip to first unread message

Rodolfo de Paula

unread,
Jan 22, 2018, 9:10:51 PM1/22/18
to vert.x
Hello

I have been working on the next release of my side project https://github.com/crabzilla/crabzilla

Specifically, I'm trying to dockerize this example: https://github.com/crabzilla/crabzilla#how-to-run-the-example It runs and even supports HA.

But when running with docker-compose, everything starts without problem and Hazelcast recognize all nodes but I noticed this error after sending a command to the crabzilla-example1-ha-web: 

web_1               | 2018-01-23 01:54:24,933 117224 [vert.x-eventloop-thread-2] INFO  i.g.c.v.e.s.EntityCommandHandlerService - command=:
web_1               | {
web_1               |   "@class" : "io.github.crabzilla.example1.customer.CreateCustomer",
web_1               |   "commandId" : "b128066b-64f1-457d-8e35-3f019175468c",
web_1               |   "targetId" : {
web_1               |     "@class" : "io.github.crabzilla.example1.customer.CustomerId",
web_1               |     "id" : "6dec4ef2-1882-4e60-9292-ef4a0cba9b06"
web_1               |   },
web_1               |   "name" : "6dec4ef2-1882-4e60-9292-ef4a0cba9b06"
web_1               | }
web_1               | 
web_1               | Jan 23, 2018 1:54:25 AM io.vertx.core.eventbus.impl.clustered.ConnectionHolder
web_1               | WARNING: Connecting to server localhost:33227 failed
web_1               | io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:33227
web_1               | at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
web_1               | at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)
web_1               | at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:353)
web_1               | at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
web_1               | at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633)
web_1               | at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
web_1               | at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
web_1               | at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
web_1               | at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
web_1               | at java.lang.Thread.run(Thread.java:745)
web_1               | Caused by: java.net.ConnectException: Connection refused
web_1               | ... 10 more


This is happening just before the web service attempt to send a request/response to an event bus endpoint conssumed by the handler service. 
 
Is there anything more I should configure? The docker-compose file is on docker-compose branch here: https://github.com/crabzilla/crabzilla/blob/docker-compose/crabzilla-example1/crabzilla-example1-services/crabzilla-example1-ha/docker-compose.yml 

Thanks,
Rodolfo

Thomas SEGISMONT

unread,
Jan 23, 2018, 5:28:13 AM1/23/18
to ve...@googlegroups.com
How do you start Vert.x? There's a hostname detection mechanism in the CLI and the Launcher class.

If you have your own main class, make sure to set the ClusterHost option correctly.

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/2fd06ae8-521b-45e9-8944-34b8c46df766%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rodolfo de Paula

unread,
Jan 23, 2018, 5:34:21 PM1/23/18
to vert.x
Thanks, Thomas!

It's working now :)
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages