act28 / pia-openvpn-proxy

An Alpine Linux docker container running Privoxy and OpenVPN via Private Internet Access
19 stars 9 forks source link

Error opening configuration file, Docker, Synology DSM 7 #9

Closed phillipsmn closed 3 years ago

phillipsmn commented 3 years ago

I've just updated my Synology to DSM 7.0-41890, which required a Docker update (currently I have 20.10.3-1233). Everything works smoothly except I now get an error message when trying to run this container. Below is the error message I get:

2021-06-30 15:10:03.906 7f55d08a3d48 Info: Privoxy version 3.0.28
2021-06-30 15:10:03.906 7f55d08a3d48 Info: Program name: privoxy
2021-06-30 15:10:03.907 7f55d08a3d48 Info: Loading filter file: /config/privoxy/default.filter
2021-06-30 15:10:03.910 7f55d08a3d48 Info: Loading filter file: /config/privoxy/user.filter
2021-06-30 15:10:03.910 7f55d08a3d48 Info: Loading actions file: /config/privoxy/match-all.action
2021-06-30 15:10:03.910 7f55d08a3d48 Info: Loading actions file: /config/privoxy/default.action
2021-06-30 15:10:03.917 7f55d08a3d48 Info: Loading actions file: /config/privoxy/user.action
2021-06-30 15:10:03.918 7f55d08a3d48 Info: Listening on port 8118 on IP address 0.0.0.0
Options error: In [CMD-LINE]:1: Error opening configuration file: /config/pia/us_washington_dc.ovpn
Use --help for more information.

I've verified that my UID and PID have not changed. I have the most recent version of pia-openvpn-proxy.

I have verified that the file is still in the config folder, and from what I can tell still with the appropriate permissions.

I also attempted to run without using high privilege to see if that would work, but it did not.

Any ideas?

act28 commented 3 years ago

The path seems wrong. The /config/pia directory no longer exists in the latest version. Make sure you pull the latest image and recreate the container.

phillipsmn commented 3 years ago

Interesting. I am using the latest. Here are some shots of my settings, maybe the mapping is wrong? This was working before the updates, so I'm not entirely sure what's going on.

Folder Structure

In both of the pia folders are the .ovpn files.

Folder Structure

Volume Mapping

Volume Mapping

Environment Variables

Environment Variables
act28 commented 3 years ago

That doesn't look right at all. There should be an ovpn/config folder where the .ovpn configs are stored. Have you tried removing the container and recreating it with the latest version?

phillipsmn commented 3 years ago

I am still getting the same error. I downloaded act28/pia-openvpn-proxy:latest and made a new container, but I still get the same error : Options error: In [CMD-LINE]:1: Error opening configuration file: /config/pia/us_washington_dc.ovpn But that file does exist in that path (as you can see in the screenshot below)

Screen Shot 2021-07-02 at 8 00 43 PM
act28 commented 3 years ago

That path is obviously wrong. The latest image looks for the .ovpn files in /ovpn/config. I don't know how Synology creates the container or why it mounts the path where it does. I don't know what else to tell you. Have you tried exec-ing into the container and seeing if the /ovpn/config/us_washington_dc.ovpn file is there? What volume mount options are you using to mount the config folder?

phillipsmn commented 3 years ago

What are all the paths? As per the screenshot I provided before (Volume Mapping), I can set where the files are supposed to be. Currently, it would be docker/pia and then everything goes in there. When I cleared that out and ran the container, the container put a pia and privoxy folder in that location. There is no /ovpn/config folder. If there were, the path should be docker/pia/ovpn/config/us_washington_dc.ovpn whereas I'm getting docker/pia/pia/us_washington_dc.ovpn. But If I know the correct paths, I assume I can pre-map them via the GUI.

phillipsmn commented 3 years ago

After recreating the folder structure again, I was able to get things online. In case anyone is running into my problem, it looks like that the privoxy folder was somehow causing trouble. Once I removed that and set a clean /config path, I was able to run the proxy.

Screen Shot 2021-07-03 at 9 13 19 AM

This was my final mapping that did work (though not different than before, just that the config folder only has a pia folder with the .ovpn profiles and nothing else.