Error on starting openvpn server via systemctl on CentOS 7: --cert fails with 'server.crt': No such file - centos

I am setting up my own OpenVPN server on VPS with CentOS 7. I'm totally newbie in Linux.
I am using one article for setting up OpenVPN. Right now I'm on step "Start OpenVPN" and have strange problem.
After running systemctl -f start openvpn#server.service I got an error. I checked details with 'journalctl -xe' and found next issue:
enter image description here
After googling I understood that systemd has setting that include parameter WorkingDirectory. I checked it:
enter image description here
It's '/etc/openvpn/server'. OK, I moved all required files there:
enter image description here
Including server.crt, that wasn't mentioned in article at all (I found it in '/etc/openvpn/easy-rsa/easyrsa3/pki/issued/server.crt').
Then I checked conf file and adjusted name of .pem file:
enter image description here
Everything looked fine, but I still get an error with --cert parameter:
enter image description here
I checked that there is no additional config file in openvpn catalog:
enter image description here
I tried to replace cert parameter with putting this cert data into config file, but looks like it work only with client config:
enter image description here
I don't understand what may be wrong. I checked all possible obvious and non-obvious issues that may lead to this error which I googled, but nothing helps.
What I could miss?

Ok, just now I got an idea and it worked. I incorrectly assumed, that in my case WorkingDirectory caused this issue initially. So I just copied server.crt from /etc/openvpn/server to /etc/openvpn and it started successfully.

Related

Error when following instructions on "Hosting scopes"

I was trying to follow the instructions on hosting scopes (https://bit.dev/docs/scope/running-a-scope-server).
Commands entered:
docker run -it -p 4000:3000 bitcli/bit-server:latest
http://localhost:4000
bit remote add http://localhost:4000
I get the following error after the bit remote add command:
error: scope not found at /Users/tdugger/development/bit
There must be a step missing. The browser page shown does say the following, but I'm not sure what that means.
Set "defaultScope": "remote-scope" in workspace.jsonc
file and export components here.
Thanks for your help.

How to fix "Could not find or load main class com.install4j.runtime.launcher.UnixLauncher" error when starting the nexus service

Operating system: Red Hat Entreprise Linux server release 7.7
nexus version: 3.18.1-01
When renewing the SSL certificate of Nexus on the server, I first replaced the old certificate under /opt/nexus/etc/ssl with the new one.
I put a new keystore with the new certificate and the same password as before with the same name in the same place and then ran /opt/nexus/bin/nexus restart.
Before the service was running and the URL was reachable, but since then I get the following error:
Could not find or load main class
com.install4j.runtime.launcher.UnixLauncher.
And the command journalctl -u nexus gives the following error:
Failed to start nexus service.
Failed at step EXEC spawning /var/nexus/bin/nexus: Permission denied.
i tried a lot of things i found on the internet to fix this but unfortunately without success.
put the nexus user in the nexus.rc file
run_as_user="nexus"
In the beginning it was like this:
#run_as_user=""
That means, the nexus server is run with root and I tried to run it with the user nexus. Unfortunately this did not work.
I also tried the following:
changed the permission and owner for the "/opt/nexus" and "/var/nexus" folders (tested with root and nexus too).
moved the file .install4j to /opt/nexus/
at the end I wanted to test again with the old certificate and renamed the new one und the new key. I thought it was because of the new certificate.... But I still get the same error:
Could not find or load main class
com.install4j.runtime.launcher.UnixLauncher
Something is wrong since I stopped and restarted the nexus service but i don't know what exactly.
Can you help me please? I would be very grateful.
Check the ownership of the PID file:
https://help.sonatype.com/display/NXRM3/Run+as+a+Service#RunasaService-PIDFile

Unable to connect / clone GitLab repo in eclipse, even though able to connect to it from command line

I was trying to clone repository in eclipse from gitlab.
It was showing that I cannot checkout/commit repository unless generate ssh key pairs. It further gave me this link. I followed steps there. It created following files:
C:\Users\User Name\.ssh\id_rsa
C:\Users\User Name\.ssh\id_rsa.pub
Then I copy pasted public key back to GitLab.
Then ran this:
C:\Users\User Name>ssh -T git#xx.xx.xx.xx
The authenticity of host 'xx.xx.xx.xx (xx.xx.xx.xx)' can't be established.
ECDSA key fingerprint is SHA256:mZNjLhcagbXDWoshrvVT7wsMNbQ97UTGlJSfUsH6231.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'xx.xx.xx.xx' (ECDSA) to the list of known hosts.
Ubuntu 16.04.6 LTS
Enter passphrase for key 'C:\Users\User Name/.ssh/id_rsa':
Enter passphrase for key 'C:\Users\User Name/.ssh/id_rsa':
Welcome to GitLab, User Name!
So I feel I able to connect from command link.
However I am not able to connect in Eclipse.
I specified id_rsa file in eclipse as stated here.
Then I tried to clone repo in eclipse as follows:
But it keeps asking me password, without ever connecting:
My information in gitlab profile:
Email: user.name#domain.com
Name: User Name
User name: UserN
Whats wrong going on here? What I am missing / doing wrong?
PS: I have masked some text of repo URI and my username in 2nd image.
In first screen shot, when I put git instead of UserN for User, it worked. Afterwards it asked me password for id_rsa, which when provided, started cloning repository. Dont know why this worked. Can someone shed some light?

sshd#QNX: Could not load host key / Missing privileges separation

I followed the manual provided by QNX for SDP 6.6.0 on how to set up the OpenSSH SSH daemon except I tried to get it running on an existing Neutrino OS. To no avail so far. I encountered several pit falls which I could not find to be solved in any guide I found on the web.
It works quite easily and out of the box for QNX 6.5.0. E.g.
'How do you install an ssh server on qnx' which only states to generated keys and start the daemon. But that doesn't seem to be the case anymore.
This is how I've tried to tackle this so far:
created folder /etc/ssh and DSA and RSA keys
tried starting sshd => error: /etc/ssh/sshd_config
created empty file /etc/ssh/sshd_config
tried starting sshd => error:
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Missing privileges separation directory: /var/chroot/sshd`
created folder /var/chroot/sshd and file /etc/ssh/ssh_host_ecdsa_key with proper privileges using chmod 700
P.S.: Why is it that there are only very very few sources actually talking about SSH and QNX. Even QNX only refers to NetBSD by linking their plain man pages. In the BSP guides they handle the topic like "Yeah we've got SSH - you can use it." If not SSH what's then the proper way of remote access?!
OK, gonna answer my question rightaway (since after not posting it, I found the answer some days later):
Long story short. The ssh version on QNX 6.6.0 needs also the ssh_host_ecdsa_key key file generated using ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key. The file was present at my system but somehow corrupted and I just had to generate it again. (I did not know that back then and the manuals I was following don't even mention this key)
I would not recommend following the QNX manual (since it's outdated and especially) if you simply just want to start/configure the sshd daemon (ssh server) on an existing system. Follow 'How do you install an ssh server on qnx' instead.

osm tile server renderd command not found

using this set of instructions to make an OSM tile server (on Ubuntu 14.04).
When I run this sudo -u my_username renderd -f -c /usr/local/etc/renderd.conf the terminal reports renderd: command not found.
Any ideas why this would be? I have everything in the instructions up to this point working and i dont see a note on how exactly to install renderd, its just part of mod_tile. I thought about trying to get around the issues by running the renderd.py file and supplying the file path to my renderd.conf file, but i get more issues as the OSMBright.xml file contains fonts mapnik can't find, despite setting all the font dirs correctly...maybe more on this issues later.
For now I'd be grateful if anyone can shed light on why my install cant find the command renderd
Solved it. The instructions are missing a line after doing the make step for mod_tile, there should be a make renderd command too. That way the binary for renderd is actually generated and will respond
try to find correct path to renderd. like /usr/local/bin/renderd