PurpleI2P / i2pd

🛡 I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website
BSD 3-Clause "New" or "Revised" License
3.25k stars 423 forks source link

"Daemon: Failed to start Transports" with Docker image `2.45.0` #1801

Closed schildbach closed 1 year ago

schildbach commented 1 year ago

I upgraded the Docker image from 2.43.0 to 2.44.0.

Now I get these errors and i2pd exits.

Downgraded back to 2.43.0 and it works again.

i2pd_1              | 19:37:37@181/none - i2pd v2.44.0 (0.9.56) starting...
i2pd_1              | 19:37:37@181/error - router.info is malformed. Creating new
i2pd_1              | 19:37:37@181/error - RouterInfo: Can't open file 
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.diva.exchange
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.memcpy.io
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.diva.exchange
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.diva.exchange
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.onion.im
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to www2.mk16.de
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.diva.exchange
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.memcpy.io
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.diva.exchange
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/error - Reseed: Failed to connect to reseed.memcpy.io
i2pd_1              | 19:37:37@181/warn - Reseed: SU3 download failed
i2pd_1              | 19:37:37@181/warn - Reseed: Failed to reseed from servers after 10 attempts
i2pd_1              | 19:37:37@181/warn - Reseed: Failed to reseed from servers
i2pd_1              | 19:37:37@181/error - Daemon: Failed to start Transports
i2pd_1              | 19:37:37@78/warn - Transports: 15 ephemeral keys generated at the time
i2pd_1              | terminate called without an active exception
r4sas commented 1 year ago

Hmm... looks like something wrong with DNS lookup on alpine base image... Can you check if alpine image doesn't have DNS lookup problems?

schildbach commented 1 year ago

How do you mean? I used docker build contrib/docker/ for building. contrib/docker/Dockerfile is Alpine-based.

r4sas commented 1 year ago

I mean start container with alpine:latest image and check resolving in it.

schildbach commented 1 year ago

Seems fine:

# docker run -it alpine:latest nslookup router.info
Server:         192.168.178.1
Address:        192.168.178.1:53

Non-authoritative answer:
Name:   router.info
Address: 172.67.131.116
Name:   router.info
Address: 104.21.10.109

Non-authoritative answer:
Name:   router.info
Address: 2606:4700:3032::6815:a6d
Name:   router.info
Address: 2606:4700:3037::ac43:8374
# docker run -it --entrypoint="" myrepo/i2pd:2.43.0 nslookup router.info
Server:         192.168.178.1
Address:        192.168.178.1:53

Non-authoritative answer:
Name:   router.info
Address: 2606:4700:3032::6815:a6d
Name:   router.info
Address: 2606:4700:3037::ac43:8374

Non-authoritative answer:
Name:   router.info
Address: 104.21.10.109
Name:   router.info
Address: 172.67.131.116
# docker run -it --entrypoint="" myrepo/i2pd:2.44.0 nslookup router.info
Server:         192.168.178.1
Address:        192.168.178.1:53

Non-authoritative answer:
Name:   router.info
Address: 104.21.10.109
Name:   router.info
Address: 172.67.131.116

Non-authoritative answer:
Name:   router.info
Address: 2606:4700:3037::ac43:8374
Name:   router.info
Address: 2606:4700:3032::6815:a6d
r4sas commented 1 year ago

router.info is not domain, this is file inside i2pd datadir. Check with reseed domains in list (Reseed: Failed to connect to).

schildbach commented 1 year ago

Again, no problem:

# docker run -it --entrypoint="" alpine:latest nslookup reseed.diva.exchange
Server:         192.168.178.1
Address:        192.168.178.1:53

Non-authoritative answer:
Name:   reseed.diva.exchange
Address: 80.74.145.70

Non-authoritative answer:
Name:   reseed.diva.exchange
Address: 2a00:1128:0:145::70
# docker run -it --entrypoint="" myrepo/i2pd:2.44.0 nslookup reseed.diva.exchange
Server:         192.168.178.1
Address:        192.168.178.1:53

Non-authoritative answer:
Name:   reseed.diva.exchange
Address: 80.74.145.70

Non-authoritative answer:
Name:   reseed.diva.exchange
Address: 2a00:1128:0:145::70
r4sas commented 1 year ago

Can you re-check with 2.45.0?

schildbach commented 1 year ago

Can you re-check with 2.45.0?

Same problem with 2.45.0.

schildbach commented 1 year ago

I've set the more relevant error message as the title of this issue.

r4sas commented 1 year ago

I can't reproduce:

# docker run --name i2pd -it purplei2p/i2pd:latest-amd64 --loglevel debug --log stdout
01:11:43@989/info - Log: Logging level set to debug
01:11:43@989/none - i2pd v2.45.0 (0.9.57) starting...
01:11:43@989/debug - FS: Main config file: /home/i2pd/data/i2pd.conf
01:11:43@989/debug - FS: Data directory: /home/i2pd/data
01:11:43@989/debug - FS: Certificates directory: /home/i2pd/data/certificates
01:11:43@989/info - AESNI enabled
01:11:43@989/info - AVX disabled
01:11:43@989/info - Daemon: bandwidth set to 'low'
01:11:43@989/info - Daemon: Using system limit in 1048576 max open files
01:11:43@989/info - Daemon: Starting NetDB
01:11:43@989/info - Family: 6 certificates loaded
01:11:43@989/info - NetDb: 0 routers loaded (0 floodfils)
01:11:43@989/info - Reseed: 13 certificates loaded
01:11:43@989/error - RouterInfo: Can't open file
01:11:43@989/info - Reseed: Downloading SU3 from https://banana.incognet.io/i2pseeds.su3
01:11:43@989/debug - Reseed: Connected to banana.incognet.io:443
01:11:43@989/debug - Reseed: Got 111370 bytes of data from https://banana.incognet.io:443/i2pseeds.su3
...
01:11:43@989/info - Daemon: Starting Transports
01:11:43@989/info - NTCP2: Proxy is not used
01:11:43@989/info - NTCP2: Start listening v4 TCP port XXXXX
01:11:43@989/info - SSU2: Start listening on 0.0.0.0:XXXXX
01:11:43@989/info - Transports: Started peer test IPv4
01:11:43@989/info - Daemon: Transports started
01:11:43@989/info - Daemon: Starting Webconsole at 0.0.0.0:7070
01:11:43@989/info - Daemon: Starting Tunnels
01:11:43@989/info - Daemon: Starting Client
...
# docker version
Client: Docker Engine - Community
 Version:           20.10.1
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        831ebea
 Built:             Tue Dec 15 04:34:48 2020
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:17 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.7
  GitCommit:        0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb
 runc:
  Version:          1.1.3
  GitCommit:        v1.1.3-0-g6724737
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
schildbach commented 1 year ago

It seems i2pd "failed to start transports" because the only transport that I had configured was removed from i2pd.

I guess a warning in the log that no transport is configured would have helped with debugging this.