PiVPN Installation/Setup Errors

Having issues with your DietPi installation, or, found a bug? Post it here.
prp2

PiVPN Installation/Setup Errors

Post by prp2 »

Having a hell of a time setting up PiVPN today. It seems to install, but when I get the setup screen and am going through the network config part in the beginning, it tells me "PiVPN setup was not successful. Do you want DietPi to run the setup again?" and keeps looping each time it gets to that screen. Here's the error (I think):


DietPi-Software
─────────────────────────────────────────────────────
Mode: Install software
Please wait...

PiVPN: openvpn installer & management tool
[Info] Please wait...

# processing | D i e t P i #

[Info] Testing connection to https://install.pivpn.io
[Info] Max duration of 20 seconds, please wait...
[Ok] Connection test | Completed

Reading package lists... Done
Building dependency tree
Reading state information... Done
lsb-release is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
useradd: user 'pivpn' already exists
converted 'https://install.pivpn.io' (ANSI_X3.4-1968) -> 'https://install.pivpn.io' (UTF-8)
--2016-12-02 20:28:41-- https://install.pivpn.io/
Resolving install.pivpn.io (install.pivpn.io)... 71.19.155.138
Connecting to install.pivpn.io (install.pivpn.io)|71.19.155.138|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/pivpn ... install.sh [following]
converted 'https://raw.githubusercontent.com/pivpn ... install.sh' (ANSI_X3.4-1968) -> 'https://raw.githubusercontent.com/pivpn ... install.sh' (UTF-8)
--2016-12-02 20:28:41-- https://raw.githubusercontent.com/pivpn ... install.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.48.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.48.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43068 (42K) [text/plain]
Saving to: 'pivpn_install.sh'

pivpn_install.sh 100%[=============================================================================================>] 42.06K --.-KB/s in 0.007s

2016-12-02 20:28:41 (6.23 MB/s) - 'pivpn_install.sh' saved [43068/43068]

:::
::: You are root.
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your pi is up to date! Continuing with PiVPN installation...
:::
::: Checking dependencies:
::: Checking for openvpn... Not found! Installing.... [|] perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C"). [/] locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory done!
::: Checking for easy-rsa... already installed!
::: Checking for git... already installed!
::: Checking for iptables-persistent... already installed!
::: Checking for dnsutils... already installed!
::: Checking for expect... already installed!
::: Checking for whiptail... already installed!
::: Verifying free disk space...
::: Using interface: eth0
::: Critical: Unable to locate configuration file to set static IPv4 address!
converted 'https://install.pivpn.io' (ANSI_X3.4-1968) -> 'https://install.pivpn.io' (UTF-8)
--2016-12-02 20:31:55-- https://install.pivpn.io/
Resolving install.pivpn.io (install.pivpn.io)... 71.19.155.138
Connecting to install.pivpn.io (install.pivpn.io)|71.19.155.138|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://raw.githubusercontent.com/pivpn ... install.sh [following]
converted 'https://raw.githubusercontent.com/pivpn ... install.sh' (ANSI_X3.4-1968) -> 'https://raw.githubusercontent.com/pivpn ... install.sh' (UTF-8)
--2016-12-02 20:31:55-- https://raw.githubusercontent.com/pivpn ... install.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.48.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.48.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 43068 (42K) [text/plain]
Saving to: 'pivpn_install.sh'

pivpn_install.sh 100%[=============================================================================================>] 42.06K --.-KB/s in 0.009s

2016-12-02 20:31:55 (4.72 MB/s) - 'pivpn_install.sh' saved [43068/43068]

:::
::: You are root.
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your pi is up to date! Continuing with PiVPN installation...
:::
::: Checking dependencies:
::: Checking for openvpn... already installed!
::: Checking for easy-rsa... already installed!
::: Checking for git... already installed!
::: Checking for iptables-persistent... already installed!
::: Checking for dnsutils... already installed!
::: Checking for expect... already installed!
::: Checking for whiptail... already installed!
::: Verifying free disk space...
::: Using interface: eth0
::: Critical: Unable to locate configuration file to set static IPv4 address!
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: PiVPN Installation/Setup Errors

Post by k-plan »

prp2 wrote:perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
Before you start installation, you had to set a proper default system language and a static ip address via dietpi-config

And keep in mimd:
DietPi requires en_GB.UTF-8 to be installed. This ensures all
DietPi scripts can scrape correctly.

Please do NOT remove en_GB.UTF-8 from the system, when
selecting your Locale.
Your system language can be a different language, but en_GB.UTF-8 must always be installed.
And do NOT choose None or C.UTF-8

You can see you current choice with:

Code: Select all

root@DietPi:~# locale
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
prp2

Re: PiVPN Installation/Setup Errors

Post by prp2 »

k-plan wrote:
Before you start installation, you had to set a proper default system language and a static ip address via dietpi-config

And keep in mimd:
DietPi requires en_GB.UTF-8 to be installed. This ensures all
DietPi scripts can scrape correctly.

Please do NOT remove en_GB.UTF-8 from the system, when
selecting your Locale.
Your system language can be a different language, but en_GB.UTF-8 must always be installed.
And do NOT choose None or C.UTF-8

You can see you current choice with:

Code: Select all

root@DietPi:~# locale
Thanks for that. I've already been configured with a static IP since install back in February. Also, I reenabled the GB-UTF-8 locale, but still got the same error when trying to reinstall piVPN.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: PiVPN Installation/Setup Errors

Post by Fourdee »

Critical: Unable to locate configuration file to set static IPv4 address!
Claims unable to find network config file. Can you please paste the results of the following (hide any WiFi keys):

Code: Select all

cat /etc/network/interfaces
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
prp2

Re: PiVPN Installation/Setup Errors

Post by prp2 »

Fourdee wrote:
Critical: Unable to locate configuration file to set static IPv4 address!
Claims unable to find network config file. Can you please paste the results of the following (hide any WiFi keys):

Code: Select all

cat /etc/network/interfaces
I actually have my WiFi adapter disabled, so it's just got the default settings for that, but...

root@DietPi:~# cat /etc/network/interfaces
#/etc/network/interfaces
#Please use DietPi-Config to modify network settings.

# Local
auto lo
iface lo inet loopback

# Ethernet
allow-hotplug eth0
iface eth0 inet static
address 172.17.50.14
netmask 255.255.255.240
gateway 172.17.50.1
dns-nameservers 8.8.8.8 8.8.4.4

# Wifi
#allow-hotplug wlan0
iface wlan0 inet dhcp
address 172.17.50.14
netmask 255.255.255.240
gateway 172.17.50.1
wireless-essid FuzonWifi
wireless-key abcde12345
wireless-mode Managed
wireless-power off
wpa-ssid FuzonWifi
wpa-psk abcde12345
#dns-nameservers 37.235.1.174
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: PiVPN Installation/Setup Errors

Post by Fourdee »

Hi,

Ran a test install of PiVPN with static IP, running ok here.
netmask 255.255.255.240
Did you set this manually, and, does DHCP offer the same netmask?
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
prp2

Re: PiVPN Installation/Setup Errors

Post by prp2 »

Fourdee wrote:Hi,

Ran a test install of PiVPN with static IP, running ok here.
netmask 255.255.255.240
Did you set this manually, and, does DHCP offer the same netmask?
I did set that manually, yes, as my router only assigns 13 DHCP addresses as that's all I need currently. The router DHCP hands the same subnet out as well.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: PiVPN Installation/Setup Errors

Post by Fourdee »

prp2 wrote: I did set that manually, yes, as my router only assigns 13 DHCP addresses as that's all I need currently. The router DHCP hands the same subnet out as well.
Excellent,
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C"). [/] locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory done!
Whats the results of:

Code: Select all

locale
cat /etc/locale.gen | grep '^[a-z]'
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: PiVPN Installation/Setup Errors

Post by Fourdee »

Critical: Unable to locate configuration file to set static IPv4 address!
Ok, checked the PiVPN sourecode, looks like if /etc/dhcpcd.conf doesn't exist, the script fails: https://github.com/pivpn/pivpn/blob/mas ... #L331-L345

Please try creating that file, then re-running the PiVPN installation:

Code: Select all

echo 1 > /etc/dhcpcd.conf
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
prp2

Re: PiVPN Installation/Setup Errors

Post by prp2 »

Fourdee wrote:
Critical: Unable to locate configuration file to set static IPv4 address!
Ok, checked the PiVPN sourecode, looks like if /etc/dhcpcd.conf doesn't exist, the script fails: https://github.com/pivpn/pivpn/blob/mas ... #L331-L345

Please try creating that file, then re-running the PiVPN installation:

Code: Select all

echo 1 > /etc/dhcpcd.conf
Perfect! It's creating the key as I type this. Many thanks!
Post Reply