gstd when run from terminal plays pipeline but does not when started as a service.
What I want:
- Run gstd as a systemd service
- From a remote computer, using a client over tcp be able to create and control pipeline
Summary of problem:
- gstd runs from terminal and supports creation and control from remote client
- when i run the same executable as a service, i am from a remote computer able to create pipeline but not play it.
What I have done
I have an Ubuntu 22.04 and have built & installed gstd daemon as per instructions. I used --prefix=/home/user/gstd during configure to get all binaries and libraries in one folder.
If i run the following from a terminal (pwd=/home/user/gstd/bin) ./gstd -t -a 10.10.10.104 -e
and get the following result: ############################## GstD version 0.15.2 Copyright (C) 2015-2021 RidgeRun (https://www.ridgerun.com)
Process 756624 died: No such process; trying to remove PID file. (/home/user/gstd_1/pid/gstd.pid) Log traces will be saved to /home/user/gstd_1/log/gstd.log. Detaching from parent process.
** (gstd:783257): CRITICAL **: 21:14:20.476: gstd_socket_stop: assertion 'session' failed ##############################
However from another computer on the lan if i run a gstd-client using command gstd-client -a 10.10.10.104 and run the following commands inside the gstd-client prompt, I am able to play the pipeline pipeline_create p1 pulsesrc ! pulsesink pipeline_play p1 pipeline_stop p1 pipeline_play p1
All the above works and I verify the pipeline by hearing my own voice when I speak on microphone.
If however I run the same gstd as a service. I am able to create the pipeline but not play it. My service file looks like the following ############################## [Unit] Description=G Streamer v7 Wants=default.target After=default.target
[Service] User=user Group=user WorkingDirectory=/home/user/gstd/bin ExecStart=/home/user/gstd/bin/gstd -t -a 10.10.10.104 -e SyslogIdentifier=nik-gstreamer Type=forking
[Install] WantedBy=default.target ##############################
The systemctl status of service is: ############################## voip.service - G Streamer v7 Loaded: loaded (/etc/systemd/system/voip.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2025-05-19 21:23:35 IST; 2s ago Process: 814078 ExecStart=/home/user/gstd_1/bin/gstd -t -a 10.10.10.106 -e (code=exited, status=0/SUCCESS) Main PID: 814080 (gstd) Tasks: 2 (limit: 18719) Memory: 3.8M CPU: 11ms CGroup: /system.slice/voip.service └─814080 /home/user/gstd_1/bin/gstd -t -a 10.10.10.106 -e
May 19 21:23:35 oper2 systemd[1]: Starting G Streamer v7... May 19 21:23:35 oper2 nik-gstreamer[814078]: GstD version 0.15.2 May 19 21:23:35 oper2 nik-gstreamer[814078]: Copyright (C) 2015-2021 RidgeRun (https://www.ridgerun.com) May 19 21:23:35 oper2 nik-gstreamer[814078]: Process 810645 died: No such process; trying to remove PID file. (/home/user/gstd_1/pid/gstd.pid) May 19 21:23:35 oper2 nik-gstreamer[814078]: Log traces will be saved to /home/user/gstd_1/log/gstd.log. May 19 21:23:35 oper2 nik-gstreamer[814078]: Detaching from parent process. May 19 21:23:35 oper2 gstd[814078]: gstd_socket_stop: assertion 'session' failed May 19 21:23:35 oper2 systemd[1]: Started G Streamer v7. ##############################
I have tried Type=simple as well, also tried masking user & group.
Please help.