shenxn / protonmail-bridge-docker

ProtonMail IMAP/SMTP Bridge Docker container
GNU General Public License v3.0
378 stars 77 forks source link

Address already in use #29

Open xLogiiCx opened 3 years ago

xLogiiCx commented 3 years ago

Hello, i am receiving this error unless what port i try to use.

root@e8540edef0e8:/protonmail# ./entrypoint.sh init
+ [[ init == init ]]
+ gpg --generate-key --batch /protonmail/gpgparams
gpg: Generating a basic OpenPGP key
gpg: key 66D0CF59697E5CC0 marked as ultimately trusted
gpg: revocation certificate stored as '/root/.gnupg/openpgp-revocs.d/6B4BC06C112F112E436438A566D0CF59697E5CC0.rev'
gpg: done
+ pass init pass-key
Password store initialized for pass-key
+ protonmail-bridge --cli
root@e8540edef0e8:/protonmail# ./entrypoint.sh login
+ [[ login == init ]]
+ socat TCP-LISTEN:25,fork TCP:127.0.0.1:1025
+ rm -f faketty
+ socat TCP-LISTEN:143,fork TCP:127.0.0.1:1143
+ mkfifo faketty
2021/04/18 19:40:27 socat[154] E bind(5, {AF=2 0.0.0.0:25}, 16): Address already in use
2021/04/18 19:40:27 socat[155] E bind(5, {AF=2 0.0.0.0:143}, 16): Address already in use
+ cat faketty
+ protonmail-bridge --cli

It just stays like this afterwards.

shenxn commented 3 years ago

Hoe did you start the container?

xLogiiCx commented 3 years ago
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='protonmail-bridge' --net='br0' --ip='192.168.178.179' -e TZ="Europe/Berlin" -e HOST_OS="Unraid" -e 'TCP_PORT_25'='25' -e 'TCP_PORT_143'='143' -v '/mnt/user/appdata/protonmail-bridge/':'/root':'rw' 'shenxn/protonmail-bridge'

using Unraid btw.

shenxn commented 3 years ago

Can you try add init option directly to your docker command instead of run entrypoint inside the image?

Jawbone220 commented 3 years ago

You are probably trying to map 25 and 143 to your host in the Unraid Template - try mapping 1025 and 1143 instead

camps7ee commented 2 years ago

This is most likely happening because you have a duplicate running, run top to generate your list (whilst inside your docker container of course docker exec -it protonmail-bridge bash)

When you've found protonmail-bridge and proton-bridge kill them with kill <PID1 PID2>.