-
I am running on a Raspberry Pi 3 (raspian) and have followed the install guide exactly. Everything seems to be working correctly - all info on main status page is populated, logs displaying, and server.conf will update correctly. The only issue is that I am getting an error when trying to create a new client certificate. After clicking create a red alert is displayed and reads "exit status 1" without any other details. Any help would be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
I've had a report or two recently of people having issues when they created a client certificate through the PiVPN command line not showing up in OpenVPN Admin Plus. Further, this may keep new certificates from being created. If you think this may apply to you, try revoking any certificates created from the command line and restart OpenVPN and then OpenVPN Admin Plus. |
Beta Was this translation helpful? Give feedback.
-
So, I'm not seeing a "vars" file under /etc/openvpn/easy-rsa. There's one under /etc/openvpn/easy-rsa/pki, which is the "new" location PiVPN uses -- but we're continuing to use the original location for backwards compatibility. Can you confirm that the file doesn't exist under easy-rsa? You should be able to create it manually, and the content would look like this: # if [ -z "$EASYRSA_CALLER" ]; then
# echo "Nope." >&2
# return 1
# fi
set_var EASYRSA "/etc/openvpn/easy-rsa"
set_var EASYRSA_PKI "$EASYRSA/pki"
set_var EASYRSA_CRL_DAYS 3650
set_var EASYRSA_ALGO ec
set_var EASYRSA_CURVE prime256v1
set_var EASYRSA_DN org
set_var EASYRSA_REQ_COUNTRY " "
set_var EASYRSA_REQ_PROVINCE " "
set_var EASYRSA_REQ_CITY " "
set_var EASYRSA_REQ_ORG " "
set_var EASYRSA_REQ_EMAIL " "
set_var EASYRSA_REQ_OU " " Put the same values you used for COUNTRY, PROVINCE, CITY, ORG, EMAIL and OU from your Portainer stack in-between the quotes. Restart OpenVPN or reboot before testing. Any idea how this file might have gone missing? Also, out of curiosity, what does the contents of the file under easy-rsa/pki look like? |
Beta Was this translation helpful? Give feedback.
-
I did a fresh installation of PiVPN and OpenVPN-Admin-Plus on a RaspberryPi 3B+, and everything went as expected. I was able to create a test certificate: So when you try to create a new certificate what shows up in the Portainer log for the openvpn-admin-plus container? Mine looks like this right after creating a new cert: {
"EntryType": "V",
"Expiration": "330612181320Z",
"ExpirationT": "2033-06-12T18:13:20Z",
"Revocation": "",
"RevocationT": "0001-01-01T00:00:00Z",
"Serial": "[redacted]",
"FileName": "unknown",
"Details": {
"Name": "[redacted]",
"CN": "server",
"Country": "",
"Organisation": "",
"Email": ""
}
},
{
"EntryType": "V",
"Expiration": "250917184117Z",
"ExpirationT": "2025-09-17T18:41:17Z",
"Revocation": "",
"RevocationT": "0001-01-01T00:00:00Z",
"Serial": "[redacted]",
"FileName": "unknown",
"Details": {
"Name": "test",
"CN": "",
"Country": "[redacted]",
"Organisation": "[redacted]",
"Email": "[redacted]"
}
}
]
[ORM]2023/06/15 12:46:53 -[Queries/default] - [ OK / db.QueryRow / 0.0ms] - [SELECT `id`, `login`, `name`, `email`, `password`, `lastlogintime`, `created`, `updated` FROM `user` WHERE `id` = ? ] - `1`
[ORM]2023/06/15 12:46:53 -[Queries/default] - [ OK / db.QueryRow / 0.0ms] - [SELECT `id`, `profile`, `m_i_address`, `m_i_network`, `o_v_config_path`, `server_address`, `created`, `updated` FROM `settings` WHERE `profile` = ? ] - `default`
[ORM]2023/06/15 12:46:53 -[Queries/default] - [ OK / db.QueryRow / 0.0ms] - [SELECT `id`, `profile`, `m_i_address`, `m_i_network`, `o_v_config_path`, `server_address`, `created`, `updated` FROM `settings` WHERE `o_v_config_path` = ? ] - `/e I suspect yours may have some error information that could be useful. Please try to add a certificate and post the last part of the container log here. |
Beta Was this translation helpful? Give feedback.
-
Ugh.. I figure it out.. Such a simple mistake, had "USA" for some reason as the country code. I should know better than that, but also blame poor error logs with easy-rsa and openvpn hah. thanks for the help though, I wouldn't have know about the portainer logs, just getting in to Docker recently |
Beta Was this translation helpful? Give feedback.
Ugh.. I figure it out.. Such a simple mistake, had "USA" for some reason as the country code. I should know better than that, but also blame poor error logs with easy-rsa and openvpn hah. thanks for the help though, I wouldn't have know about the portainer logs, just getting in to Docker recently