You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to run cortex.service from systemd fails, issue described below:
Request Type
Bug/misconfiguration
Work Environment
Question
Answer
OS version (server)
Ubuntu
Cortex version / git hash
cortex-2.1.2
Package Type
From source
Problem Description
service cortex status
â cortex.service - cortex
Loaded: loaded (/usr/lib/systemd/system/cortex.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-12-03 ; 26min ago
Docs: https://thehive-project.org
Main PID: 1146 (code=exited, status=255)
cortex[1146]: at java.io.FileInputStream.open(FileInputStream.java:195)
cortex[1146]: at java.io.FileInputStream.(FileInputStream.java:138)
cortex[1146]: at java.io.FileInputStream.(FileInputStream.java:93)
cortex[1146]: at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
cortex[1146]: at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
cortex[1146]: at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:52)
cortex[1146]: ... 13 more
systemd[1]: cortex.service: Main process exited, code=exited, status=255/n/a
systemd[1]: cortex.service: Unit entered failed state.
systemd[1]: cortex.service: Failed with result 'exit-code'.
Steps to Reproduce
sudo addgroup cortex
sudo adduser --system cortex
sudo cp /opt/cortex/package/cortex.service /usr/lib/systemd/system
sudo chown -R cortex:cortex /opt/cortex
sudo chgrp cortex /etc/cortex/application.conf
sudo chmod 640 /etc/cortex/application.conf
sudo systemctl enable cortex
sudo service cortex start
````
### Possible Solutions
https://github.com/TheHive-Project/TheHive/issues/29
Applied parameter below (removing it doen't work either):
````
-Dpidfile.path=/opt/cortex/RUNNING_PID
````
### Complementary information
/usr/lib/systemd/system/cortex.service
````
[Unit]
Description=cortex
Documentation=https://thehive-project.org
Wants=network-online.target
After=network-online.target
[Service]
WorkingDirectory=/opt/cortex
User=cortex
Group=cortex
ExecStart=/opt/cortex/bin/cortex \
-Dconfig.file=/etc/cortex/application.conf \
-Dlogger.file=/etc/cortex/logback.xml \
-Dpidfile.path=/opt/cortex/RUNNING_PID
StandardOutput=journal
StandardError=inherit
# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
# Disable timeout logic and wait until process is stopped
TimeoutStopSec=0
# SIGTERM signal is used to stop the Java process
KillSignal=SIGTERM
# Java process is never killed
SendSIGKILL=no
# When a JVM receives a SIGTERM signal it exits with code 143
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
````
The text was updated successfully, but these errors were encountered:
Figured out the issue, the install guide for Cortex needs to include the following if using systemd to run cortex.service as it is missing in the specified path as described in /usr/lib/systemd/system/cortex.service
Attempting to run cortex.service from systemd fails, issue described below:
Request Type
Bug/misconfiguration
Work Environment
Problem Description
service cortex status
â cortex.service - cortex
Loaded: loaded (/usr/lib/systemd/system/cortex.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-12-03 ; 26min ago
Docs: https://thehive-project.org
Main PID: 1146 (code=exited, status=255)
cortex[1146]: at java.io.FileInputStream.open(FileInputStream.java:195)
cortex[1146]: at java.io.FileInputStream.(FileInputStream.java:138)
cortex[1146]: at java.io.FileInputStream.(FileInputStream.java:93)
cortex[1146]: at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
cortex[1146]: at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
cortex[1146]: at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:52)
cortex[1146]: ... 13 more
systemd[1]: cortex.service: Main process exited, code=exited, status=255/n/a
systemd[1]: cortex.service: Unit entered failed state.
systemd[1]: cortex.service: Failed with result 'exit-code'.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: