Crowd wont autostart
Asked by tw:

Hello, i hope someone could help me. I was installing Atlassian Jira, confluence, and crowd as non root user to an Ubuntu 18.04 Laptop. When i do a cronjob @reboot jira and confluence starts fine. But crowd would not start with the cronjob. When the system is up and running, i can start crowd in terminal with ./start_crowd.sh without any problems. The "HowTo" at [Confluence Dokumentation](https://confluence.atlassian.com/crowd/setting-crowd-to-run-automatically-and-use-an-unprivileged-system-user-on-unix-211649189.html) did not work for me. When i start the script in Konsole i get the following:

wtobais@wtobais-LIFEBOOK-E458:\~/atlassian/application-data/atlassian-crowd-3.3.3$ ./start_crowd.sh  
To run Crowd in the foreground, start the server with ./start_crowd.sh -fg  
Using CATALINA_BASE: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat  
Using CATALINA_HOME: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat  
Using CATALINA_TMPDIR: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/temp  
Using JRE_HOME: /home/wtobais/jdk1.8.0_191  
Using CLASSPATH: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/bin/bootstrap.jar:/home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/bin/tomcat-juli.jar  
Using CATALINA_PID: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/work/catalina.pid  
Existing PID file found during start.  
Removing/clearing stale PID file.

I am not sure whats wrong and i dont have any ideas....

Please help :)


Answers:
author: tw
body: i was trying to autostart crowd with the provided init.d Script. and a symlink in /etc/init.d.

when i restart the notebook jira and confluence is starting fine. I have no error message from crowd but when i try to open http://localhost:8095/crowd/console/secure/console.action i get an side unavailable message in Web Browser. so i have to start crowd manually.


author: Nic Brough -Adaptavist-
body: The message you have pasted here tells us that Crowd is starting up fine, after cleaning up after a Crowd session that was killed rather than shut down correctly.

If it's not starting on a command that is being run, could you show us the errors that you get from that command, rather than a successful start?

You should not really be running crowd with cron, it should be using systemd or init.d scripts (depending on which your prefer)

comments: author: tw
body: with the init.d script i get an unavailable message in WebBrowser, and when i try to start manualy the following in Terminal:

Tomcat appears to still be running with PID 3087. Start aborted.  
If the following process is not a Tomcat process, remove the PID file and try again:  
UID PID PPID C STIME TTY TIME CMD  
wtobais 3087 2836 0 13:28 ? 00:00:00 /usr/lib/gvfs/gvfs-afc-volume-monitor

is there maybe a problem with more instances with tomcat ?


author: Nic Brough -Adaptavist-
body: What does the log file say the error is?


author: tw
body: which logfile did you mean?? sry for the stupid question :D


author: Nic Brough -Adaptavist-
body: Sorry, I should have said. On my crowd machine, I have this:

/opt/crowd-data-3.1.1/logs# ls -l  
total 688  
-rw-r----- 1 charlie charlie 699183 Jan 20 15:00 atlassian-crowd.log


author: tw
body: I am not sure you can take a look on the logfile: <https://cloudpaulokat.ddnss.de/nextcloud/s/xQdFPdyM2rSiaxe>


author: Nic Brough -Adaptavist-
body: That looks like it is running fine. We need to see where it is failing to start. Could you stop it, remove the log file (so we have a clean short one), and the pid file if that has stayed, and then use whatever startup script that is failing to see what it does


author: tw
body: when i use init.d script for starting crowd, there are no log entrys at all. Another Problem in this case is that confluence will not start too. when i dont use init.d for crowd confluence is starting up most of the time......


author: Nic Brough -Adaptavist-
body: Can you log in as root, and run "/etc/init.d/crowd.sh start" (or whatever the script is called) - that should give you an error if Crowd is not starting.


author: tw
body: when i start /etc/init.d/crowd.init.d as non root user the server came up. without any Problem. And the same as root. but it will not autostart... im gonna cry

```
root@wtobais-LIFEBOOK-E458:/etc/init.d# ./crowd.init.d start
Starting Crowd: 
Using CATALINA_BASE: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat
Using CATALINA_HOME: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat
Using CATALINA_TMPDIR: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/temp
Using JRE_HOME: /home/wtobais/jdk1.8.0_191
Using CLASSPATH: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/bin/bootstrap.jar:/home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/work/catalina.pid
Tomcat started.
done.
```

```
wtobais@wtobais-LIFEBOOK-E458:/etc/init.d$ ./crowd.init.d start
Starting Crowd: 
Using CATALINA_BASE: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat
Using CATALINA_HOME: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat
Using CATALINA_TMPDIR: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/temp
Using JRE_HOME: /home/wtobais/jdk1.8.0_191
Using CLASSPATH: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/bin/bootstrap.jar:/home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/bin/tomcat-juli.jar
Using CATALINA_PID: /home/wtobais/atlassian/application-data/atlassian-crowd-3.3.3/apache-tomcat/work/catalina.pid
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.
done
```

are there any limitations about the evaluation license on jira, confluence or crowd ??


author: tw
body: is there a possability that this Problem came from using the same container like described here :

[Unable to Start JIRA when Running with Confluence or Crowd in the Same Application Server Container](https://confluence.atlassian.com/jirakb/unable-to-start-jira-when-running-with-confluence-or-crowd-in-the-same-application-server-container-216433552.html) {#toc-hId-1852530209}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

i think im gonna give it a try....


author: Nic Brough -Adaptavist-
body: Ok, great. There's no limitations with the licence, the problem you have is something to do with the way your "auto start" is configured.


Tags: crowd-administration