blazerguns
Dabbler
- Joined
- Mar 15, 2017
- Messages
- 13
Hi All,
I am trying to use the docker subsystem to learn more about docker. I followed the documentation http://doc.freenas.org/11/vms.html#docker-rancher-vm all the way. The only deviation I took is based on https://forums.freenas.org/index.ph...s-11-1-rancheros-docker-rancherui-plex.59963/ to set static IP. By default it looks like dhcp address is assigned which is not convenient.
Just before I ran the command
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
I did the above steps.
Finally ran
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
This looks like success to me.
I rebooted the VM so that I get the static ip 192.168.1.6 assigned. After reboot,
#ifconfig
I waited for 20 minutes and then tried 192.168.1.6:8080 but the browser would fail with "192.168.1.6 didn’t send any data."
When I did netstat -atn
Clearly 8080 is not bound to ipv4 0.0.0.0. Can anyone help? What am I doing wrong here?
I am running FreenNAS 11.1U1
I am trying to use the docker subsystem to learn more about docker. I followed the documentation http://doc.freenas.org/11/vms.html#docker-rancher-vm all the way. The only deviation I took is based on https://forums.freenas.org/index.ph...s-11-1-rancheros-docker-rancherui-plex.59963/ to set static IP. By default it looks like dhcp address is assigned which is not convenient.
Just before I ran the command
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
I did the above steps.
Code:
[rancher@rancher ~]$ sudo ros config set rancher.network.interfaces.eth0.address 192.168.1.6/24 sudo ros config set rancher.network.interfaces.eth0.gateway 192.168.1.254 sudo ros config set rancher.network.interfaces.eth0.mtu 1500 sudo ros config set rancher.network.interfaces.eth0.dhcp false
Finally ran
sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server
Code:
Unable to find image 'rancher/server:latest' locally latest: Pulling from rancher/server bae382666908: Pull complete 29ede3c02ff2: Pull complete da4e69f33106: Pull complete 8d43e5f5d27f: Pull complete b0de1abb17d6: Pull complete 422f47db4517: Pull complete 79d37de643ce: Pull complete 69d13e08a4fe: Pull complete 2ddfd3c6a2b7: Pull complete bc433fed3823: Pull complete b82e188df556: Pull complete dae2802428a4: Pull complete a6247572ea3c: Pull complete 884c916ebae4: Pull complete 85517c9c5365: Pull complete 02dded9fe690: Pull complete fd9f433c3bc6: Pull complete 44d91b3fea45: Pull complete 0d463387dfeb: Pull complete 60753c4d26f0: Pull complete a003892966fe: Pull complete Digest: sha256:42441f0128fae4d72d51f92de2049392427d462356282a46f28434332967c7e4 Status: Downloaded newer image for rancher/server:latest e9958cbc517e92688e08bfc07b48b1396d00bbeb24c8e339a725baa1bac50105
This looks like success to me.
I rebooted the VM so that I get the static ip 192.168.1.6 assigned. After reboot,
#ifconfig
Code:
[rancher@rancher log]$ ifconfig docker-sys Link encap:Ethernet HWaddr 00:00:00:00:00:00 inet addr:172.18.42.2 Bcast:172.18.255.255 Mask:255.255.0.0 inet6 addr: fe80::8830:41ff:fe86:ec63/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:216 (216.0 B) TX bytes:688 (688.0 B) docker0 Link encap:Ethernet HWaddr 02:42:FA:ED:C8:76 inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 inet6 addr: fe80::42:faff:feed:c876/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:54 errors:0 dropped:0 overruns:0 frame:0 TX packets:85 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1968 (1.9 KiB) TX bytes:6214 (6.0 KiB) eth0 Link encap:Ethernet HWaddr 00:A0:98:24:D7:11 inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8237 errors:0 dropped:0 overruns:0 frame:0 TX packets:372 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1285207 (1.2 MiB) TX bytes:29376 (28.6 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) vethcfabf39 Link encap:Ethernet HWaddr 42:90:15:A2:3F:8E inet6 addr: fe80::4090:15ff:fea2:3f8e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:13 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:1038 (1.0 KiB)
I waited for 20 minutes and then tried 192.168.1.6:8080 but the browser would fail with "192.168.1.6 didn’t send any data."
When I did netstat -atn
Code:
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 :::8080 :::* LISTEN tcp 0 0 :::22 :::* LISTEN
Clearly 8080 is not bound to ipv4 0.0.0.0. Can anyone help? What am I doing wrong here?
I am running FreenNAS 11.1U1