OpenVPN installation is not working. Please help. Here is the log:
Choose a domain for OpenVPN (default: my.matan.xyz): vpn.matan.xyz
Choose a path for OpenVPN (default: /openvpn): /
If your server has an other public ip than the main one, you can use it to make openvpn listen on all ports. It could be useful with some crazy/blocked internet access. Leave empty if it's not needed (default: ):
If you have several public IPv4 and you want to provide VPN compatibles for self-hosting (VPN associated to a public IP address), list here public IPv4 range to attribute to VPN clients (seperated by space) (default: ):
Executing script '/var/cache/yunohost/from_file/openvpn_ynh-master/scripts/install'...
+ source /usr/share/yunohost/helpers
+++ run-parts --list /usr/share/yunohost/helpers.d
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/backend ']'
++ . /usr/share/yunohost/helpers.d/backend
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
++ . /usr/share/yunohost/helpers.d/filesystem
+++ CAN_BIND=1
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
++ . /usr/share/yunohost/helpers.d/ip
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
++ . /usr/share/yunohost/helpers.d/mysql
+++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/network ']'
++ . /usr/share/yunohost/helpers.d/network
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/package ']'
++ . /usr/share/yunohost/helpers.d/package
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/print ']'
++ . /usr/share/yunohost/helpers.d/print
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
++ . /usr/share/yunohost/helpers.d/setting
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/string ']'
++ . /usr/share/yunohost/helpers.d/string
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/system ']'
++ . /usr/share/yunohost/helpers.d/system
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/user ']'
++ . /usr/share/yunohost/helpers.d/user
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
++ . /usr/share/yunohost/helpers.d/utils
+ source _common.sh
+++ cd ../
+++ pwd
++ PKG_DIR=/var/cache/yunohost/from_file/openvpn_ynh-master
+ ynh_trap_on
+ set -eu
+ trap ynh_exit_properly EXIT
+ export app=openvpn
+ app=openvpn
+ export user=openvpn
+ user=openvpn
+ export webuser=openvpnweb
+ webuser=openvpnweb
+ ynh_export domain path ip4ranges dedicated_ip
+ local ynh_arg=
+ for var in '$@'
++ awk '{print toupper($0)}'
++ echo domain
+ ynh_arg=DOMAIN
+ ynh_arg=YNH_APP_ARG_DOMAIN
+ export domain=vpn.matan.xyz
+ domain=vpn.matan.xyz
+ for var in '$@'
++ awk '{print toupper($0)}'
++ echo path
+ ynh_arg=PATH
+ ynh_arg=YNH_APP_ARG_PATH
+ export path=/
+ path=/
+ for var in '$@'
++ awk '{print toupper($0)}'
++ echo ip4ranges
+ ynh_arg=IP4RANGES
+ ynh_arg=YNH_APP_ARG_IP4RANGES
+ export ip4ranges=
+ ip4ranges=
+ for var in '$@'
++ awk '{print toupper($0)}'
++ echo dedicated_ip
+ ynh_arg=DEDICATED_IP
+ ynh_arg=YNH_APP_ARG_DEDICATED_IP
+ export dedicated_ip=
+ dedicated_ip=
+ ynh_find_port 1194
+ port=1194
+ test -n 1194
+ netcat -z 127.0.0.1 1194
+ echo 1194
1194
+ export port=1194
+ port=1194
+ export local_path=/var/www/openvpn
+ local_path=/var/www/openvpn
++ awk '/default/ { print $5 }'
++ ip r
+ export iface=eth0
+ iface=eth0
+ ynh_check_var openvpn 'app name not set'
+ test -n openvpn
+ ynh_normalize_url_path /
+ path=/
+ test -n /
+ '[' / '!=' / ']'
+ '[' / == / ']'
+ '[' 1 -gt 1 ']'
+ echo /
/
+ ynh_path_validity vpn.matan.xyz/
+ sudo yunohost app checkurl vpn.matan.xyz/ -a openvpn
Warning: 'yunohost app checkurl' is deprecated and will be removed in the future
+ ynh_local_path_available /var/www/openvpn
+ '[' -e /var/www/openvpn ']'
+ check_iptables
+ sudo iptables -L
+ check_tun_available
+ return 0
+ check_ip4ranges
+ _255='(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)'
+ ip4regex='((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)'
+ rangeip4regex='((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)(/(3[0-2]|[1-2][0-9]|[1-9]))?'
+ regex='((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)(/(3[0-2]|[1-2][0-9]|[1-9]))?([[:space:]]+((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)(/(3[0-2]|[1-2][0-9]|[1-9]))?)*'
++ ynh_exit_properly
++ exit_code=1
++ '[' 1 -eq 0 ']'
++ trap '' EXIT
++ set +eu
++ echo -e '\e[91m \e[1m'
++ err 'openvpn script has encountered an error.'
++ log '[ERR] openvpn script has encountered an error.'
++ echo '[ERR] openvpn script has encountered an error.'
[ERR] openvpn script has encountered an error.
++ type -t CLEAN_SETUP
++ ynh_die
++ echo ''
++ exit 1
Warning: _common.sh: line 47: $1: unbound variable
Warning:
Executing script '/var/cache/yunohost/from_file/openvpn_ynh-master/scripts/remove'...
+ source /usr/share/yunohost/helpers
+++ run-parts --list /usr/share/yunohost/helpers.d
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/backend ']'
++ . /usr/share/yunohost/helpers.d/backend
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
++ . /usr/share/yunohost/helpers.d/filesystem
+++ CAN_BIND=1
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
++ . /usr/share/yunohost/helpers.d/ip
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
++ . /usr/share/yunohost/helpers.d/mysql
+++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/network ']'
++ . /usr/share/yunohost/helpers.d/network
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/package ']'
++ . /usr/share/yunohost/helpers.d/package
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/print ']'
++ . /usr/share/yunohost/helpers.d/print
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
++ . /usr/share/yunohost/helpers.d/setting
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/string ']'
++ . /usr/share/yunohost/helpers.d/string
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/system ']'
++ . /usr/share/yunohost/helpers.d/system
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/user ']'
++ . /usr/share/yunohost/helpers.d/user
++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
++ . /usr/share/yunohost/helpers.d/utils
+ source _common.sh
+++ cd ../
+++ pwd
++ PKG_DIR=/var/cache/yunohost/from_file/openvpn_ynh-master
+ app=openvpn
+ user=openvpn
+ webuser=openvpnweb
++ ynh_app_setting_get openvpn local_path
++ sudo yunohost app setting openvpn local_path --output-as plain --quiet
+ local_path=
++ sudo yunohost app setting openvpn domain
+ domain=vpn.matan.xyz
+ sudo service openvpn stop
Warning: Failed to stop openvpn.service: Unit openvpn.service not loaded.
+ sudo rm -f '/etc/yunohost/hooks.d/post_iptable_rules/*openvpn'
+ sudo yunohost firewall disallow UDP 1194
+ rm_firewall_rules
+ configure_firewall D
++ tr ' ' '\n'
++ ynh_app_setting_get openvpn ip4ranges
++ sudo yunohost app setting openvpn ip4ranges --output-as plain --quiet
+ ip4ranges=
++ ynh_app_setting_get openvpn iface
++ sudo yunohost app setting openvpn iface --output-as plain --quiet
+ iface=
+ sudo iptables -t filter -D FORWARD -i '' -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
Warning: iptables v1.4.21: Empty interface is likely to be undesired
Warning: Try `iptables -h' or 'iptables --help' for more information.
+ sudo sysctl net.ipv4.ip_forward=0
net.ipv4.ip_forward = 0
+ sudo yunohost service remove openvpn
Warning: Unknown service 'openvpn'
+ sudo rm -rf /etc/openvpn/yunohost.conf /etc/openvpn/auth /etc/openvpn/ta.key /etc/openvpn/users /etc/openvpn/handler.sh /etc/openvpn/ip4_attribution.csv /etc/sysctl.d/openvpn.conf
+ sudo rm -rf /var/log/openvpn
+ ynh_secure_rm ''
+ [[ /var/www /opt /home/yunohost.app =~ '' ]]
+ ynh_secure_rm /etc/yunohost/certs/vpn.matan.xyz/dh.pem
+ [[ /var/www /opt /home/yunohost.app =~ /etc/yunohost/certs/vpn.matan.xyz/dh.pem ]]
+ test -n /etc/yunohost/certs/vpn.matan.xyz/dh.pem
+ sudo rm -Rf /etc/yunohost/certs/vpn.matan.xyz/dh.pem
+ ynh_secure_rm /etc/nginx/conf.d/vpn.matan.xyz.d/openvpn.conf
+ [[ /var/www /opt /home/yunohost.app =~ /etc/nginx/conf.d/vpn.matan.xyz.d/openvpn.conf ]]
+ test -n /etc/nginx/conf.d/vpn.matan.xyz.d/openvpn.conf
+ sudo rm -Rf /etc/nginx/conf.d/vpn.matan.xyz.d/openvpn.conf
+ ynh_secure_rm /etc/logrotate.d/openvpn.conf
+ [[ /var/www /opt /home/yunohost.app =~ /etc/logrotate.d/openvpn.conf ]]
+ test -n /etc/logrotate.d/openvpn.conf
+ sudo rm -Rf /etc/logrotate.d/openvpn.conf
+ ynh_secure_rm /etc/fail2ban/filter.d/openvpn.conf
+ [[ /var/www /opt /home/yunohost.app =~ /etc/fail2ban/filter.d/openvpn.conf ]]
+ test -n /etc/fail2ban/filter.d/openvpn.conf
+ sudo rm -Rf /etc/fail2ban/filter.d/openvpn.conf
+ ynh_secure_rm /etc/fail2ban/jail.d/openvpn.conf
+ [[ /var/www /opt /home/yunohost.app =~ /etc/fail2ban/jail.d/openvpn.conf ]]
+ test -n /etc/fail2ban/jail.d/openvpn.conf
+ sudo rm -Rf /etc/fail2ban/jail.d/openvpn.conf
+ ynh_rm_nginx_conf
+ '[' -e /etc/nginx/conf.d/vpn.matan.xyz.d/openvpn.conf ']'
+ ynh_rm_php_fpm_conf
+ '[' -e /etc/php5/fpm/pool.d/openvpn.conf ']'
+ '[' -e /etc/php5/fpm/conf.d/20-openvpn.ini ']'
+ sudo service php5-fpm reload
+ ynh_system_user_delete openvpn
+ ynh_system_user_exists openvpn
+ getent passwd openvpn
+ echo 'The user openvpn was not found'
+ ynh_system_user_delete openvpnweb
+ ynh_system_user_exists openvpnweb
+ getent passwd openvpnweb
Warning: The user openvpn was not found
+ echo 'The user openvpnweb was not found'
+ dep_app=openvpn
+ ynh_package_remove openvpn-ynh-deps
+ ynh_apt remove openvpn-ynh-deps
+ DEBIAN_FRONTEND=noninteractive
+ sudo apt-get -y -qq remove openvpn-ynh-deps
Warning: The user openvpnweb was not found
Warning: E: Unable to locate package openvpn-ynh-deps
+ sudo yunohost app ssowatconf
The SSOwat configuration has been generated
Success! The SSOwat configuration has been generated
Error: Installation failed