Hello,
I'm trying to figure out how to get 2.4-SNAPSHOT going with Docker such
that 1) I can access akka+http outside the running Docker container (i.e.
from the host), and 2) I can enable clustering/discovery.
I see from discussion threads and docs that the new bind-hostname and
bind-port are designed to do this, but I haven't been able to come up with
the right recipe to use them yet.
My code passes these arguments when Docker starts up:
- IP address of host machine
- port for Akka on host
- http port
Like this:
docker run -i -t -p 9100:9100 -p 9101:9101 localhost:5000/root:1.0.0 --seed
--name kernel --hostIP 172.16.240.78 --hostPort 9100 --httpPort 9101
--roles seed
(where 172.16.240.78 is the IP of my host running Docker)
Here's my application.conf.
akka {
loglevel = "ERROR"
stdout-loglevel = "ERROR"
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
log-dead-letters = 1
log-dead-letters-during-shutdown = off
actor {
provider = "akka.cluster.ClusterActorRefProvider"
}
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
# Outside Docker addr
bind-hostname = ${server.ip} # hostIP param
bind-port = ${server.port} # hostPort param
# Inside Docker addr
port = 0
}
}
cluster {
auto-down = on
log-info = off
# seed-nodes and roles set at runtime and added to config
}
}
I'm not sure I'm using these hostname/port, bind-hostname, bind-port
correctly. I've tried a few different permutations, which either fail to
launch (w/messages saying it can't bind to an address) or it runs but I
can't hit it outside my Docker container.
I need Akka to be able to discover its cluster nodes and be accessible on
the given IP addr/port.
I have a trivial project set up here to show the approach:
https://github.com/gzoller/docker-exp/tree/akk2
I'm hoping I'm missing something simple in my config...
Any ideas?
Thanks!
Greg
--
>>>>>>>>>> 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.