Not able to access the UI

Hello community,

I’m struggling to access the ui.

I’ve followed the instructions here: http://docs.rancher.com/rancher/quick-start-guide/

It’s likely user error, but I also can’t find a solution because I don’t
really know what the problem is. I’ve tried using the docker container
ip, the vm instance public ip on an EC2 instance, and a static ip on
google CE. None of these have allowed me to access the ui.

What ip address should be used to access the ui? The container ip or the instance, and what network configurations needs to be set?

Any help is much appreciated.

In case it’s helpful, I’ve added the log from my most recent attempt.

Thank you,

ubuntu@ip-172-31-60-106:~$ sudo docker logs -f 18acc54aaab1a740beb19eeeeb0fde6c835e1b5e6ba80a4f4ebb499e210d882c
160401 5:24:56 [Note] /usr/sbin/mysqld (mysqld 5.5.47-0ubuntu0.14.04.1-log) starting as process 28 …
Uptime: 2 Threads: 1 Questions: 2 Slow queries: 0 Opens: 33 Flush tables: 1 Open tables: 26 Queries per second avg: 1.000
Setting up database
Importing schema
CATTLE_AGENT_PACKAGE_AGENT_BINARIES_URL=/usr/share/cattle/artifacts/agent-binaries.tar.gz
CATTLE_AGENT_PACKAGE_CADVISOR_URL=/usr/share/cattle/artifacts/cadvisor.tar.gz
CATTLE_AGENT_PACKAGE_HOST_API_URL=/usr/share/cattle/artifacts/host-api.tar.gz
CATTLE_AGENT_PACKAGE_NODE_AGENT_URL=/usr/share/cattle/artifacts/node-agent.tar.gz
CATTLE_AGENT_PACKAGE_PYTHON_AGENT_URL=/usr/share/cattle/artifacts/python-agent.tar.gz
CATTLE_AGENT_PACKAGE_RANCHER_DNS_URL=/usr/share/cattle/artifacts/rancher-dns.tar.gz
CATTLE_AGENT_PACKAGE_RANCHER_METADATA_URL=/usr/share/cattle/artifacts/rancher-metadata.tar.gz
CATTLE_AGENT_PACKAGE_RANCHER_NET_URL=/usr/share/cattle/artifacts/rancher-net.tar.gz
CATTLE_CATTLE_VERSION=v0.159.2
CATTLE_DB_CATTLE_DATABASE=mysql
CATTLE_DB_CATTLE_MYSQL_HOST=localhost
CATTLE_DB_CATTLE_MYSQL_NAME=cattle
CATTLE_DB_CATTLE_MYSQL_PORT=3306
CATTLE_DB_CATTLE_USERNAME=cattle
CATTLE_GRAPHITE_HOST=
CATTLE_GRAPHITE_PORT=
CATTLE_HOME=/var/lib/cattle
CATTLE_HOST_API_PROXY_MODE=embedded
CATTLE_LOGBACK_OUTPUT_GELF_HOST=
CATTLE_LOGBACK_OUTPUT_GELF_PORT=
CATTLE_RANCHER_COMPOSE_VERSION=v0.7.3
CATTLE_RANCHER_SERVER_IMAGE=v1.0.0
CATTLE_USE_LOCAL_ARTIFACTS=true
DEFAULT_CATTLE_API_UI_INDEX=//releases.rancher.com/ui/0.100.3
DEFAULT_CATTLE_CATALOG_EXECUTE=true
DEFAULT_CATTLE_CATALOG_URL=library=https://github.com/rancher/rancher-catalog.git,community=https://github.com/rancher/community-catalog.git
DEFAULT_CATTLE_COMPOSE_EXECUTOR_EXECUTE=true
DEFAULT_CATTLE_MACHINE_EXECUTE=true
DEFAULT_CATTLE_RANCHER_COMPOSE_DARWIN_URL=https://releases.rancher.com/compose/v0.7.3/rancher-compose-darwin-amd64-v0.7.3.tar.gz
DEFAULT_CATTLE_RANCHER_COMPOSE_LINUX_URL=https://releases.rancher.com/compose/v0.7.3/rancher-compose-linux-amd64-v0.7.3.tar.gz
DEFAULT_CATTLE_RANCHER_COMPOSE_WINDOWS_URL=https://releases.rancher.com/compose/v0.7.3/rancher-compose-windows-386-v0.7.3.zip
05:25:04.701 [main] WARN o.e.jetty.security.SecurityHandler - ServletContext@o.e.j.w.WebAppContext@1d0fb7fb{/,file:/usr/share/cattle/9283c067b6f96f5ff1e38fb0ddfd8649/,STARTING}{file:/usr/share/cattle/9283c067b6f96f5ff1e38fb0ddfd8649/} has uncovered http methods for path: /
05:25:06.516 [main] INFO ConsoleStatus - [1/6] [0ms] [5ms] Loading config-bootstrap
05:25:06.859 [main] INFO ConsoleStatus - [2/6] [349ms] [336ms] Loading base-config
05:25:07.470 [main] INFO ConsoleStatus - [3/6] [960ms] [610ms] Loading config
05:25:07.491 [main] INFO ConsoleStatus - [4/6] [981ms] [16ms] Starting config-bootstrap
05:25:07.949 [main] INFO ConsoleStatus - [5/6] [1439ms] [458ms] Starting base-config
05:25:07.950 [main] INFO ConsoleStatus - [6/6] [1440ms] [0ms] Starting config
2016-04-01 05:25:08,371 INFO [main] [ConsoleStatus] [1/32] [0ms] [0ms] Loading bootstrap
2016-04-01 05:25:08,551 INFO [main] [ConsoleStatus] [2/32] [180ms] [180ms] Loading config-defaults
2016-04-01
05:25:14,877 WARN [main] [liquibase] modifyDataType will lose
primary key/autoincrement/not null settings for mysql. Use
and re-specify all configuration if this is the case
2016-04-01 05:25:19,191 INFO [main] [ConsoleStatus] [3/32] [10820ms] [10640ms] Loading system
2016-04-01 05:25:19,279 INFO [main] [ConsoleStatus] [4/32] [10908ms] [87ms] Loading defaults
2016-04-01 05:25:19,735 INFO [main] [ConsoleStatus] [5/32] [11364ms] [456ms] Loading types
2016-04-01 05:25:28,672 INFO [main] [ConsoleStatus] [6/32] [20301ms] [8937ms] Loading system-services
2016-04-01 05:25:29,031 INFO [main] [ConsoleStatus] [7/32] [20660ms] [359ms] Loading agent-server
2016-04-01 05:25:29,403 INFO [main] [ConsoleStatus] [8/32] [21032ms] [372ms] Loading allocator-server
2016-04-01 05:25:31,539 INFO [main] [ConsoleStatus] [9/32] [23168ms] [2136ms] Loading api-server
2016-04-01 05:25:34,117 INFO [main] [ConsoleStatus] [10/32] [25746ms] [2578ms] Loading iaas-api
2016-04-01 05:25:34,252 INFO [main] [ConsoleStatus] [11/32] [25881ms] [135ms] Loading archaius
2016-04-01 05:25:34,820 INFO [main] [ConsoleStatus] [12/32] [26449ms] [568ms] Loading core-model
2016-04-01 05:25:34,873 INFO [main] [ConsoleStatus] [13/32] [26502ms] [53ms] Loading core-object-defaults
2016-04-01 05:25:34,907 INFO [main] [ConsoleStatus] [14/32] [26536ms] [34ms] Loading encryption
2016-04-01 05:25:38,081 INFO [main] [ConsoleStatus] [15/32] [29710ms] [3174ms] Loading process
2016-04-01 05:25:38,131 INFO [main] [ConsoleStatus] [16/32] [29760ms] [49ms] Loading redis
2016-04-01 05:25:38,227 INFO [main] [ConsoleStatus] [17/32] [29856ms] [96ms] Starting bootstrap
2016-04-01 05:25:38,227 INFO [main] [ConsoleStatus] [18/32] [29856ms] [0ms] Starting config-defaults
2016-04-01 05:25:38,227 INFO [main] [ConsoleStatus] [19/32] [29856ms] [0ms] Starting system
2016-04-01 05:25:38,228 INFO [main] [ConsoleStatus] [20/32] [29857ms] [1ms] Starting defaults
2016-04-01 05:25:38,228 INFO [main] [ConsoleStatus] [21/32] [29857ms] [0ms] Starting types
2016-04-01 05:25:44,866 INFO [main] [ConsoleStatus] [22/32] [36495ms] [6638ms] Starting system-services
2016-04-01 05:25:44,867 INFO [main] [ConsoleStatus] [23/32] [36496ms] [1ms] Starting agent-server
2016-04-01 05:25:44,867 INFO [main] [ConsoleStatus] [24/32] [36496ms] [0ms] Starting allocator-server
2016-04-01 05:25:47,210 INFO [main] [ConsoleStatus] [25/32] [38839ms] [2342ms] Starting api-server
2016-04-01 05:25:48,724 INFO [main] [ConsoleStatus] [26/32] [40353ms] [1514ms] Starting iaas-api
2016-04-01 05:25:48,731 INFO [main] [ConsoleStatus] [27/32] [40360ms] [0ms] Starting archaius
2016-04-01 05:25:48,732 INFO [main] [ConsoleStatus] [28/32] [40361ms] [1ms] Starting core-model
2016-04-01 05:25:48,732 INFO [main] [ConsoleStatus] [29/32] [40361ms] [0ms] Starting core-object-defaults
2016-04-01 05:25:48,732 INFO [main] [ConsoleStatus] [30/32] [40361ms] [0ms] Starting encryption
2016-04-01 05:25:48,736 INFO [main] [ConsoleStatus] [31/32] [40365ms] [4ms] Starting process
2016-04-01 05:25:48,737 INFO [main] [ConsoleStatus] [32/32] [40366ms] [0ms] Starting redis
05:25:48.911 [main] INFO ConsoleStatus - [DONE ] [45632ms] Startup Succeeded, Listening on port 8081
time="2016-04-01T05:25:49Z"
level=info msg="Starting websocket proxy. Listening on [:8080],
Proxying to cattle API at [localhost:8081], Monitoring parent pid [7]."
time=“2016-04-01T05:25:49Z” level=info msg="Downloading certificate from http://localhost:8081/v1/credentials/1c1/certificate"
time=“2016-04-01T05:25:50Z” level=info msg="Starting Rancher Catalog service"
time=“2016-04-01T05:25:50Z” level=info msg="Using catalog library=https://github.com/rancher/rancher-catalog.git"
time=“2016-04-01T05:25:50Z” level=info msg="Using catalog community=https://github.com/rancher/community-catalog.git"
time=“2016-04-01T05:25:50Z” level=info msg=“Setting log level” logLevel=info
time=“2016-04-01T05:25:50Z” level=info msg=“Starting go-machine-service…” gitcommit=dc97268
time=“2016-04-01T05:25:50Z” level=info msg="Updating docker-machine-drivers from cattle."
time=“2016-04-01T05:25:50Z” level=info msg=“Starting rancher-compose-executor” version=v0.7.3
time=“2016-04-01T05:25:51Z” level=info msg=“Initializing event router” workerCount=10
time=“2016-04-01T05:25:51Z” level=info msg="Connection established"
time=“2016-04-01T05:26:10Z” level=info msg="Started setting and driver watcher."
time=“2016-04-01T05:26:10Z” level=info msg=“Initializing event router” workerCount=10
time=“2016-04-01T05:26:10Z” level=info msg=“Connection established”
^Cubuntu@ip-172-31-60-106:~$

The -p in

sudo docker run -d --restart=always -p 8080:8080 rancher/server

means to listen on port 8080 (the left side) on the host and send that to port 8080 (the right side) in the container. So you want the “public” IP address of the host that the container is on.

Both EC2 and GCE default to all ports closed, so you will also need to have a security group that allows access to 8080 applied to the host.

Thank you!

I had to open the port for the security group for the AWS instance. I’ll look into that for GCE as well.