OpenVPN: An error has occurred whilst trying to connect

Where are you seeing this?

Clearly “at the OSMC level” this is working as it is working on the command line and OSMC is the operating system. Are you trying to connect from within kodi? Are you using an add-on?

To get a better understanding of the problem you are experiencing we need more information, including logs from you. Our wiki contains detailed steps for providing the relevant info we need to help you.