彦祖们,我使用这个仓库: https://github.com/nacos-group/nacos-docker/blob/master/README_ZH.md
提供的 docker-compose.yml 去启动 nacos 集群
日志显示 nacos 启动正常了
nacos1 |
nacos1 | ,--.
nacos1 | ,--.'|
nacos1 | ,--,: : | Nacos 2.0.3
nacos1 | ,`--.'`| ' : ,---. Running in cluster mode, All function modules
nacos1 | | : : | | ' ,'\ .--.--. Port: 8848
nacos1 | : | \ | : ,--.--. ,---. / / | / / ' Pid: 1
nacos1 | | : ' '; | / \ / \. ; ,. :| : /`./ Console: http://nacos1:8848/nacos/index.html
nacos1 | ' ' ;. ;.--. .-. | / / '' | |: :| : ;_
nacos1 | | | | \ | \__\/: . .. ' / ' | .; : \ \ `. https://nacos.io
nacos1 | ' : | ; .' ," .--.; |' ; :__| : | `----. \
nacos1 | | | '`--' / / ,. |' | '.'|\ \ / / /`--' /
nacos1 | ' : | ; : .' \ : : `----' '--'. /
nacos1 | ; |.' | , .-./\ \ / `--'---'
nacos1 | '---' `--`---' `----'
nacos1 |
nacos3 | 2022-01-22 11:37:37,117 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:38,133 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:39,151 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:40,175 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:41,223 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:42,272 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:43,374 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:44,659 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:45,904 INFO Nacos is starting...
nacos3 |
nacos3 | 2022-01-22 11:37:48,495 INFO Nacos is starting...
nacos3 |
但是我怎么访问 nacos 的控制台呢?
http://127.0.0.1:8848/nacos/index.html 访问不了
http://nacos1:8848/nacos/index.html 更访问不了(因为我压根没有 nacos1 这个 host )
我本地 ifconfig 显示有多个网卡
➜ ~ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=1203<RXCSUM,TXCSUM,TXSTATUS,SW_TIMESTAMP>
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=201<PERFORMNUD,DAD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:de:48:00:11:22
inet6 fe80::aede:48ff:fe00:1122%en5 prefixlen 64 scopeid 0x4
nd6 options=201<PERFORMNUD,DAD>
media: autoselect (100baseTX <full-duplex>)
status: active
ap1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether b2:9c:4a:cc:e4:9c
media: autoselect
status: inactive
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 90:9c:4a:cc:e4:9c
inet6 fe80::6d:3c00:f311:eed%en0 prefixlen 64 secured scopeid 0x7
inet 10.30.60.53 netmask 0xffffff00 broadcast 10.30.60.255
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
en8: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether ba:b2:eb:c7:a3:44
media: autoselect <full-duplex>
status: inactive
en9: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether ba:b2:eb:c7:a3:45
media: autoselect <full-duplex>
status: inactive
en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether ba:b2:eb:c7:a3:41
media: autoselect <full-duplex>
status: inactive
en4: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
options=460<TSO4,TSO6,CHANNEL_IO>
ether ba:b2:eb:c7:a3:40
media: autoselect <full-duplex>
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether ba:b2:eb:c7:a3:41
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en3 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 10 priority 0 path cost 0
member: en4 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 11 priority 0 path cost 0
member: en8 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 8 priority 0 path cost 0
member: en9 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 9 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: <unknown type>
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
options=400<CHANNEL_IO>
ether 02:9c:4a:cc:e4:9c
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
options=400<CHANNEL_IO>
ether 52:bf:d6:37:e4:e1
inet6 fe80::50bf:d6ff:fe37:e4e1%awdl0 prefixlen 64 scopeid 0xe
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
llw0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=400<CHANNEL_IO>
ether 52:bf:d6:37:e4:e1
inet6 fe80::50bf:d6ff:fe37:e4e1%llw0 prefixlen 64 scopeid 0xf
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1380
inet6 fe80::9e4e:800a:5b29:1e0d%utun0 prefixlen 64 scopeid 0x10
nd6 options=201<PERFORMNUD,DAD>
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 2000
inet6 fe80::c370:7e36:ee82:4eca%utun1 prefixlen 64 scopeid 0x11
nd6 options=201<PERFORMNUD,DAD>
en7: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=404<VLAN_MTU,CHANNEL_IO>
ether 00:0e:c6:6f:94:ac
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: inactive
本质上还是对 docker 不熟悉。求彦祖解答,比心♥️
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.