lmenezes / cerebro-docker

official cerebro docker image
118 stars 40 forks source link

cerebro Listening 0:0:0:0:0:0:0:0:9000 and can't connected #19

Closed zakokun closed 2 years ago

zakokun commented 2 years ago

I'm sorry to bother everyone. I got a question in useing cerebro, when I start it with default setting:

▶ docker run lmenezes/cerebro
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/opt/cerebro/lib/com.google.inject.guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[info] play.api.Play - Application started (Prod) (no global state)
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0.0.0.0:9000

it worked. I can connect it with 127.0.0.1:9000

but if I set --network=host like this:

▶ docker run --network=host lmenezes/cerebro
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/opt/cerebro/lib/com.google.inject.guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[info] play.api.Play - Application started (Prod) (no global state)
[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

It bind to 0:0:0:0:0:0:0:0:9000 and I can't connect it. lsof -i:9000 also show the port 9000 are not listening.

env: MacOS 10.14.6 docker Engine: 20.10.11 cerebro: the latest thanks!

moliware commented 2 years ago

I guess you need to expose ports, for example:

docker run -p 9000:9000 lmenezes/cerebro

With that, you be able to access cerebro in localhost:9000.

I'm closing this, feel free to reopen it if you have more questions.

armando-ota commented 4 months ago

i'm using your command "docker run -p 9000:9000 lmenezes/cerebro" and still get same thing. My cerebro docker starts same as op. so this happens Connection refused: localhost/0:0:0:0:0:0:0:1:19275] when I want to connect on localhost 19275