Configure Rancher web UI port

I was trying to change the Rancher web UI port from 8080 to 80 and now am unable to reach the web UI.

I was at /env/1a5/infra/containers/1i10/ports and updated the port from 8080 to 80 and restarted the container. I can SSH in to the VM running rancher and see the containers running.

[root@rancher rancher]# docker ps
CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS              PORTS               NAMES
1ec2a3c505f2        homeassistant/home-assistant:stable   "/bin/entry.sh pytho…"   3 weeks ago         Up 2 weeks                              r-Default-lhhomeassistant-1-dbab5a26
ced938ea1548        rancher/dns:v0.17.4                   "/rancher-entrypoint…"   2 months ago        Up 2 weeks                              r-network-services-metadata-dns-1-38d84e73
eb94dde1d8d6        rancher/net:v0.13.17                  "/rancher-entrypoint…"   2 months ago        Up 2 weeks                              r-ipsec-ipsec-connectivity-check-1-4b77301d
4bcf26f72f30        rancher/net:v0.13.17                  "/rancher-entrypoint…"   2 months ago        Up 2 weeks                              r-ipsec-ipsec-router-1-f4bcc896
b74aa9616e8a        rancher/net:v0.13.17                  "/rancher-entrypoint…"   2 months ago        Up 2 weeks                              r-ipsec-cni-driver-1-ab3a2757
d48ee5062cf5        rancher/healthcheck:v0.3.8            "/.r/r /rancher-entr…"   2 months ago        Up 2 weeks                              r-healthcheck-healthcheck-1-ae6db645
62db5898aa6d        rancher/net:holder                    "/.r/r /rancher-entr…"   2 months ago        Up 2 weeks                              r-ipsec-ipsec-1-d6e09ad8
d0834650cc9d        rancher/network-manager:v0.7.22       "/rancher-entrypoint…"   2 months ago        Up 2 weeks                              r-network-services-network-manager-1-2dee2d9b
501d30c5c6c3        rancher/metadata:v0.10.4              "/rancher-entrypoint…"   2 months ago        Up 2 weeks                              r-network-services-metadata-1-53683caf
548954a73e78        rancher/agent:v1.2.11                 "/run.sh run"            2 months ago        Up 2 weeks                              rancher-agent

How can I put this port back to 8080 or complete the change to port 80?

I updated rancher/server and was able to log in the the web UI but after attempting to visit the home page, the server crashed.

logs:

2019-12-25 19:23:38,155 INFO    [main] [ConsoleStatus] [DONE ] [22730ms] Startup Succeeded, Listening on port 8081 
time="2019-12-25T19:23:38Z" level=info msg="Starting rancher-compose-executor" version=v0.14.30 
time="2019-12-25T19:23:38Z" 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" 
time="2019-12-25T19:23:38Z" level=fatal msg="Failed to configure cattle client: Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: connect: connection refused" 
time="2019-12-25T19:23:38Z" level=warning msg="Couldn't load install uuid: Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: getsockopt: connection refused. Sleep 250ms and retry" 
time="2019-12-25T19:23:38Z" level=warning msg="Couldn't load install uuid: Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: getsockopt: connection refused. Sleep 500ms and retry" 
time="2019-12-25T19:23:39Z" level=warning msg="Couldn't load install uuid: Get http://localhost:8080/v2-beta: dial tcp 127.0.0.1:8080: getsockopt: connection refused. Sleep 1s and retry" 
time="2019-12-25T19:23:39Z" level=info msg="Downloading key from http://localhost:8081/v1/scripts/api.crt" 
time="2019-12-25T19:23:39Z" level=info msg="Starting websocket proxy. Listening on [:8080], Proxying to cattle API at [localhost:8081], Monitoring parent pid [10]." 
time="2019-12-25T19:23:39Z" level=info msg="Configured http API filter" 
time="2019-12-25T19:23:39Z" level=info msg="Master config file: master.conf" 
time="2019-12-25T19:23:39Z" level=info msg="Configured authTokenValidator API filter" 
time="2019-12-25T19:23:39Z" level=info msg="Downloading certificate from http://localhost:8081/v1/credentials/1c1/certificate" 
time="2019-12-25T19:23:40Z" level=info msg="Starting go-machine-service..." gitcommit=v0.39.4 service=gms 
time="2019-12-25T19:23:40Z" level=info msg="Waiting for handler registration (1/2)" service=gms 
time="2019-12-25T19:23:40Z" level=info msg="Webhook service listening on 8085" 
time="2019-12-25T19:23:40Z" level=info msg="Starting rancher-compose-executor" version=v0.14.30 
time="2019-12-25T19:23:41Z" level=info msg="Fetch uuid 286a7e60-b606-45fa-9b86-407737c4f10e successfully" 
time="2019-12-25T19:23:41Z" level=info msg="Starting Catalog Service (port 8088, refresh interval 300 seconds)" 
time="2019-12-25T19:23:41Z" level=info msg="Starting Rancher Auth service" 
time="2019-12-25T19:23:42Z" level=info msg="Listening on :8090" 
time="2019-12-25T19:23:43Z" level=info msg="Initializing event router" workerCount=5 
time="2019-12-25T19:23:43Z" level=info msg="Connection established" 
time="2019-12-25T19:23:43Z" level=info msg="Waiting for handler registration (2/2)" service=gms 
time="2019-12-25T19:23:43Z" level=info msg="Starting websocket pings" 
time="2019-12-25T19:23:44Z" level=info msg="Initializing event router" workerCount=250 
time="2019-12-25T19:23:44Z" level=info msg="Connection established" 
time="2019-12-25T19:23:44Z" level=info msg="Starting websocket pings" 
time="2019-12-25T19:23:44Z" level=info msg="Initializing event router" workerCount=250 
time="2019-12-25T19:23:44Z" level=info msg="Connection established" 
time="2019-12-25T19:23:44Z" level=info msg="Starting websocket pings" 
time="2019-12-25T19:23:45Z" level=info msg="Handling backend connection request." 
time="2019-12-25T19:23:45Z" level=info msg="Registering backend for host 4d184ef1-97ca-411c-4e6f-f464cd4a5dd0 with session ID 025e7270-f7ec-4db8-ad2f-2e6b0c5f1231." 
time="2019-12-25T19:23:45Z" level=info msg="Installing builtin drivers" service=gms 
time="2019-12-25T19:23:45Z" level=info msg="Initializing event router" workerCount=250 
time="2019-12-25T19:23:45Z" level=info msg="Connection established" 
time="2019-12-25T19:23:45Z" level=info msg="Starting websocket pings" 
time="2019-12-25T19:23:48Z" level=info msg="Waiting for machinedriver.activate event" service=gms 
time="2019-12-25T19:23:51Z" level=info msg="Waiting for machinedriver.activate event" service=gms 
time="2019-12-25T19:23:54Z" level=info msg="Waiting for machinedriver.activate event" service=gms 
2019-12-25 19:23:55,689 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10->instanceHostMap:7] [instance.start->(InstanceStart)->instancehostmap.activate] [] [ecutorService-1] [c.p.e.p.i.DefaultProcessInstanceImpl] Agent error for [compute.instance.activate.reply;agent=1]: Error response from daemon: driver failed programming external connectivity on endpoint affectionate_mcnulty (1f856286e47261b37077bc4b84897150d191d9fa19d360551e8dc2e58d145634): Bind for 0.0.0.0:8080 failed: port is already allocated 
2019-12-25 19:23:55,690 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10] [instance.start->(InstanceStart)] [] [ecutorService-1] [i.c.p.process.instance.InstanceStart] Failed [1/5] to Starting for instance [10] 
2019-12-25 19:23:56,960 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10->instanceHostMap:7] [instance.start->(InstanceStart)->instancehostmap.activate] [] [ecutorService-1] [c.p.e.p.i.DefaultProcessInstanceImpl] Agent error for [compute.instance.activate.reply;agent=1]: Error response from daemon: driver failed programming external connectivity on endpoint affectionate_mcnulty (d07eac7cbecb2ff6d3f66e565e0917f669f943a6eb82c1682b19b8968aa2289c): Bind for 0.0.0.0:8080 failed: port is already allocated 
2019-12-25 19:23:56,960 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10] [instance.start->(InstanceStart)] [] [ecutorService-1] [i.c.p.process.instance.InstanceStart] Failed [2/5] to Starting for instance [10] 
time="2019-12-25T19:23:57Z" level=info msg="Waiting for machinedriver.activate event" service=gms 
2019-12-25 19:23:58,590 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10->instanceHostMap:7] [instance.start->(InstanceStart)->instancehostmap.activate] [] [ecutorService-1] [c.p.e.p.i.DefaultProcessInstanceImpl] Agent error for [compute.instance.activate.reply;agent=1]: Error response from daemon: driver failed programming external connectivity on endpoint affectionate_mcnulty (45507c61a7b220a685d1956b331af479c4a51739aca297ad10c2958c5b78670e): Bind for 0.0.0.0:8080 failed: port is already allocated 
2019-12-25 19:23:58,590 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10] [instance.start->(InstanceStart)] [] [ecutorService-1] [i.c.p.process.instance.InstanceStart] Failed [3/5] to Starting for instance [10] 
2019-12-25 19:23:59,403 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10->instanceHostMap:7] [instance.start->(InstanceStart)->instancehostmap.activate] [] [ecutorService-1] [c.p.e.p.i.DefaultProcessInstanceImpl] Agent error for [compute.instance.activate.reply;agent=1]: Error response from daemon: driver failed programming external connectivity on endpoint affectionate_mcnulty (b4b8f929513b58cc570ae99a4aeb1df5c2cca1140b23d72cd04b070e2457776b): Bind for 0.0.0.0:8080 failed: port is already allocated 
2019-12-25 19:23:59,403 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10] [instance.start->(InstanceStart)] [] [ecutorService-1] [i.c.p.process.instance.InstanceStart] Failed [4/5] to Starting for instance [10] 
2019-12-25 19:24:00,191 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10->instanceHostMap:7] [instance.start->(InstanceStart)->instancehostmap.activate] [] [ecutorService-1] [c.p.e.p.i.DefaultProcessInstanceImpl] Agent error for [compute.instance.activate.reply;agent=1]: Error response from daemon: driver failed programming external connectivity on endpoint affectionate_mcnulty (4de78e15f3cbc7092e45f17a97d35b01708f0200086223dddf8265332da94962): Bind for 0.0.0.0:8080 failed: port is already allocated 
2019-12-25 19:24:00,191 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10] [instance.start->(InstanceStart)] [] [ecutorService-1] [i.c.p.process.instance.InstanceStart] Failed [5/5] to Starting for instance [10] 
time="2019-12-25T19:24:00Z" level=info msg="machinedriver.activate event detected" service=gms 
time="2019-12-25T19:24:00Z" level=info msg="Downloading all drivers" service=gms 
time="2019-12-25T19:24:00Z" level=info msg="Copying /var/lib/cattle/machine-drivers/1f7058341420e2f525168052818c3f819ff78e9ca5f57d5a650a049bcd5945e9-docker-machine-driver-packet => /usr/local/bin/docker-machine-driver-packet-tmp" service=gms 
2019-12-25 19:24:00,510 ERROR [82f532e6-320b-4833-8a4e-5ae26ecbbff5:2318] [instance:10] [instance.start] [] [ecutorService-1] [c.p.e.p.i.DefaultProcessInstanceImpl] Agent error for [compute.instance.activate.reply;agent=1]: Error response from daemon: driver failed programming external connectivity on endpoint affectionate_mcnulty (4de78e15f3cbc7092e45f17a97d35b01708f0200086223dddf8265332da94962): Bind for 0.0.0.0:8080 failed: port is already allocated 
time="2019-12-25T19:24:00Z" level=info msg="Done downloading all drivers" service=gms 
2019-12-25 19:24:00,722 ERROR [:] [] [] [] [ecutorService-1] [.e.s.i.ProcessInstanceDispatcherImpl] Agent error for [compute.instance.activate.reply;agent=1]: Error response from daemon: driver failed programming external connectivity on endpoint affectionate_mcnulty (4de78e15f3cbc7092e45f17a97d35b01708f0200086223dddf8265332da94962): Bind for 0.0.0.0:8080 failed: port is already allocated 
time="2019-12-25T19:24:05Z" level=info msg="Shutting down backend 4d184ef1-97ca-411c-4e6f-f464cd4a5dd0. Connection closed because: read tcp 172.17.0.2:8080->172.17.0.1:60718: read: connection reset by peer." 
time="2019-12-25T19:24:05Z" level=info msg="Removed backend. Key: 4d184ef1-97ca-411c-4e6f-f464cd4a5dd0. Session ID 025e7270-f7ec-4db8-ad2f-2e6b0c5f1231 ." 
2019-12-25 19:24:29,095 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [3] 
2019-12-25 19:24:34,100 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [4] 
2019-12-25 19:24:39,104 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [5] 
2019-12-25 19:24:44,111 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [6] 
2019-12-25 19:24:44,113 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Scheduling reconnect for agent [1] host [1] count [6] 
2019-12-25 19:24:49,193 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [7] 
2019-12-25 19:24:54,198 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [8] 
2019-12-25 19:24:59,208 ERROR [:] [] [] [] [TaskScheduler-1] [i.c.p.a.s.ping.impl.PingMonitorImpl ] Failed to get ping from agent [1] count [9] 
time="2019-12-25T19:25:11Z" level=info msg="Handling backend connection request." 
time="2019-12-25T19:25:11Z" level=info msg="Registering backend for host 4d184ef1-97ca-411c-4e6f-f464cd4a5dd0 with session ID 579ac92f-cfea-4f7d-9516-309a08e57ea1." 
2019/12/25 19:25:45 http: proxy error: context canceled

There is a lot going on, can you please specify what you did exactly in order and what exact commands . you ran at each step?

The only thing I did to cause the issue was change the port in the page mentioned above.

I’ve managed to get back up and running by recreating the containers and basically starting from scratch.

Hi,
you could also consider putting an nginx container in front of the rancher server, mapping port 80 of the reverse proxy to port 8080 of the rancher server.
This has the typical added benefits of a solid reverse proxy.

Regards,
Alex