Start OpenCTI using Systemd
See original GitHub issueHello,
I have successfully installed and started OpenCTI [Issue #1054] I’m trying to start it as a service.
I have created ct-start.sh:
#!/bin/sh
# Correct working directory
cd /home/cti/opencti/
# Start CTI
yarn serv
And I tested it, working great.
But when I created a service to call it, it fails:
cti.service:
[Unit]
Description=X-CTI
After=network.target
[Service]
User=cti
Group=cti
WorkingDirectory=/home/cti/opencti/
Environment="/home/cti/opencti/"
ExecStart=/home/cti/opencti/ct-start.sh
[Install]
WantedBy=multi-user.target
Status:
root@cti:/etc/systemd/system# systemctl status cti.service
● cti.service - X-CTI
Loaded: loaded (/etc/systemd/system/cti.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-02-15 08:55:02 UTC; 7min ago
Process: 83380 ExecStart=/home/cti/opencti/ct-start.sh (code=exited, status=203/EXEC)
Main PID: 83380 (code=exited, status=203/EXEC)
Feb 15 08:55:02 cti systemd[1]: Started X-CTI.
Feb 15 08:55:02 cti systemd[83380]: cti.service: Failed to execute command: Exec format error
Feb 15 08:55:02 cti systemd[83380]: cti.service: Failed at step EXEC spawning /home/cti/opencti/ct-start.sh: Exec format error
Feb 15 08:55:02 cti systemd[1]: cti.service: Main process exited, code=exited, status=203/EXEC
Feb 15 08:55:02 cti systemd[1]: cti.service: Failed with result 'exit-code'.
Any advices?
Regards, Khalid
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:18
Top Results From Across the Web
OpenCTI Platform on Ubuntu 20.04 - Virus Blog
Finally start the web platform with: yarn serv (inside the opencti directory). Next you will need some workers and connectors to ingest data....
Read more >OpenCTI Installation - Blog
Note: Both virtual machines will require Docker to be installed. While you can install OpenCTI manually, save yourself the hassle and use the ......
Read more >Blog – Page 4
Today we will have some fun with ELK Stack and CentOS. ... Systemd start/stop service on schedule ... Install OpenCTI using Docker.
Read more >systemd System and Service Manager - Freedesktop.org
Starting Update UTMP about System Reboot/Shutdown. ... in the name (but don't like it either) is if you start a sentence with systemd....
Read more >Adding new security data sources to Elastic SIEM | Elastic Blog
Getting started with adding a new security data source in your Elastic ... and Filebeat to run as a service using something like...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

For OpenCTI V4, grakn-core is not needed so you can erase grain-core.service from the lines “After=” and “Requires=”.
I updated the OpenCTI Platform Ubuntu Systemd File.
Sorry i did not find how to upload the files here…