Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC not starting with default environment on regtest when using Docker #3695

Closed
infinitis opened this issue May 2, 2020 · 3 comments
Closed

Comments

@infinitis
Copy link

Issue and Steps to Reproduce

I've been trying to connect to the RPC when connecting to a bitcoin core node in regtest mode and been running into an issue where the inotifywait call in the tools/docker-entrypoint.sh is not returning and the RPC server is never started.

I've set up a docker image based on yours which connects to a remote bitcoin core node, which calls a custom entrypoint script (also attached) which then calls your entrypoint script.

Here is the command I use to start the image:
docker run --rm -p "9835:9835" -e EXPOSE_TCP=true clightning

Here is the log output:

C-Lightning starting
2020-05-02T18:06:08.926Z UNUSUAL lightningd: Creating configuration directory /root/.lightning/regtest
2020-05-02T18:06:08.926Z UNUSUAL lightningd: Creating configuration directory /root/.lightning/regtest
2020-05-02T18:06:09.020Z INFO database: Creating database
2020-05-02T18:06:09.203Z UNUSUAL hsmd: HSM: created new hsm_secret file
2020-05-02T18:06:09.474Z UNUSUAL plugin-bcli: Could not connect to 'lightning-rpc': No such file or directory
2020-05-02T18:06:09.474Z INFO plugin-bcli: bitcoin-cli initialized and connected to bitcoind.
2020-05-02T18:06:09.535Z UNUSUAL lightningd: Unable to estimate opening fees
2020-05-02T18:06:09.535Z UNUSUAL lightningd: Unable to estimate mutual_close fees
2020-05-02T18:06:09.536Z UNUSUAL lightningd: Unable to estimate unilateral_close fees
2020-05-02T18:06:09.537Z UNUSUAL lightningd: Unable to estimate delayed_to_us fees
2020-05-02T18:06:09.538Z UNUSUAL lightningd: Unable to estimate htlc_resolution fees
2020-05-02T18:06:09.538Z UNUSUAL lightningd: Unable to estimate penalty fees
2020-05-02T18:06:09.538Z UNUSUAL lightningd: Unable to estimate min_acceptable fees
2020-05-02T18:06:09.538Z UNUSUAL lightningd: Unable to estimate max_acceptable fees
2020-05-02T18:06:09.715Z INFO lightningd: --------------------------------------------------
2020-05-02T18:06:09.716Z INFO lightningd: Server started with public key 023448917df441be93750cbc4dba77a8a672ca6a54986a11f318bf40fad48724e9, alias YELLOWMONKEY (color #023448) and lightningd v0.8.0rc2-506-gfc86720
2020-05-02T18:06:39.614Z UNUSUAL lightningd: Unable to estimate opening fees
2020-05-02T18:06:39.614Z UNUSUAL lightningd: Unable to estimate mutual_close fees
2020-05-02T18:06:39.614Z UNUSUAL lightningd: Unable to estimate unilateral_close fees
2020-05-02T18:06:39.614Z UNUSUAL lightningd: Unable to estimate delayed_to_us fees
2020-05-02T18:06:39.614Z UNUSUAL lightningd: Unable to estimate htlc_resolution fees
2020-05-02T18:06:39.614Z UNUSUAL lightningd: Unable to estimate penalty fees
2020-05-02T18:06:39.614Z UNUSUAL lightningd: Unable to estimate min_acceptable fees
2020-05-02T18:06:39.615Z UNUSUAL lightningd: Unable to estimate max_acceptable fees

If I then use the following to open a shell in the container:
docker exec -it [container id] bash

and run:
touch /root/.lightning/lightning-rpc

the inotifywait call in the entrypoint script returns and starts the rpc server:

2020-05-02T18:14:40.856Z UNUSUAL lightningd: Unable to estimate min_acceptable fees
2020-05-02T18:14:40.857Z UNUSUAL lightningd: Unable to estimate max_acceptable fees
C-Lightning started
C-Lightning started, RPC available on port 9835
lightningd "$@"

Think this is probably just because the inotifywait call is not finding the lightning-rpc file in regtest directory.

getinfo output

{
"id": "023448917df441be93750cbc4dba77a8a672ca6a54986a11f318bf40fad48724e9",
"alias": "YELLOWMONKEY",
"color": "023448",
"num_peers": 0,
"num_pending_channels": 0,
"num_active_channels": 0,
"num_inactive_channels": 0,
"address": [],
"binding": [
{
"type": "ipv6",
"address": "::",
"port": 9735
},
{
"type": "ipv4",
"address": "0.0.0.0",
"port": 9735
}
],
"version": "v0.8.0rc2-506-gfc86720",
"blockheight": 1000,
"network": "regtest",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/root/.lightning/regtest"
}

@joemphilips
Copy link
Contributor

I think this is now fixed by #3813

@ZmnSCPxj
Copy link
Contributor

I agree with jeomphilips. Can you double-check if applying that patch fixes this issue?

@infinitis
Copy link
Author

Agreed, thanks. Closing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants