Lotus daemon --api setting overrides LOTUS_API_LISTENADDRESS without warning #12545
Open
5 of 11 tasks
Labels
good first issue
Good for newcomers
Checklist
Latest release
, the most recent RC(release canadiate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.Lotus component
Lotus Version
Repro Steps
lotus daemon
with env variableLOTUS_API_LISTENADDRESS
set to/ip4/0.0.0.0/tcp/1234/http
.daemon
--api
setting as--api=1234
.Failed to connect to <redacted IP>: Connection refused
.Describe the Bug
Hi there!
I'm new to this space and I found a potential bug when setting up a Lotus full node. My issue was that when I tried to connect my Prometheus (running on another machine) to the Lotus node, to scrape its
/debug/metrics
endpoint, it was not getting through.What I found was that the
--api=1234
CLI arg to thelotus daemon
command overrides the env var I had set for the service running the daemon. It both overrides the env var's port and address, even though the setting only is for the port. E.g. even though I had specified0.0.0.0
for the listen address in the env, it still ended up being127.0.0.1:1234
.I don't know if this is intended or not, but either way it would be helpful if the
lotus daemon
prints what address/port it listens to when starting (kind of like the gateway printssetting up API endpoint at 0.0.0.0:2346
). And perhaps even more helpful if a warning is printed in case an override occurs.There aren't really any logs directly connected to the issue so I'll put the startup message from
lotus daemon
below.Logging Information
The text was updated successfully, but these errors were encountered: