amnezia-vpn / amnezia-client

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

OpenVPN config missing error #121

Closed miladmeidanshahi closed 10 months ago

miladmeidanshahi commented 2 years ago

All protocol start with OpenVPN can't connect.

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
VpnLogic::onConnectionStateChanged "Disconnected"
libpng warning: iCCP: known incorrect sRGB profile
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ warning libpng warning: iCCP: known incorrect sRGB profile
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ warning qrc:/ui/qml/Pages/Protocols/PageProtoTorWebSite.qml:30: ReferenceError: pb_save is not defined
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ debug Warning: Pages components are not ready
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ warning qrc:/ui/qml/Pages/PageQrDecoderIos.qml:27:5: QML Connections: Detected function "onStartDecode" in Connections element. This is probably intended to be a signal handler but no signal of the target matches the name.
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ warning qrc:/ui/qml/Pages/PageQrDecoderIos.qml:27:5: QML Connections: Detected function "onStopDecode" in Connections element. This is probably intended to be a signal handler but no signal of the target matches the name.
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ warning qrc:/ui/qml/Pages/PageQrDecoderIos.qml:28: ReferenceError: nil is not defined
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ warning QSystemTrayIcon::setVisible: No Icon set
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ debug VpnConfigurator::getDnsForConfig "1.1.1.1" "8.8.8.8"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ info Started AmneziaVPN version 2.1.2.0
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۲۳ info Ubuntu 22.04.1 LTS (x86_64)
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۳۲ debug VpnConfigurator::getDnsForConfig "1.1.1.1" "8.8.8.8"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۳۷ debug ServerContainersLogic::onPushButtonProtoSettingsClicked "amnezia-openvpn-cloak" "openvpn"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۷:۳۷ debug OpenVpnLogic::updateProtocolPage
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۱ debug "СonnectToVpn, Server index is 0, container is amnezia-openvpn-cloak, route mode is" Settings::VpnAllSites
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۱ debug IpcClient::init succeed
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۱ debug VpnLogic::onConnectionStateChanged "Connecting..."
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۲ debug Server connected by ssh
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug Sftp finished with status ""
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug Run script
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug EXEC sudo docker exec -i amnezia-openvpn-cloak mkdir -p  "$(dirname /opt/amnezia/openvpn/clients/KBwuEl167gY7hSJGZsj3kTbYyaewfn8W.req)"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug stderr sudo: 
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug stderr a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug ServerController::runScript finished

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug Run script
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۵ debug EXEC sudo docker cp /tmp/ubs3O766NH9iG54Y.tmp amnezia-openvpn-cloak://opt/amnezia/openvpn/clients/KBwuEl167gY7hSJGZsj3kTbYyaewfn8W.req
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug stderr sudo
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug stderr : a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug ServerController::runScript finished

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug Run script
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug EXEC sudo shred /tmp/ubs3O766NH9iG54Y.tmp
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug stderr sudo
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug stderr : a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug ServerController::runScript finished

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug Run script
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۶ debug EXEC sudo rm /tmp/ubs3O766NH9iG54Y.tmp
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۷ debug stderr sudo: 
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۷ debug stderr a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۷ debug ServerController::runScript finished

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۷ debug Run script
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۷ debug EXEC sudo docker exec -i amnezia-openvpn-cloak bash -c "cd /opt/amnezia/openvpn && easyrsa import-req /opt/amnezia/openvpn/clients/KBwuEl167gY7hSJGZsj3kTbYyaewfn8W.req KBwuEl167gY7hSJGZsj3kTbYyaewfn8W"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۸ debug stderr sudo: 
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۸ debug stderr a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۸ debug EXEC sudo docker exec -i amnezia-openvpn-cloak bash -c "export EASYRSA_BATCH=1; cd /opt/amnezia/openvpn && easyrsa sign-req client KBwuEl167gY7hSJGZsj3kTbYyaewfn8W"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۹ debug stderr sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۹ debug ServerController::runScript finished

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۹ debug Copy file from container
 sudo docker exec -i amnezia-openvpn-cloak sh -c "xxd -p '/opt/amnezia/openvpn/pki/ca.crt'"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۹ debug ServerController::getTextFileFromContainer proc started
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۰۹ debug Copy file from container
 sudo docker exec -i amnezia-openvpn-cloak sh -c "xxd -p '/opt/amnezia/openvpn/pki/issued/KBwuEl167gY7hSJGZsj3kTbYyaewfn8W.crt'"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۰ debug ServerController::getTextFileFromContainer proc started
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۰ debug Copy file from container
 sudo docker exec -i amnezia-openvpn-cloak sh -c "xxd -p '/opt/amnezia/openvpn/ta.key'"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug ServerController::getTextFileFromContainer proc started
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnConfigurator::getDnsForConfig "1.1.1.1" "8.8.8.8"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug OpenVpnOverCloakProtocol::start() /usr/bin/ck-client -c /tmp/AmneziaVPN.zxUfAo -s  -p 443 -l 1194 -u
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnProtocol::setConnectionState "Connecting..."
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug Connection state: 'Connecting...'
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug OpenVpnProtocol::stop()
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnLogic::onConnectionStateChanged "Connecting..."
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnProtocol::setConnectionState "Disconnecting..."
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug Connection state: 'Disconnecting...'
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnProtocol::setConnectionState "Error"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug Connection state: 'Error'
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ critical VpnProtocol error, code ErrorCode::21(OpenVPN config missing) OpenVPN config missing
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnLogic::onConnectionStateChanged "Disconnecting..."
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnLogic::onConnectionStateChanged "Error"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug ck-client: time="2022-10-20T11:28:11+03:30" level=info msg="Starting standalone mode"

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug ck-client: time="2022-10-20T11:28:11+03:30" level=fatal msg="ServerName cannot be empty"

۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug OpenVpnOverCloakProtocol finished, exitCode, exiStatus 1 QProcess::NormalExit
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnProtocol::setConnectionState "Disconnected"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug Connection state: 'Disconnected'
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug VpnLogic::onConnectionStateChanged "Disconnected"
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ warning QObject::connect: Cannot queue arguments of type 'amnezia::ErrorCode'
(Make sure 'amnezia::ErrorCode' is registered using qRegisterMetaType().)
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug OpenVpnProtocol::stop()
۲۰۲۲-۱۰-۲۰ ۱۱:۲۸:۱۱ debug OpenVpnOverCloakProtocol::stop()
Nethius commented 1 year ago

@miladmeidanshahi I think that if you use the root user, or a user without a password for sudo, when setting up the server, then the problem will disappear.

pokamest commented 1 year ago

Please check latest release 3.1.0 https://github.com/amnezia-vpn/amnezia-client/releases/tag/3.1.0