amnezia-vpn / amnezia-client

Amnezia VPN Client (Desktop+Mobile)
https://amnezia.org
GNU General Public License v3.0
5.79k stars 360 forks source link

Amnezia WG (Medium). Stuck on Connecting... #585

Closed AuthorProxy closed 7 months ago

AuthorProxy commented 9 months ago
image

I tried Amnezia VPN on one server - everything works good.

Then I created a VM on another hoster, repeat the process (protocol AmneziaWG) - but after successfull connection when I click install - I got an error:

Hoster: GCore Ubuntu version 22.10 Clean machine

2024-02-14 00:21:09 info Started AmneziaVPN version 4.1.0.1
2024-02-14 00:21:09 info macOS 14.1 (x86_64)
2024-02-14 00:22:20 debug ServerController::Run script
2024-02-14 00:22:20 debug sudo docker ps --format '{{.Names}} {{.Ports}}'
2024-02-14 00:22:20 debug SSH chanel opened
2024-02-14 00:22:21 debug ServerController::runScript finished

2024-02-14 00:22:21 debug ServerController::setupContainer amnezia-awg
2024-02-14 00:22:21 debug ServerController::Run script
2024-02-14 00:22:21 debug CUR_USER=$(whoami);\
groups $CUR_USER
2024-02-14 00:22:21 debug SSH chanel opened
2024-02-14 00:22:21 debug ServerController::runScript finished

2024-02-14 00:22:21 debug ServerController::Run script
2024-02-14 00:22:21 debug if which apt-get > /dev/null 2>&1; then LOCK_FILE="/var/lib/dpkg/lock-frontend";\
elif which dnf > /dev/null 2>&1; then LOCK_FILE="/var/run/dnf.pid";\
elif which yum > /dev/null 2>&1; then LOCK_FILE="/var/run/yum.pid";\
else echo "Packet manager not found"; echo "Internal error"; exit 1; fi;\
if command -v fuser > /dev/null 2>&1; then sudo fuser $LOCK_FILE 2>/dev/null; else  echo "fuser not installed"; fi
2024-02-14 00:22:21 debug SSH chanel opened
2024-02-14 00:22:22 debug ServerController::runScript finished

2024-02-14 00:22:22 debug ServerController::Run script
2024-02-14 00:22:22 debug if which apt-get > /dev/null 2>&1; then pm=$(which apt-get); docker_pkg="docker.io"; dist="debian";\
elif which dnf > /dev/null 2>&1; then pm=$(which dnf); docker_pkg="docker"; dist="fedora";\
elif which yum > /dev/null 2>&1; then pm=$(which yum); docker_pkg="docker"; dist="centos";\
else echo "Packet manager not found"; exit 1; fi;\
echo "Dist: $dist, Packet manager: $pm, Docker pkg: $docker_pkg";\
if [ "$dist" = "debian" ]; then export DEBIAN_FRONTEND=noninteractive; fi;\
if ! command -v sudo > /dev/null 2>&1; then $pm update -yq; $pm install -yq sudo; fi;\
if ! command -v fuser > /dev/null 2>&1; then sudo $pm install -yq psmisc; fi;\
if ! command -v lsof > /dev/null 2>&1; then sudo $pm install -yq lsof; fi;\
if ! command -v docker > /dev/null 2>&1; then sudo $pm update -yq; sudo $pm install -yq $docker_pkg;\
  if [ "$dist" = "fedora" ] || [ "$dist" = "centos" ] || [ "$dist" = "debian" ]; then sudo systemctl enable docker && sudo systemctl start docker; fi;\
fi;\
if [ "$dist" = "debian" ]; then \
  docker_service=$(systemctl list-units --full --all | grep docker.service | grep -v inactive | grep -v dead | grep -v failed);\
  if [ -z "$docker_service" ]; then sudo $pm update -yq; sudo $pm install -yq curl $docker_pkg; fi;\
  sleep 3 && sudo systemctl start docker && sleep 3;\
fi;\
if ! command -v sudo > /dev/null 2>&1; then echo "Failed to install Docker";exit 1;fi;\
docker --version
2024-02-14 00:22:22 debug SSH chanel opened
2024-02-14 00:22:27 debug ServerController::runScript finished

2024-02-14 00:22:27 debug ServerController::installDockerWorker Dist: debian, Packet manager: /usr/bin/apt-get, Docker pkg: docker.io

Hit:1 https://repo.fig.io/apt stable InRelease

Ign:2 http://security.ubuntu.com/ubuntu kinetic-security InRelease

Ign:3 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic InRelease

Err:4 http://security.ubuntu.com/ubuntu kinetic-security Release
  404  Not Found [IP: 91.189.91.83 80]
Ign:5 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-updates InRelease

Ign:6 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-backports InRelease

Err:7 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic Release
  404  Not Found [IP: 91.189.91.121 80]

Err:8 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-updates Release
  404  Not Found [IP: 91.189.91.121 80]

Err:9 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-backports Release
  404  Not Found [IP: 91.189.91.121 80]

Reading package lists...

Reading package lists...
Building dependency tree...

Reading state information...
Package docker.io is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Ign:1 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic InRelease

Ign:2 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-updates InRelease

Ign:3 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-backports InRelease

Hit:4 https://repo.fig.io/apt stable InRelease
Err:5 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic Release
  404  Not Found [IP: 185.125.190.41 80]
Ign:6 http://security.ubuntu.com/ubuntu kinetic-security InRelease

Err:7 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-updates Release
  404  Not Found [IP: 185.125.190.41 80]

Err:8 http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-backports Release
  404  Not Found [IP: 185.125.190.41 80]

Err:9 http://security.ubuntu.com/ubuntu kinetic-security Release
  404  Not Found [IP: 185.125.190.39 80]

Reading package lists...

Reading package lists...

Building dependency tree...

Reading state information...

Package docker.io is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: The repository 'http://security.ubuntu.com/ubuntu kinetic-security Release' no longer has a Release file.
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu kinetic Release' no longer has a Release file.
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-updates Release' no longer has a Release file.
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-backports Release' does not have a Release file.
E: Package 'docker.io' has no installation candidate
Failed to enable unit: Unit file docker.service does not exist.
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu kinetic Release' no longer has a Release file.
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-updates Release' no longer has a Release file.
E: The repository 'http://nova.clouds.archive.ubuntu.com/ubuntu kinetic-backports Release' does not have a Release file.
E: The repository 'http://security.ubuntu.com/ubuntu kinetic-security Release' no longer has a Release file.
E: Package 'docker.io' has no installation candidate
Failed to start docker.service: Unit docker.service not found.
bash: line 19: docker: command not found

2024-02-14 00:23:41 warning qrc:/ui/qml/main2.qml:202:5: QML FileDialog: Cannot set /Users/authorproxy/Documents/AmneziaVPN as a selected file because it doesn't exist
image
AuthorProxy commented 9 months ago

https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

Also when I trying to install docker manually with official docs - I got an error on this command

image
AuthorProxy commented 9 months ago

looks like 22.10 is bad version. because docker page says it is support 22.04 or 23.10. I tried again on 23.10 - everything works ok, but anyway it's better to add some validation at your script so it alerts an error about non supported ubuntu version

AuthorProxy commented 9 months ago

on 23.10 installation was finished successfully, but now I had infinite connecting...

I tried to restart server - it wasn't helpful... The same on the 22.04. https://github.com/amnezia-vpn/amnezia-client/issues/421

With another host server everything works good.

2024-02-14 01:27:18 debug IpcClient::init succeed
2024-02-14 01:27:56 warning QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
2024-02-14 01:27:57 debug Amnezia "LocalSocketController" "Deactivating"
2024-02-14 01:27:58 debug "ConnectToVpn, Server index is 1, container is amnezia-awg, route mode is" Settings::VpnOnlyForwardSites
2024-02-14 01:27:58 debug IpcClient::init succeed
2024-02-14 01:27:58 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 01:27:58 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 01:27:58 debug Set config data /private/var/folders/mz/4c40s7ns31dbs44z2djm92s00000gn/T/AmneziaVPN.WireGuard0.conf
2024-02-14 01:27:58 debug Set config data 
2024-02-14 01:27:58 debug Amnezia "LocalSocketController" "Initializing"
2024-02-14 01:27:58 debug Amnezia "LocalSocketController" "Connecting to: /var/run/amneziavpn/daemon.socket"
2024-02-14 01:27:58 debug Amnezia "LocalSocketController" "Daemon connected"
2024-02-14 01:27:58 debug Amnezia "LocalSocketController" "Check status"
2024-02-14 01:27:58 debug ipRange  "35.193.33.250"
2024-02-14 01:27:58 debug ipRange  "31.13.79.18"
2024-02-14 01:27:58 debug ipRange  "35.193.199.73"
2024-02-14 01:27:58 debug ipRange  "1.1.1.1"
2024-02-14 01:27:58 debug ipRange  "1.0.0.1"
2024-02-14 01:27:58 debug Amnezia "LocalSocketController" "Reading"
2024-02-14 01:27:58 debug Amnezia "LocalSocketController" "Parse command: status"
2024-02-14 01:28:00 debug Amnezia "LocalSocketController" "Deactivating"
2024-02-14 01:28:10 debug "ConnectToVpn, Server index is 1, container is amnezia-awg, route mode is" Settings::VpnOnlyForwardSites
2024-02-14 01:28:10 debug IpcClient::init succeed
2024-02-14 01:28:10 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 01:28:10 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 01:28:10 debug Set config data /private/var/folders/mz/4c40s7ns31dbs44z2djm92s00000gn/T/AmneziaVPN.WireGuard0.conf
2024-02-14 01:28:10 debug Set config data 
2024-02-14 01:28:10 debug Amnezia "LocalSocketController" "Initializing"
2024-02-14 01:28:10 debug Amnezia "LocalSocketController" "Connecting to: /var/run/amneziavpn/daemon.socket"
2024-02-14 01:28:10 debug Amnezia "LocalSocketController" "Daemon connected"
2024-02-14 01:28:10 debug Amnezia "LocalSocketController" "Check status"
2024-02-14 01:28:10 debug ipRange  "35.193.33.250"
2024-02-14 01:28:10 debug ipRange  "31.13.79.18"
2024-02-14 01:28:10 debug ipRange  "35.193.199.73"
2024-02-14 01:28:10 debug ipRange  "1.1.1.1"
2024-02-14 01:28:10 debug ipRange  "1.0.0.1"
2024-02-14 01:28:10 debug Amnezia "LocalSocketController" "Reading"
2024-02-14 01:28:10 debug Amnezia "LocalSocketController" "Parse command: status"
2024-02-14 01:29:16 debug Amnezia "LocalSocketController" "Deactivating"
2024-02-14 02:52:06 debug "ConnectToVpn, Server index is 1, container is amnezia-awg, route mode is" Settings::VpnOnlyForwardSites
2024-02-14 02:52:06 debug IpcClient::init succeed
2024-02-14 02:52:06 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 02:52:06 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 02:52:06 debug Set config data /private/var/folders/mz/4c40s7ns31dbs44z2djm92s00000gn/T/AmneziaVPN.WireGuard0.conf
2024-02-14 02:52:06 debug Set config data 
2024-02-14 02:52:06 debug Amnezia "LocalSocketController" "Initializing"
2024-02-14 02:52:06 debug Amnezia "LocalSocketController" "Connecting to: /var/run/amneziavpn/daemon.socket"
2024-02-14 02:52:06 debug Amnezia "LocalSocketController" "Daemon connected"
2024-02-14 02:52:06 debug Amnezia "LocalSocketController" "Check status"
2024-02-14 02:52:06 debug ipRange  "35.193.33.250"
2024-02-14 02:52:06 debug ipRange  "31.13.79.18"
2024-02-14 02:52:06 debug ipRange  "35.193.199.73"
2024-02-14 02:52:06 debug ipRange  "1.1.1.1"
2024-02-14 02:52:06 debug ipRange  "1.0.0.1"
2024-02-14 02:52:06 debug Amnezia "LocalSocketController" "Reading"
2024-02-14 02:52:06 debug Amnezia "LocalSocketController" "Parse command: status"
2024-02-14 02:53:17 debug Amnezia "LocalSocketController" "Deactivating"
2024-02-14 03:13:43 debug "ConnectToVpn, Server index is 1, container is amnezia-awg, route mode is" Settings::VpnOnlyForwardSites
2024-02-14 03:13:43 debug IpcClient::init succeed
2024-02-14 03:13:43 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 03:13:43 debug VpnConfigurator::getDnsForConfig "1.1.1.1" "1.0.0.1"
2024-02-14 03:13:43 debug Set config data /private/var/folders/mz/4c40s7ns31dbs44z2djm92s00000gn/T/AmneziaVPN.WireGuard0.conf
2024-02-14 03:13:43 debug Set config data 
2024-02-14 03:13:43 debug Amnezia "LocalSocketController" "Initializing"
2024-02-14 03:13:43 debug Amnezia "LocalSocketController" "Connecting to: /var/run/amneziavpn/daemon.socket"
2024-02-14 03:13:43 debug Amnezia "LocalSocketController" "Daemon connected"
2024-02-14 03:13:43 debug Amnezia "LocalSocketController" "Check status"
2024-02-14 03:13:43 debug ipRange  "35.193.33.250"
2024-02-14 03:13:43 debug ipRange  "31.13.79.18"
2024-02-14 03:13:43 debug ipRange  "35.193.199.73"
2024-02-14 03:13:43 debug ipRange  "1.1.1.1"
2024-02-14 03:13:43 debug ipRange  "1.0.0.1"
2024-02-14 03:13:44 debug Amnezia "LocalSocketController" "Reading"
2024-02-14 03:13:44 debug Amnezia "LocalSocketController" "Parse command: status"
2024-02-14 03:14:17 debug Amnezia "LocalSocketController" "Deactivating"
image
lunardunno commented 9 months ago

1) for server Ubuntu 22.10 GCore (Ubuntu 22.10 EOL!) try it: sudo apt update sudo apt upgrade If an errors? fix it. Apparently, the server does not have access to the repositories.

lunardunno commented 9 months ago

2) When split tunneling is disabled, does AmnesiaVPN connect normally? 3) Have you tried AmnesiaVPN pre-release 4.3.0.0? ( https://github.com/amnezia-vpn/amnezia-client/releases )

lunardunno commented 9 months ago

4) docker-ce from the docker repository is not docker.io from the Ubuntu|Debian repository. Installing docker.io from the OS repositories is part of AmneizaVPN's verification of the suitability of the server.

AuthorProxy commented 8 months ago

@lunardunno ok again.

This is very famous top hosting, can you plz try it yourself or say any solution

image
AuthorProxy commented 8 months ago

@lunardunno the same on A2Hosting provider, always connecting... but working on Kamatera Hosting

AuthorProxy commented 8 months ago

@lunardunno sorry for disturbing, did you read my messages? I can provide you remote access to my OS, if you want to check it yourself or collect some logs or debug. This is really frustrating, I pay money for provider and cannot use it, I don;t want return back to manual vpn setup, I like Amnezia VPN, when it works )

lunardunno commented 8 months ago

@AuthorProxy 1) do you have a Telegram account? https://t.me/amnezia_vpn/150263 2) What they show on problem servers:

sudo docker run hello-world

and

sudo docker pull hello-world

???

AuthorProxy commented 8 months ago

@lunardunno yes - the same name as on github AuthorProxy it downloads container and ran it successfully docker.io/library/hello-world:latest

Server info:
Uptime (H:M:S): 0:6:24
Date|Time (UTC+0): 18 Mar 2024|11:06:25
Init system (PID 1): systemd
Locale: good (C.UTF-8)
Packet manager: APT
Virtualization: kvm
Operating System: Ubuntu 22.04.4 LTS
Kernel: Linux 5.15.0-100-generic
Architecture: x86-64
Memory:        total        used        free      shared  buff/cache   available
Mem:           1.9Gi       246Mi       1.1Gi       1.0Mi       540Mi       1.5Gi
Swap:             0B          0B          0B

User check:
passed.. (in sudo group)

Components check:
  sudo: passed..
 fuser: passed..
  lsof: passed..
Installed: Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1
   status: passed.. (active)
  loading: good (startup enabled)
lunardunno commented 8 months ago

With another host server everything works good.

Видимо проблема в хостинге, а не в AmneziaVPN. https://t.me/amnezia_vpn

lunardunno commented 7 months ago

Reasons: problems with the servers, with the OS on the servers, with access to the OS repositories and Dokcer Hub

AuthorProxy commented 7 months ago

Reason was that we port was closed by external hoster firewall, which can be tested by Amnezia Client instead of infinitive connection @lunardunno