When I dfx start
, I get the following output:
...
Dashboard: http://localhost:50383/_/dashboard
So my first assumption was that the replica was being served on :50383
, although I was then confused by /_/dashboard
. Since /_/dashboard
appears nowhere in the spec, I assumed it was some other process that bound on that port to provide extra info. Visiting the address, I see the following:
Http Server Config
Config { listen_addr: 127.0.0.1:0, port_file_path: ... }
which suggests that the replica just binds to 0
and then reports the port it was assigned. Unfortunately for me, if port_file_path
was ever written, it was gone by the time I tried reading it.
I then turned to OS tools, and discovered that 4 different ports were bound:
$ sudo lsof -iTCP -sTCP:LISTEN -n -P
...
replica 21209 nicolas 43u IPv4 0x49f94277d571ae23 0t0 TCP 127.0.0.1:50381 (LISTEN)
replica 21209 nicolas 44u IPv4 0x49f94277d57197e3 0t0 TCP *:50382 (LISTEN)
replica 21209 nicolas 45u IPv6 0x49f94277d56a5afb 0t0 TCP *:50383 (LISTEN)
icx-proxy 21211 nicolas 9u IPv4 0x49f94277d571cf83 0t0 TCP 127.0.0.1:4943 (LISTEN)
It looks like only 50383
is actually the replica, since it’s the only one that actually output some status (as per the spec):
~$ curl 127.0.0.1:50381/api/v2/status
curl: (52) Empty reply from server
~$ curl 127.0.0.1:50382/api/v2/status
curl: (52) Empty reply from server
~$ curl 127.0.0.1:50383/api/v2/status
+��|ic_api_versionf0.18.0hroot_keyX�0��0...
Couple questions:
- What is this
/_/dashboard
, and is that served by the replica itself? If so, where (ideally in the spec) can I read more about it? - What are the other two “replica” ports
50381
and50382
?