View Issue Details

IDProjectCategoryView StatusLast Update
0003560SymmetricDSBugpublic2018-12-05 14:03
ReporterjflambertAssigned To 
Prioritynormal 
Status acknowledgedResolutionopen 
Product Version3.9.7 
Target Version3.10.0Fixed in Version 
Summary0003560: Unable to use SymmetricDS service in Ubuntu 18.04 / bionic beaver (Systemd in general)
DescriptionSymmetricDS service in Ubuntu 18.04 is unusable. Missing a .service file (Service Unit Configuration)

For example: /lib/systemd/system/SymmetricDS.service

see http://manpages.ubuntu.com/manpages/bionic/man5/systemd.service.5.html

Steps To Reproduce# lsb_release -sd
Ubuntu 18.04 LTS

# ./sym_service install
Installing SymmetricDS ...
Done

# service SymmetricDS status
Unit SymmetricDS.service could not be found.

# /etc/init.d/SymmetricDS status
Installed: true
Running: false
Wrapper PID: 0
Wrapper Running: false
Server PID: 0
Server Running: false

# service SymmetricDS start
Failed to start SymmetricDS.service: Unit SymmetricDS.service not found

# /etc/init.d/SymmetricDS start
Waiting for server to start
......
Started
Additional InformationWrite the following file to /lib/systemd/system/SymmetricDS.service
Then create a symbolic link: ln -s /lib/systemd/system/SymmetricDS.service /etc/systemd/system/multi-user.target.wants/SymmetricDS.service

###############
[Unit]
Description=SymmetricDS

[Service]
Type=oneshot
ExecStart=/bin/true
ExecReload=/bin/true
RemainAfterExit=on

[Install]
WantedBy=multi-user.target

Activities

jflambert

2018-05-25 09:10

reporter   ~0001203

I've improved the SymmetricDS.service configuration unit. Still needs to be placed in /lib/systemd/system/SymmetricDS.service

But then you must use these commands to register and enable the service for auto-start (don't use the ln command from my previous suggestion)

systemctl enable SymmetricDS
systemctl start SymmetricDS

This seems to provide with a stable auto-started service. We kind of lose out on the "status" functionality that was built into the original service because systemd takes over. The "After" clause is also very specific to my use case, probably better to use "After=network-online.target" instead, I'll let you guys determine that.


######
[Unit]
Description=SymmetricDS
After=postgresql.service

[Service]
Type=oneshot
RemainAfterExit=yes
Environment="SYM_HOME=/opt/symmetric-server-3.9.6"
Environment="JARFILE=/opt/symmetric-server-3.9.6/lib/symmetric-wrapper.jar"
ExecStart=/usr/bin/java -jar /opt/symmetric-server-3.9.6/lib/symmetric-wrapper.jar start
ExecStop=/usr/bin/java -jar /opt/symmetric-server-3.9.6/lib/symmetric-wrapper.jar stop

[Install]
WantedBy=multi-user.target

Issue History

Date Modified Username Field Change
2018-05-10 13:59 jflambert New Issue
2018-05-25 09:10 jflambert Note Added: 0001203
2018-10-03 13:39 hanes Target Version => 3.10.0
2018-10-17 14:36 hanes Status new => acknowledged
2018-10-29 12:52 hanes Priority high => normal
2018-12-05 14:03 hanes Summary Unable to use SymmetricDS service in Ubuntu 18.04 / bionic beaver => Unable to use SymmetricDS service in Ubuntu 18.04 / bionic beaver (Systemd in general)