Can't access rancher/server UI

#1

Hello every one,
Using ubuntu 16.04-server i execute this commande:
docker run -d --restart=always -p 8080:8080 rancher/server

Now rancher server is ruuning as a docker container on port 8080,

I want to access to rancher server by putting myhostname:8080 using my local navigator (local machine(windows))

I also execute those cmds:
iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
iptables -A INPUT -p udp --dport 8080 -j ACCEPT

But now i can’t access to rancher/server UI

dicker logs <my_container>
I got those types of errors:

  • level=info msg=“Downloading key from http:// localhost:8081/v1/scripts/api.crt”
  • level=fatal msg=“Error getting config.” error=“Invalid key content”
  • level=fatal msg=“Unable to create event router” error=“Get http:/ /localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: getsockopt: connection refused”
  • WARN [:] [] [] [] [main ] [o.eclipse.jetty.webapp.WebAppContext] Failed startup of context o.e.j.w.WebAppContext@1bce4f0a{/,file:/usr/share/cattle/7ec510bfffb3e6d6cd2f7179e2082423/,STARTING}{file:/usr/share/cattle/7ec510bfffb3e6d6cd2f7179e2082423/} io.cattle.platform.lock.exception.FailedToAcquireLockException: Failed to acquire lock [DATA.CHANGE.host.api.key]
  • level=fatal msg=“Unable to create event router” error="Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: getsockopt: connection refused"
    STARTUP FAILED [830573] ms
  • level=fatal msg=“Error getting config.” error=“Invalid key content”

What can i do for all those errors , it’s weird because i’m just running this container:
docker ps :
5394a37e021b rancher/server:stable “/usr/bin/entry /u…” About an hour ago Up 10 minutes 3306/tcp, 0.0.0.0:8080->8080/tcp focused_gates

#2

Answer is in https://github.com/rancher/rancher/issues/10347

1 Like
#3

Thank you for your response, the pb is solved.

#4

In case anyone else comes across this. I fixed it by

docker stop rancher-agent
docker start rancher-server
docker start rancher-agent