0

I'm trying to install OrientDB on my Raspberry 3, and configure it to run it as a service. I'm following the instruction found at here.
I downloaded the binaries, and unpacked them at /opt/orientdb/ directory. I have successfully started the OrientDB database using the server.sh, and I've logged into OrientDB Studio locally. The problem is only when trying to run it as a service.
I edited the orientdb.sh file as instructed

# You have to SET the OrientDB installation directory here
ORIENTDB_DIR="/opt/orientdb"
ORIENTDB_USER="pi"
LOG_DIR="../log"

And I copied it over to /etc/init.d. However, whenever I try to start the service, I get the error below:

pi@raspberrypi:~ $ sudo service orientdb start
Failed to start orientdb.service: Unit orientdb.service failed to load: No such file or directory.

I haven't being able to determine the reason behind this error.

* UPDATE *

Looking at this post, I executed the command sudo systemctl enable orientdb, and I got this error:

Synchronizing state for orientdb.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d orientdb defaults
insserv: warning: script 'orientdb' missing LSB tags and overrides
Executing /usr/sbin/update-rc.d orientdb enable
update-rc.d: error: orientdb Default-Start contains no runlevels, aborting.

After this, when I execute the sudo systemctl start orientdb, I no longer get the error, but also nothing happens. and nothing is generated in the log folder

* UPDATE *

I'm using Raspbian. Below is the result of the command systemctl cat orientdb.service.

pi@raspberrypi:/opt/orientdb $ systemctl cat orientdb.service
# /run/systemd/generator.late/orientdb.service
# Automatically generated by systemd-sysv-generator

[Unit]
SourcePath=/etc/init.d/orientdb
Description=SYSV: OrientDb init script
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutd
After=xrdp.service triggerhappy.service
Conflicts=shutdown.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SysVStartPriority=2
ExecStart=/etc/init.d/orientdb start
ExecStop=/etc/init.d/orientdb stop

Thanks

  • What part of the instruction do you follow? You should use systemd. Please edit your question and add the output of this command to it: systemctl status orientdb.service. – Ingo Jun 1 at 17:22
  • @Ingo I get the exact same error for both – Pascal Jun 1 at 17:45
  • @Ingo There's an edit – Pascal Jun 1 at 18:00
  • What operating system do you use? this link you have given sugested to "1. Create the service". So what is your service? Please edit your question and add the output of this command to it: systemctl cat orientdb.service or what the name of your service is. – Ingo Jun 1 at 20:13
  • @Ingo First of all, thank you for taking some of your precious time to help me. I've updated my question. – Pascal Jun 2 at 11:00
2

Your Unit file shows:

# /run/systemd/generator.late/orientdb.service
# Automatically generated by systemd-sysv-generator

This means you have used the old style deprecated SysV init system to start OrientDB. But Raspbian uses systemd as init system and only emulates SysV for backward compatibility. It is known that this has limitations due to Compatibility with SysV.

If you have problems with the emulation, it is strongly recommended to use systemd direct to start OrientDB. The documentation you have used does show how to do it. You should completely revert your settings for SysV and use the instruction to create the Unit file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.