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

Container loses access to PIA (port-forwarding) intermittently and repeatedly: BindPort error / there has been a fatal error #1445

Closed
superkrups20056 opened this issue Nov 1, 2020 · 15 comments

Comments

@superkrups20056
Copy link

superkrups20056 commented Nov 1, 2020

My container loses connection randomly.
I am running the latest version of docker and am on the :latest build
It searches for a new port after is loses connection and sometimes it can't find one leading to a fatal error.
I'm running PIA with port forwarding enabled. I use Synology.

The pertinent log is attached. Notice what happens after half an hour after I start my container.

Screen Shot 2020-10-31 at 9 48 22 PM

Transmission copy.txt

@JB09
Copy link

JB09 commented Nov 3, 2020

Same issue, usually starts happening for me after the container has been running for over 24 hours.

the has been a fatal_error the port has been bound to 43540 Mon Nov 2 16:49:31 EST 2020 curl: (28) Connection timed out after 15001 milliseconds Mon Nov 2 17:10:23 EST 2020: bindPort error

@dalloro
Copy link

dalloro commented Nov 4, 2020

Same issue.

@zoidd
Copy link

zoidd commented Nov 4, 2020

same issue as well after 24 hours, restarting the container temporarily fixes it.

@ozhound
Copy link

ozhound commented Nov 5, 2020

I too have been having this issue for the last couple of days. The container doesnt crash it just starts reporting cant connect to trackers. (im using synology docker)
image

That just repeats over and over till i restart the container

I tried using the TCP package from PIA but i cant get it to stick on the container. i delete the ovpn files and copy the tcp ones over and they just get replaced when the container restarts. cant figure out how to force them to stick)

its pretty frustrating.

@oodport
Copy link

oodport commented Nov 6, 2020

Latest docker on arm64 with PIA. Similar issue, however this is on a brand new container and it happens right away.
This occurs with all of the US configs I have tried (US New York, US New Jersey, US Chicago, US Florida, US Atlanta), HOWEVER, the container is able to connect when I use a European config (UK London, France, Spain), so this maybe this is a PIA issue.

@oodport
Copy link

oodport commented Nov 6, 2020

It's probably my ISP (WoW) blocking the PIA nextgen US servers..

@ozhound
Copy link

ozhound commented Nov 6, 2020

I can connect fine to Sweden, Romania and Switzerland. (I've not tried any stateside end points)
it just looses connectivity anywhere between 1-60 minutes.

@steve-spiteri
Copy link

steve-spiteri commented Nov 6, 2020

I face a similar issue using PIA and having the container running for an extended period of time.

You can see in openvpn/pia/update-port.sh the following in the bind_port () function:

  if [ "$(echo $pf_bind | jq -r .status)" = "OK" ]; then
    echo "the port has been bound to $pf_port  $(date)"		
  else  
    echo "$(date): bindPort error"
    echo $pf_bind
    echo "the has been a fatal_error"
  fi

Judging from the blank line in the log you can see that the pf_bind variable appears empty. I am still trying to narrow down what is causing the error in the pf_bind variable assignment.

I was having another issue from the container inexplicably creating a second tunnel interface which caused a bunch of problems with the health check script. #1462
It might be prudent to try some of the troubleshooting from there to see if you also have a second tunnel interface.

pf_host=$(ip route | head -1 | grep tun | awk '{ print $3 }')

I am wondering if this is related and in the pf_host variable assignment it is getting the wrong tunnel interface. I will attempt to validate.

@ozhound
Copy link

ozhound commented Nov 7, 2020

I checked if there where 2 TUN interfaces and there is not. so that rules that out

@haugene
Copy link
Owner

haugene commented Nov 8, 2020

Hey. We've had some stability issues, and PIA has had some too. I would appreciate it if you could test with port-forwarding and health checks disabled. If that runs and is stable then you can try to activate them one by one and see when instability arises. Disable port forwarding by adding the environment variable:

DISABLE_PORT_UPDATER=yes

To disable health checks add --no-healthcheck to your Docker run command or in docker-compose:

healthcheck:
  disable: true

As for the RESOLVE: Cannot resolve host address error, that's DNS issue. Try to either specify the --dns flags as described in the documentation. Or add:

OVERRIDE_DNS_1=8.8.8.8
OVERRIDE_DNS_2=8.8.4.4

@reprz
Copy link

reprz commented Nov 8, 2020

I´m also having this fatal error issue at the moment. I´m testing now with "--no-healthcheck" enabled. Let´s see what happens.

@reprz
Copy link

reprz commented Nov 8, 2020

So far I´ve been running this with "--no-healthcheck" enabled for 2 hours without errors. As with healthcheck ON the fatal error could happen even 10 minutes after starting container.

@haugene
Copy link
Owner

haugene commented Nov 8, 2020

@reprz Thanks for letting us know. A PR for a health check fix is in the making #1459

@superkrups20056
Copy link
Author

Hi guys, I appreciate that my issue received so much traction. I resolved this issue by reverting back to 2.14. 3.0 is a hot mess right now! :)

@haugene
Copy link
Owner

haugene commented Nov 12, 2020

Haha, don't blame you 😅 However I do believe that the last version is better now 🤞
Give it another try, or wait until 2.14 stops working I guess. Close this for now anyhow?

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

9 participants