Starting the GEV server in a Linux service does not work

When I program a GEV server in C++ it runs without problems on the Linux system (Ubuntu 20.04 ARM 64 bit).
When I create a service to start it, the error
handle to create GevServer must not be empty comes up.
Please let me know if you need a more detailed description of the GEV server sample code and the procedure for creating a service.

Who starts this service? root? Because this might be the issue.

CVB loads a bunch of env vars via login (i.e. /etc/profile.d/, please verify these are present for your service.

And the service discussed in the other topic might be problematic.
(i assume this is an old topic, i.e. solved, since there is a newer one?)

Hi @c.hartmann ,
This is a different System, the installation went fine and the GEV Server is running without an issue, if I am starting them by hand.
I will try to start the Server as admin and try it, if that can fix the error.
How I can make the present for my service?
Besides the service Problem, the GEV Server is also not working, if I start them with crontab as an admin.

Hi @ASchmitt,
that’s what i meant, a crontab will not (atleast this is what i assume) have the env variable exported like a normal user.
Could you check? I.e. whether the environment vars in are set for your service/crontask.

Just a hint: CVB is designed to be used as a normal user, you should never need admin rights on linux, neither will it improve things xD.

:wink: You mentioned the root rights. I have the Gev otherwise also always started with user rights. But I had also tried it with root rights, because this sometimes solves handel problems.

How can I check this? Did I have to Include the path to the in my environment vars?


just in any way you prefer*, simply exports some variables, which are needed by cvb.

*i.e. print them to any log/file at service start.

This is the usual list:


Okay, now that might get a little more coplicitous.
So I have created a service that starts a Python program.
This Python program is in turn a web server, which in turn should start the GEVServer, which was written in C++. If I start the webserver by hand, then this also works without problems, the GEVServer is started and runs excellent only if I try to start the whole thing as a service there are problems.
I am not a professional in the use of Linux services and unfortunately do not know how to make the properly accessible to the service.
My service script looks like this

vi /home/pi/Programms/webSkript/app.service
Description=Raspberry Gev Kamera Service
ExecStart=/usr/bin/python3 /home/pi/Programms/webSkript/

By adding the parameters as environment variables in the section [Service], as already described, everything works now.
The error

handle to create GevServer must not be empty

no longer occurs.

This is now my service file.

Description=Raspberry Gev Kamera Service
ExecStart=/usr/bin/python3 /home/pi/Programms/webSkript/