I believe i have 2 instances of openvpn running (See log below). Please excuse my lack of linux knowledge here but how do i stop one of them; keeping the one i want/configured? Because IT DOES WORK (my clients connect), so the error and subsequent exiting must be the duplicate service.
OR maybe the executable is trying to be started multiple times
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: OpenVPN 2.4.6 arm-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: library versions: OpenSSL 1.0.2q 20 Nov 2018, LZO 2.10
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: Diffie-Hellman initialized with 2048 bit key
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: TUN/TAP device tun1 opened
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: TUN/TAP TX queue length set to 100
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: /sbin/ifconfig tun1 10.8.0.1 pointopoint 10.8.0.2 mtu 1500
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 10.8.0.2
Tue Feb 26 08:30:15 2019 daemon.warn openvpn(skittles_vpn_server)[8037]: Could not determine IPv4/IPv6 protocol. Using AF_INET
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: Socket Buffers: R=[163840->163840] S=[163840->163840]
Tue Feb 26 08:30:15 2019 daemon.err openvpn(skittles_vpn_server)[8037]: TCP/UDP: Socket bind failed on local address [AF_INET][undef]:1194: Address in use (errno=98)
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: Exiting due to fatal error
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: /sbin/route del -net 10.8.0.0 netmask 255.255.255.0
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: Closing TUN/TAP interface
Tue Feb 26 08:30:15 2019 daemon.notice openvpn(skittles_vpn_server)[8037]: /sbin/ifconfig tun1 0.0.0.0
an overview of my files regarding openvpn
/etc/config/openvpn - (this is the file i configured)
I'll tell you what is wrong, you skipped the wwww | grep vpn part of the command.
Looks like there is a vpn server running on port 1194 named skittles_vpn_server.
Also there is some custom config in /etc/openvpn/my-vpn.conf
What is the content of that file?
Your config tries to start three instances: one client, one server, and one with whatever my-vpn.conf says to do.
But, all files named *.conf in /etc/openvpn will be automatically parsed by every instance of OpenVPN. You don't want that, so name the custom config .ovpn instead or store it somewhere else.
Your server doesn't start because something else has already opened port 1194.
If you aren't using the "custom_config" instance, delete that section from /etc/config/openvpn. And make sure that there are no files named *.conf in /etc/openvpn.
netstat shows there is already an OpenVPN process running with process id 14153, and it has control of port 1194. The process 14153 should be in the ps list. A second instance 15271 tries to start but can't because the port is in use.
thank you that makes sense (kinda what i figured)
how do i stop the second process? and disable indefinitely?
how do i know what configuration file is linked to it so i can set enabled to 0
Your /etc/config/openvpn file should contain only one config openvpn main block. Your /etc/openvpn directory should contain no files that end in .conf.
thank you, that does kinda resolve it
but now i get
Wed Feb 27 08:38:29 2019 daemon.err openvpn(vpnserver)[16011]: Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/vpnserver.conf
Wed Feb 27 08:38:29 2019 daemon.warn openvpn(vpnserver)[16011]: Use --help for more information.