[RTFACT-20383] artifactory service start fails with zip installation on ubuntu 18.04 Created: 09/Jun/18  Updated: 03/Nov/19  Resolved: 29/Oct/19

Status: Resolved
Project: Artifactory Binary Repository
Component/s: None
Affects Version/s: None
Fix Version/s: 6.14.0

Type: Bug Priority: Normal
Reporter: Makson Lee Assignee: Eldad Assis
Resolution: Fixed Votes: 9
Labels: InstallersQA, UGA
Environment:

ubuntu: 18.04


Issue Links:
Contains(WBSGantt)
is contained in RTFACT-16618 Support Ubuntu 18.04 LTS - Debian ins... Resolved
Relationship
relates to RTFACT-20384 systemctl is not working for zip ins... Resolved
is related to RTFACT-20382 Redhat 7.7 will break the systemd int... Resolved
Assigned QA: Konstantin Shenderov (Inactive)

 Description   

$ sudo service artifactory start

Job for artifactory.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status artifactory.service" and "journalctl -xe" for details.

$ tail -10 /var/log/syslog

Jun  9 10:25:09 artifactory systemd[1]: Failed to start Setup Systemd script for Artifactory in Tomcat Servlet Engine.
Jun  9 10:25:14 artifactory systemd[1]: artifactory.service: Service hold-off time over, scheduling restart.
Jun  9 10:25:14 artifactory systemd[1]: artifactory.service: Scheduled restart job, restart counter is at 2.
Jun  9 10:25:14 artifactory systemd[1]: Stopped Setup Systemd script for Artifactory in Tomcat Servlet Engine.
Jun  9 10:25:14 artifactory systemd[1]: Starting Setup Systemd script for Artifactory in Tomcat Servlet Engine...
Jun  9 10:25:14 artifactory artifactoryManage.sh[10797]: /usr/bin/java
Jun  9 10:25:14 artifactory artifactoryManage.sh[10797]: Artifactory Tomcat already started
Jun  9 10:25:14 artifactory systemd[1]: artifactory.service: Can't open PID file /opt/artifactory/run/artifactory.pid (yet?) after start: No such file or directory
Jun  9 10:25:14 artifactory systemd[1]: artifactory.service: Failed with result 'protocol'.
Jun  9 10:25:14 artifactory systemd[1]: Failed to start Setup Systemd script for Artifactory in Tomcat Servlet Engine.



 Comments   
Comment by Batel Tova [ 13/Jun/18 ]

This is a service installation a zip installation that equal to RTFACT-16618

Comment by Louis-Gabriel Thibault [ 20/Dec/18 ]

Please see http://vivin.net/2018/09/26/getting-artifactory-running-on-ubuntu-18-04/

Comment by heapifyman [ 07/Jan/19 ]

Louis-Gabriel Thibault it appears the link above is dead?

Comment by Louis-Gabriel Thibault [ 07/Jan/19 ]

Link is dead to me too.

Problem is bionic systemd being more restrictive with PID file permission (see http://manpages.ubuntu.com/manpages/bionic/man5/systemd.service.5.html section PIDFile=). So the idea is to modify artifactoryService.sh so its PID file routines perform as root and not as user artifactory. There are 4 lines where the solution is to inject "su" or "sudo -u" IIRC. 

Hope this helps.

I'm sorry I cannot provide specifics right now; I'll update this post when I can.

 

Comment by Jason Williams [ 11/Jan/19 ]

Wayback machine archived it:

http://web.archive.org/web/20181012191636/http://vivin.net/2018/09/26/getting-artifactory-running-on-ubuntu-18-04/

Comment by Louis-Gabriel Thibault [ 11/Jan/19 ]

Nice catch Jason Williams. I just reviewed your link and confirm this is a working fix for us.

Comment by heapifyman [ 12/Jan/19 ]

Louis-Gabriel Thibault the changes described in the linked tutorial seem to be working. Thanks.

However, they are reverted again once artifactory gets updated via apt, for example.

How would you prevent that from happening?

Comment by alix [ 05/Aug/19 ]

Any progress people ?

Comment by Eldad Assis [ 17/Aug/19 ]

Related to systemd

Comment by Julian Berks [ 05/Sep/19 ]

This also affects RHEL

It is systemd but does that mean that Jfrog no longer supports systemd? as artifactoryManage.sh is no longer compatible.

The fix is basically per http://web.archive.org/web/20181012191636/http://vivin.net/2018/09/26/getting-artifactory-running-on-ubuntu-18-04/, except that with the update from 6.12.0 to 6.12.1 you need to go further and update ALL su commands rather than just the 2 detailed in the doc.

The other catch was the derby db.lck which is owned by root and needs to be deleted so the Artifactory user can create a new one.

Comment by Michael [ 27/Sep/19 ]

Julian Berks Thanks for the link.  I was able to get our Artifactory install working through systemd using that article and a few other changes.  I have a puppet manifest to manage the changes needed if you like a copy.

Generated at Thu Nov 21 06:12:54 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.