OpenMediaVault-Plugin-Developers / openmediavault-openvpn

OpenMediaVault plugin for OpenVPN
19 stars 19 forks source link

Request for OMV4 compatibility. #13

Open mikekuzak opened 6 years ago

mikekuzak commented 6 years ago

After Migration from OMV3 to OMV4 the plugin seems broken.

`MV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C; omv-mkconf openvpn setup 2>&1' with exit code '1': ** No /usr/share/easy-rsa/openssl.cnf file could be found Further invocations will fail


NOTE: If you run ./clean-all, I will be doing a rm -rf on /usr/share/easy-rsa/keys Using CA Common Name: Fort-Funston CA grep: /usr/share/easy-rsa/openssl.cnf: No such file or directory pkitool: KEY_CONFIG (set by the ./vars script) is pointing to the wrong version of openssl.cnf: /usr/share/easy-rsa/openssl.cnf The correct version should have a comment that says: easy-rsa version 2.x in /usr/share/php/openmediavault/system/process.inc:175 Stack trace:

0 /usr/share/openmediavault/engined/module/openvpn.inc(88): OMV\System\Process->execute()

1 /usr/share/openmediavault/engined/rpc/config.inc(168): OMV\Engined\Module\OpenVpn->applyConfig()

2 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)

3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)

4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(150): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)

5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(528): OMV\Rpc\ServiceAbstract->OMV\Rpc{closure}('/tmp/bgstatusy6...', '/tmp/bgoutputJ4...')

6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(151): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))

7 /usr/share/openmediavault/engined/rpc/config.inc(213): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)

8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)

9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)

10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)

11 /usr/sbin/omv-engined(536): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)

12 {main}

OK`

ryecoaaron commented 6 years ago

See my post in the forum - https://forum.openmediavault.org/index.php/Thread/20693-Openvpn-plugin-on-OVM4/?postID=160987#post160987

subzero79 commented 6 years ago

Seems to be a bug in debian package. the easy-rsa script whichopenssl is hard coded with openssl versions that are not in stretch.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851059

For now try a symlink

ln -s /usr/share/easy-rsa/openssl-1.0.0.cnf /usr/share/easy-rsa/openssl.cnf

There is another error in how the ip address are parsed from ifconfig since the output from the command differs a little bit from jessie so you're gonna stumble another error after that.

I already have patched the mkconf script. I'll PR very soon, but is not guaranteed that other parts of the plugin are maybe broken and need fixing.

GeraldST commented 6 years ago

Any idea if/when this will be available for OMV4? @subzero79 you said you might start with a PR?

skjnldsv commented 6 years ago

Seconded :) Can we help?

subzero79 commented 6 years ago

https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-openvpn/pull/14

GeraldST commented 6 years ago

I would like to mention that I already upgraded to OMV4 by successfully and quite easily migrating my OpenVPN-as plugin to a Docker Container. I used the OMV-Extras plugin "openmediavault-docker-gui".

For OpenVPN I used this docker repository: https://hub.docker.com/r/linuxserver/openvpn-as/

If someone is interested I could provide a bit more detailed instructions about the right settings for Docker and how to migrate configuration data from the old OMV3 installation to Docker. Personally I first moved OpenVPN to Docker in OMV3 and afterwards upgraded to OMV4. For me it was easy, I never lost any data and OpenVPN works just like before with the same ports, settings and users.

mikekuzak commented 6 years ago

That's a bit heavy to move to docker such a small app especially if this is based on ubuntu xenial and not alpine.

On Fri, 27 Apr 2018, 23:21 GeraldST, notifications@github.com wrote:

I would like to mention that I already upgraded to OMV4 by successfully and quite easily migrating my OpenVPN-as plugin to a Docker Container. I used the OMV-Extras plugin "openmediavault-docker-gui".

For OpenVPN I used this docker repository: https://hub.docker.com/r/linuxserver/openvpn-as/

If someone is interested I could provide a bit more detailed instructions about the right settings for Docker and how to migrate configuration data from the old OMV3 installation to Docker. Personally I first moved OpenVPN to Docker in OMV3 and afterwards upgraded to OMV4. For me it was easy, I never lost any data and OpenVPN works just like before with the same ports, settings and users.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-openvpn/issues/13#issuecomment-385108972, or mute the thread https://github.com/notifications/unsubscribe-auth/ARz3g_t3uZ8H5a_4JTF850LY8YCI_auGks5ts5oDgaJpZM4QqlOd .

idarek commented 6 years ago

omv-extras.org show that this plugin is working with OMV 4, however, it's not. Apart from installation in OVM, you are not able to use it and many of times crashing the whole system after reboot.

Will be really interested to test any wip builds.

ryecoaaron commented 6 years ago

I don't use or maintain this plugin and I'm not sure if anyone is maintaining it. I put it in the repo because I was told it was working. Have you tried asking in the forum? I know people have problems with it on arm boards like the RPi but I didn't think it was crashing the whole system. What is it actually crashing?

idarek commented 6 years ago

Thanks for the update. It's worth to take it off from stable channel as this causing only confusion.

After installing and activating, everything seems to be on, but after reboot 2 of 3 times system will not load again.