Hi Donny,
Could you try these and post your results?
1) Type “which procServ” to see if procServ is successful installed;
2) Type “cat /etc/systemd/system/softioc-testIOC2.service” to see the generated service file.
Generally speaking, the main purpose of the "generic" user account 'softioc' is about permission: let ‘softioc’ be the owner of your IOC's directory as well as the owner of your IOC's process after the IOC is started (you can try this to
see IOC processes: ps -ef | grep st.cmd). So, you should type “sudo manage-iocs start testIOC2” under your personal account (or the ‘root’ account).
Cheers,
Yong
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Organization: Institut Ruđer Bošković
Reply-To: Donny Domagoj Cosic <Donny.Domagoj.Cosic at irb.hr>
Date: Wednesday, January 5, 2022 at 3:31 PM
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: Start IOC automatically at boot
I am trying to install systemd-softioc (procServ) as outlines here
and successfully installed it on my Raspberry Pi. I installed the IOC
and can manually start the softioc, however I am not able to start the
IOC using manage-iocs. I get the following output:
softioc@raspberrypi:/epics/iocs/testIOC2$ sudo manage-iocs start
Starting the IOC 'testIOC2' ...
Failed to start the IOC 'testIOC2'; type 'sudo journalctl -xe' for
Below is my config file and output from the journalctl
CHDIR="/epics/iocs/testIOC2/iocBoot/ioctestIOC2"
-------------------------
Jan 05 21:11:29 raspberrypi sudo[13371]: softioc : TTY=pts/0 ;
PWD=/epics/iocs/testIOC2 ; USER=root ; COMMAND=/usr/bin/manage-iocs
Jan 05 21:11:29 raspberrypi sudo[13371]: pam_unix(sudo:session): session
opened for user root by (uid=0)
Jan 05 21:11:29 raspberrypi sudo[13371]: pam_unix(sudo:session): session
Jan 05 21:11:43 raspberrypi sudo[13423]: softioc : TTY=pts/0 ;
PWD=/epics/iocs/testIOC2 ; USER=root ; COMMAND=/usr/bin/manage-iocs
Jan 05 21:11:43 raspberrypi sudo[13423]: pam_unix(sudo:session): session
opened for user root by (uid=0)
Jan 05 21:11:43 raspberrypi systemd[1]: Reloading.
Current command vanished from the unit file, execution of the command
Jan 05 21:11:43 raspberrypi systemd[1]: plexmediaserver.service: Current
command vanished from the unit file, execution of the command list won't
Jan 05 21:11:44 raspberrypi systemd[1]: Condition check resulted in IOC
testIOC2 via procServ being skipped.
-- Subject: A start job for unit softioc-testIOC2.service has finished
-- A start job for unit softioc-testIOC2.service has finished
-- The job identifier is 1803.
Jan 05 21:11:45 raspberrypi sudo[13423]: pam_unix(sudo:session): session
Jan 05 21:11:54 raspberrypi sudo[13487]: softioc : TTY=pts/0 ;
PWD=/epics/iocs/testIOC2 ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Jan 05 21:11:54 raspberrypi sudo[13487]: pam_unix(sudo:session): session
opened for user root by (uid=0)
The softioc testIOC2 contains a few records which get updated from a
python script. Which brings me to my next questions. Is there a way to
automatically start the python script with the ioc?
Thank you very much for your help,
Laboratory for Ion Beam Interactions
Bijenička cesta 54 | HR-10 000 Zagreb | CROATIA