Hello,

We have developed a CQRS application using Akka Persistence and Event Store.

I am trying to get the write-front (cluster client) and write-back 
(cluster) to talk to each other within a docker deployment but I can't seem 
to get it to work.

I am also using a Mac so docker is running within a virtual machine on the 
Mac with IP address 192.168.59.103

I am running the write-front application, which is actually a Play 
application, like this:

docker run -d -p 2552:2552 -p 8080:9000 --env APP_HOST=0.0.0.0 --env 
APP_PORT=2552 --env 
APP_BACKEND_CONTACT_POINTS=akka.tcp://[email protected]:2551 --env 
ES_HOST=192.168.59.103 --env ES_PASSWORD=changeit write-front:0.1-SNAPSHOT  

It seems to receive the requests (commands) form the client ok (as 
indicated in logs).

However, they don't seem to get to the write-back application, which seems 
to startup ok when I run this:

docker run -d -p 2551:2551 --env APP_HOST=0.0.0.0 --env APP_PORT=2551 --env 
ES_HOST=192.168.59.103 --env ES_PASSWORD=changeit write-back:0.1-SNAPSHOT

ES is also running in a docker container.

With this config write-back starts up ok but seems to drop messages because 
of APP_HOST configuration?.

I think the problem may be APP_HOST but if I change it I get the following 
outcomes:

APP_HOST=192.168.59.103 (IP address of docker host) => write-front is not 
able to bind the port and it quits

APP_HOST=172.17.0.16 (IP address of docker container) => binds ok but 
doesn't seem to receive any remote messages from write-front

APP_HOST=127.0.0.1 => binds ok but doesn't seem to receive any remote 
messages from write-front

We're running the recent/latest versions of everything I believe.

Is there any way to manually test if write-back is open to receiving 
messages? I can telnet 192.168.59.103 2551 and the connection is made but 
closed by foreign host when I type and send something.  Seems to be open to 
me.

Perhaps write-front isn't trying to connect properly?

I've made sure I start write-back before write-front, in case that would be 
a problem.

Any suggestions or pointers most appreciated?

Please see logs below for further information.

Thanks,
Ashley.

--



Here's a log from write-front (Play application and cluster client):

Play server process ID is 1
03/01 17:12:01 INFO [main] application Pid: 1
03/01 17:12:01 INFO [main] play Application started (Prod)
03/01 17:12:01 INFO [main] play Listening for HTTP on /0:0:0:0:0:0:0:0:9000
Ashley-Aitkens-Laptop-2:Workspace ashley$ !!
dl c134
Play server process ID is 1
03/01 17:12:01 INFO [main] application Pid: 1
03/01 17:12:01 INFO [main] play Application started (Prod)
03/01 17:12:01 INFO [main] play Listening for HTTP on /0:0:0:0:0:0:0:0:9000
03/01 17:12:48 INFO [lt-dispatcher-5] a.e.s.Slf4jLogger Slf4jLogger started
[DEBUG] [03/01/2015 17:12:48.810] [New I/O worker #7] 
[EventStream(akka://play)] logger log1-Logging$DefaultLogger started
[DEBUG] [03/01/2015 17:12:48.812] [New I/O worker #7] 
[EventStream(akka://play)] logger log2-Slf4jLogger started
[DEBUG] [03/01/2015 17:12:48.813] [New I/O worker #7] 
[EventStream(akka://play)] Default Loggers started
03/01 17:12:49 INFO [lt-dispatcher-3] c.VisitorTrackingController 
RegisterReturnVisit request received 
RegisterReturnVisit(be3b681c-fc37-4080-861a-211873a6b32f,Channel(Mozilla/5.0 
(Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/40.0.2214.115 
Safari/537.36),Request(,2015-03-01T17:12:48.000Z,Session(fd9e5049-1a20-43ce-ae9f-4239cd4f2fc6,192.168.59.3,None)))
03/01 17:12:50 INFO [lt-dispatcher-5] c.VisitorTrackingController 
RegisterReturnVisit request received 
RegisterReturnVisit(be3b681c-fc37-4080-861a-211873a6b32f,Channel(Mozilla/5.0 
(Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/40.0.2214.115 
Safari/537.36),Request(,2015-03-01T17:12:50.000Z,Session(fd9e5049-1a20-43ce-ae9f-4239cd4f2fc6,192.168.59.3,None)))



Here's a log from write-back (cluster) run as indicated first (of four 
case) above above:

  NNNNNNDDNNNNNNNN    NNNNN     =NNNNN   $NNNN+     DNNNN? 
 DNNNNNNDNNNNNNNND
   NNNNNNNNN  NNNN$   NNNNN      8NNNND  $NNNN+      NNNNN=  ,DNNNNNNND 
NNNNN$

==============================================================================

Starting Akka...
Running Akka 2.3.9
[warning] No deploy dir found at /opt/docker/deploy
[DEBUG] [03/01/2015 17:11:30.734] [main] [EventStream] StandardOutLogger 
started
 INFO  akka.event.slf4j.Slf4jLogger - Slf4jLogger started
[DEBUG] [03/01/2015 17:11:31.169] [main] [EventStream(akka://a3)] logger 
log1-Slf4jLogger started
[DEBUG] [03/01/2015 17:11:31.171] [main] [EventStream(akka://a3)] Default 
Loggers started
17:11:31.169UTC DEBUG akka.event.EventStream - logger log1-Slf4jLogger 
started
17:11:31.171UTC DEBUG akka.event.EventStream - Default Loggers started
17:11:31.287UTC INFO  Remoting - Starting remoting
17:11:31.462UTC INFO  Remoting - Remoting started; listening on addresses 
:[akka.tcp://[email protected]:2551]
17:11:31.476UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - Starting up...
17:11:31.561UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - Registered cluster JMX MBean 
[akka:type=Cluster]
17:11:31.561UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - Started up successfully
17:11:31.569UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - Metrics will be retreived from MBeans, and 
may be incorrect on some platforms. To increase metric accuracy add the 
'sigar.jar' to the classpath and the appropriate platform-specific native 
libary to 'java.library.path'. Reason: java.lang.ClassNotFoundException: 
org.hyperic.sigar.Sigar
17:11:31.571UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - Metrics collection has started successfully
17:11:31.573UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - No seed-nodes configured, manual cluster 
join required
17:11:31.800UTC DEBUG akka.io.TcpOutgoingConnection - Attempting connection 
to [/192.168.59.103:1113]
17:11:31.803UTC DEBUG akka.io.TcpOutgoingConnection - Connection 
established to [/192.168.59.103:1113]
17:11:31.850UTC INFO  eventstore.tcp.ConnectionActor - Connected to 
/192.168.59.103:1113
17:11:31.971UTC INFO  akka.actor.ActorSystemImpl - Starting monitoring
Starting up abc.app.A3BackendApp
 INFO  abc.app.A3BackendApp - no seed file found, using default seeds
 INFO  bc.app.A3BackendApp - Joining cluster with seed nodes: 
List(akka.tcp://[email protected]:2551)
17:11:32.027UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - Node [akka.tcp://[email protected]:2551] is 
JOINING, roles []
17:11:32.037UTC DEBUG c.h.m.ApplicationStatusRecorder - Recording: 
ApplicationStarted(AppInfo(a3-write-back,0.1-SNAPSHOT,172.17.0.32,2015-03-01T17:11:31.978Z))
17:11:32.071UTC DEBUG akka.contrib.pattern.ShardRegion - Request shard [a] 
home
Successfully started Akka
17:11:32.595UTC INFO  Cluster(akka://a3) - Cluster Node 
[akka.tcp://[email protected]:2551] - Leader is moving node 
[akka.tcp://[email protected]:2551] to [Up]
17:11:32.608UTC INFO  a.c.pattern.ClusterSingletonManager - Singleton 
manager [akka.tcp://[email protected]:2551] starting singleton actor
17:11:32.608UTC INFO  a.c.pattern.ClusterSingletonManager - Singleton 
manager [akka.tcp://[email protected]:2551] starting singleton actor
17:11:32.609UTC DEBUG akka.contrib.pattern.ShardRegion - Coordinator moved 
from [] to [akka.tcp://[email protected]:2551]
17:11:32.611UTC DEBUG akka.contrib.pattern.ShardRegion - Coordinator moved 
from [] to [akka.tcp://[email protected]:2551]
17:11:32.611UTC DEBUG a.c.pattern.ClusterSingletonProxy - Creating 
singleton identification timer...
17:11:32.611UTC INFO  a.c.pattern.ClusterSingletonManager - 
ClusterSingletonManager state change [Start -> Oldest]
17:11:32.612UTC INFO  a.c.pattern.ClusterSingletonManager - Singleton 
manager [akka.tcp://[email protected]:2551] starting singleton actor
17:11:32.612UTC INFO  a.c.pattern.ClusterSingletonManager - Singleton 
manager [akka.tcp://[email protected]:2551] starting singleton actor
17:11:32.612UTC INFO  a.c.pattern.ClusterSingletonManager - 
ClusterSingletonManager state change [Start -> Oldest]
17:11:32.612UTC INFO  a.c.pattern.ClusterSingletonManager - 
ClusterSingletonManager state change [Start -> Oldest]
17:11:32.614UTC DEBUG a.c.pattern.ClusterSingletonProxy - Trying to 
identify singleton at 
akka.tcp://[email protected]:2551/user/singletonOfSagaManager-registration/SagaManager-registration
17:11:32.615UTC DEBUG akka.contrib.pattern.ShardRegion - Coordinator moved 
from [] to [akka.tcp://[email protected]:2551]
17:11:32.615UTC INFO  a.c.pattern.ClusterSingletonManager - 
ClusterSingletonManager state change [Start -> Oldest]
17:11:32.646UTC INFO  a.c.pattern.ClusterSingletonProxy - Singleton 
identified: 
akka://a3/user/singletonOfSagaManager-registration/SagaManager-registration
17:11:32.723UTC DEBUG c.h.a.a.A3BackConfiguration$$anonfun$1$$anon$3 - 
Recovery completed
17:11:32.724UTC DEBUG c.h.a.a.A3BackConfiguration$$anonfun$1$$anon$3 - 
Subscribing to registration from position None (exclusive)
17:11:32.756UTC DEBUG c.h.a.a.A3BackConfiguration$$anonfun$1$$anon$3 - Live 
processing started
17:11:32.966UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/User#170271176] failed
17:11:32.966UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-937808859] failed
17:11:32.966UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/UserRegistrationSaga#-2130058849] failed
17:11:32.970UTC DEBUG a.s.Serialization(akka://a3) - Using 
serializer[abc.serialization.Json4sSerializer] for message 
[akka.persistence.PersistentImpl]
17:11:32.972UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/User#1784296966] failed
17:11:32.972UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/UserRegistrationSaga#1349175133] failed
17:11:32.976UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-937808859] failed
17:11:32.977UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/UserRegistrationSaga#1453287205] failed
17:11:32.977UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/User#536883743] failed
17:11:32.977UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#2005703454] failed
17:11:32.978UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/User#666858817] failed
17:11:32.978UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#2005703454] failed
17:11:32.978UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/User#354736345] failed
17:11:32.978UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/UserRegistrationSaga#-935550313] failed
17:11:32.979UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/User#-1076441576] failed
17:11:32.979UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/UserRegistrationSaga#737147136] failed
17:11:32.980UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/UserRegistrationSaga#1233001127] failed
17:11:32.986UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-358053932] failed
17:11:32.988UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-358053932] failed
17:11:32.988UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#804408653] failed
17:11:32.989UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#804408653] failed
17:11:32.990UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-449129925] failed
17:11:32.990UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-449129925] failed
17:11:32.991UTC DEBUG a.contrib.pattern.ShardCoordinator - ShardRegion 
registered: [Actor[akka://a3/user/sharding/UserRegistrationSaga#1864260115]]
17:11:32.992UTC DEBUG a.contrib.pattern.ShardCoordinator - ShardRegion 
registered: [Actor[akka://a3/user/sharding/User#176112048]]
17:11:32.992UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-699360260] failed
17:11:32.994UTC DEBUG LocalActorRefProvider(akka://a3) - resolve of path 
sequence [/user/sharding/Visitor#-699360260] failed
17:11:33.001UTC DEBUG a.contrib.pattern.ShardCoordinator - ShardRegion 
registered: [Actor[akka://a3/user/sharding/Visitor#1345619619]]
17:11:33.038UTC DEBUG akka.contrib.pattern.ShardRegion - Retry request for 
shard [a] homes
17:11:33.058UTC DEBUG a.contrib.pattern.ShardCoordinator - Shard [a] 
allocated at [Actor[akka://a3/user/sharding/Visitor#1345619619]]
17:11:33.058UTC DEBUG akka.contrib.pattern.ShardRegion - Shard [a] located 
at [Actor[akka://a3/user/sharding/Visitor#1345619619]]
17:11:33.062UTC DEBUG akka.contrib.pattern.ShardRegion - Starting entry 
[4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd] in shard [a]
17:11:33.064UTC DEBUG akka.contrib.pattern.ShardRegion - Message 
[xyz.messaging.command.CommandMessage] for shard [a] sent to entry
17:11:33.100UTC DEBUG 
c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - Received: 
CommandMessage(StartUserRegistration(4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd,bec61555-7957-48e2-841a-656d150f5db5,admin,admin@abc,true,2015-03-01T17:11:32.067Z),949e7d69-819e-44aa-b8f5-6516660a2634,Sun
 
Mar 01 17:11:33 UTC 2015)
17:11:33.144UTC INFO 
 c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - Event 
persisted: 
UserRegistrationStarted(4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd,UserRegistrationData(bec61555-7957-48e2-841a-656d150f5db5,admin,admin@abc,4e16d4c3-6f76-4d9a-910c-985e75520e6c,2015-03-01T17:11:32.067Z,true))
 DEBUG c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - 
Published: DomainEventMessage(event = 
UserRegistrationStarted(4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd,UserRegistrationData(bec61555-7957-48e2-841a-656d150f5db5,admin,admin@abc,4e16d4c3-6f76-4d9a-910c-985e75520e6c,2015-03-01T17:11:32.067Z,true)),
 
identifier = c9bf5e89-6ecb-48aa-916a-240297344de9, timestamp = 
2015-03-01T17:11:33.102Z, metaData = None)
17:11:33.149UTC DEBUG akka.contrib.pattern.ShardRegion - Message 
[xyzmessaging.command.CommandMessage] for shard [a] sent to entry
17:11:33.152UTC DEBUG 
c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - Delivery 
receipt (for received command) sent (Processed(Success(OK)))
17:11:33.155UTC DEBUG 
c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - Received: 
CommandMessage(ConfirmUserRegistration(4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd,4e16d4c3-6f76-4d9a-910c-985e75520e6c,2015-03-01T17:11:33.148Z),78712bb5-bfa4-477f-ab73-447524dcb4fb,Sun
 
Mar 01 17:11:33 UTC 2015)
17:11:33.156UTC INFO  a.r.RemoteActorRefProvider$RemoteDeadLetterActorRef - 
Message [xyz.delivery.protocol.Processed] from 
Actor[akka://a3/user/sharding/Visitor/4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd#1277302497]
 
to Actor[akka://a3/deadLetters] was not delivered. [1] dead letters 
encountered. This logging can be turned off or adjusted with configuration 
settings 'akka.log-dead-letters' and 
'akka.log-dead-letters-during-shutdown'.
17:11:33.177UTC INFO 
 c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - Event 
persisted: 
UserRegistrationConfirmed(4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd,UserRegistrationData(bec61555-7957-48e2-841a-656d150f5db5,admin,admin@abc,4e16d4c3-6f76-4d9a-910c-985e75520e6c,2015-03-01T17:11:32.067Z,true))
 DEBUG c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - 
Published: DomainEventMessage(event = 
UserRegistrationConfirmed(4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd,UserRegistrationData(bec61555-7957-48e2-841a-656d150f5db5,admin,admin@abc,4e16d4c3-6f76-4d9a-910c-985e75520e6c,2015-03-01T17:11:32.067Z,true)),
 
identifier = fab0c7a2-d43e-4e0d-accd-c8fe0536693e, timestamp = 
2015-03-01T17:11:33.157Z, metaData = None)
17:11:33.178UTC DEBUG 
c.h.a.a.A3BackConfiguration$$anon$4$$anonfun$props$2$$anon$2 - Delivery 
receipt (for received command) sent (Processed(Success(OK)))
17:12:33.197UTC DEBUG akka.contrib.pattern.ShardRegion - Passivating 
started 
Actor[akka://a3/user/sharding/Visitor/4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd#1277302497]
17:12:33.201UTC DEBUG akka.contrib.pattern.ShardRegion - Passivating 
completed 
Actor[akka://a3/user/sharding/Visitor/4cfdcb4c-57f7-4d42-a8a9-ccb0376d73fd#1277302497],
 
buffered [0]
17:12:49.285UTC ERROR akka.remote.EndpointWriter - dropping message [class 
akka.actor.ActorSelectionMessage] for non-local recipient 
[Actor[akka.tcp://[email protected]:2551/]] arriving at 
[akka.tcp://[email protected]:2551] inbound addresses are 
[akka.tcp://[email protected]:2551]
17:12:49.287UTC ERROR akka.remote.EndpointWriter - dropping message [class 
akka.actor.ActorSelectionMessage] for non-local recipient 
[Actor[akka.tcp://[email protected]:2551/]] arriving at 
[akka.tcp://[email protected]:2551] inbound addresses are 
[akka.tcp://[email protected]:2551]
17:12:52.122UTC ERROR akka.remote.EndpointWriter - dropping message [class 
akka.actor.ActorSelectionMessage] for non-local recipient 
[Actor[akka.tcp://[email protected]:2551/]] arriving at 
[akka.tcp://[email protected]:2551] inbound addresses are 
[akka.tcp://[email protected]:2551]
17:12:55.119UTC ERROR akka.remote.EndpointWriter - dropping message [class 
akka.actor.ActorSelectionMessage] for non-local recipient 
[Actor[akka.tcp://[email protected]:2551/]] arriving at 
[akka.tcp://[email protected]:2551] inbound addresses are 
[akka.tcp://[email protected]:2551]


-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to