btcd in simnet mode showing bad cerficiate. #2033
Replies: 3 comments 1 reply
-
You don't need to generate a certificate, btcd will do that for you. Then you have to specify that in btcwallet when connecting.
This probably just means you don't have ipv6 networking enabled within the container but are trying to listen on an ipv6 address. |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
Yes, just start You can also use Going to convert this to a discussion as this sounds like troubleshooting and not an issue with |
Beta Was this translation helpful? Give feedback.
-
Hi:
I want to test lighting network on Docker image. But I have some issues to set it up.
root@60945d60a592:
/.btcd# /root/go/bin/gencerts --host=localhost --directory=/root/.btcd --force/.btcd# cat btcd.confroot@60945d60a592:
[Application Options]
rpcuser=yourusername
rpcpass=yourpassword
simnet=1
root@60945d60a592:
/.btcd# ls -l /root/.btcd/rpc*/.btcd#-rw-r--r-- 1 root root 887 Sep 18 20:08 /root/.btcd/rpc.cert
-rw------- 1 root root 365 Sep 18 20:08 /root/.btcd/rpc.key
root@60945d60a592:
Then I launch btcd daemon to read the config file:
btcd --configfile=/root/.btcd/btcd.conf
2023-09-18 19:53:21.028 [INF] BTCD: Version 0.23.3-beta
2023-09-18 19:53:21.028 [INF] BTCD: Loading block database from '/root/.btcd/data/simnet/blocks_ffldb'
2023-09-18 19:53:21.049 [INF] BTCD: Block database loaded
2023-09-18 19:53:21.052 [INF] INDX: Committed filter index is enabled
2023-09-18 19:53:21.053 [INF] CHAN: Loading block index...
2023-09-18 19:53:21.053 [INF] CHAN: Chain state (height 0, hash 683e86bd5c6d110d91b94b97137ba6bfe02dbbdb8e3dff722a669b5d69d77af6, totaltx 1, work 2)
2023-09-18 19:53:21.057 [WRN] RPCS: Can't listen on [::1]:18556: listen tcp6 [::1]:18556: bind: cannot assign requested address
2023-09-18 19:53:21.057 [INF] RPCS: RPC server listening on 127.0.0.1:18556
2023-09-18 19:53:21.058 [INF] AMGR: Loaded 0 addresses from file '/root/.btcd/data/simnet/peers.json'
2023-09-18 19:53:21.058 [INF] CMGR: Server listening on 0.0.0.0:18555
2023-09-18 19:53:21.058 [INF] CMGR: Server listening on [::]:18555
2023/09/18 19:53:27 http: TLS handshake error from 127.0.0.1:48722: remote error: tls: bad certificate
2023/09/18 19:54:27 http: TLS handshake error from 127.0.0.1:36374: remote error: tls: bad certificate
2023/09/18 19:55:27 http: TLS handshake error from 127.0.0.1:50224: remote error: tls: bad certificate
2023/09/18 19:56:27 http: TLS handshake error from 127.0.0.1:51260: remote error: tls: bad certificate
2023/09/18 19:57:27 http: TLS handshake error from 127.0.0.1:50722: remote error: tls: bad certificate
2023/09/18 19:58:27 http: TLS handshake error from 127.0.0.1:34688: remote error: tls: bad certificate
2023/09/18 19:59:27 http: TLS handshake error from 127.0.0.1:49148: remote error: tls: bad certificate
2023/09/18 20:00:27 http: TLS handshake error from 127.0.0.1:48996: remote error: tls: bad certificate
2023/09/18 20:01:27 http: TLS handshake error from 127.0.0.1:42000: remote error: tls: bad certificate
2023/09/18 20:02:27 http: TLS handshake error from 127.0.0.1:56724: remote error: tls: bad certificate
2023/09/18 20:03:27 http: TLS handshake error from 127.0.0.1:48854: remote error: tls: bad certificate
2023/09/18 20:04:27 http: TLS handshake error from 127.0.0.1:49388: remote error: tls: bad certificate
2023/09/18 20:05:27 http: TLS handshake error from 127.0.0.1:51190: remote error: tls: bad certificate
2023/09/18 20:06:27 http: TLS handshake error from 127.0.0.1:55028: remote error: tls: bad certificate
2023/09/18 20:07:27 http: TLS handshake error from 127.0.0.1:54364: remote error: tls: bad certificate
2023/09/18 20:08:27 http: TLS handshake error from 127.0.0.1:50830: remote error: tls: bad certificate
2023/09/18 20:09:27 http: TLS handshake error from 127.0.0.1:48612: remote error: tls: bad certificate
2023/09/18 20:10:27 http: TLS handshake error from 127.0.0.1:40412: remote error: tls: bad certificate
2023/09/18 20:11:27 http: TLS handshake error from 127.0.0.1:40282: remote error: tls: bad certificate
......
From my experience, I can't use openssl to generate any cerficate, since I always get error: root@60945d60a592:~/.btcd# btcctl --rpcuser=rpcuser --rpcpass=regtest --rpcserver=127.0.0.1:18334 getblockchaininfo
Post "https://127.0.0.1:18334": x509: cannot validate certificate for 127.0.0.1 because it doesn't contain any IP SANs
The certificate generated by openssl did not have IP SAN, it is for sure, I check the certificate, and I can't find any IP SAN; but using gencerts --host=localhost --directory=/root/.btcd --force => This also failed.
How to fix this?
My enviroment: OS: Windows 10 (22H2); Docker desktop: version: 4.23.0 (latest); btcd version: Version 0.23.3-beta.
Btcwallet: Version 0.15.1-alpha
I don't know if the btcd needs specific version to work with btcwallet.
Any solution for this issue?
Beta Was this translation helpful? Give feedback.
All reactions