Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

***URGENT**** CQ5 instance is not getting started

Avatar

Level 3

Hi AEM Guru's,

 

When trying to start our AEM instance i am getting below error. This is bit urgent .. Please help

 

sudo -u cqadm ./start 02.06.2021 01:54:15.040 INFO [main] Setting sling.home=crx-quickstart (command line) ./start: line 89: crx-quickstart/conf/cq.pid: Permission denied

02.06.2021 01:54:15.065 INFO [main] Starting Apache Sling in /opt/cqadm/aem5.6/aemcms/author_407/crx-quickstart

02.06.2021 01:54:15.078 INFO [main] Checking launcher JAR in folder /opt/cqadm/aem5.6/aemcms/author_407/crx-quickstart/launchpad 02.06.2021 01:54:15.451 INFO [Apache Sling Control Listener@/127.0.0.1:2889] Apache Sling Control Listener started02.06.2021 01:54:15.451 ERROR [main] Cannot launch: Cannot install jar:file:/opt/cqadm/aem5.6/aemcms/author_407/crx-quickstart/app/cq-quickstart-5.6.0-standalone.jar!/resources/org.apache.sling.launchpad.base.jar for use 02.06.2021 01:54:15.451 ERROR [main] java.io.FileNotFoundException: /opt/cqadm/aem5.6/aemcms/author_407/crx-quickstart/launchpad/Loader_tmp_1622616855081org.apache.sling.launchpad.base.jar (Permission denied) 02.06.2021 01:54:15.451 ERROR [main] at java.io.FileOutputStream.open(Native Method) 02.06.2021 01:54:15.451 ERROR [main] at java.io.FileOutputStream.<init>(FileOutputStream.java:221) 02.06.2021 01:54:15.451 ERROR [main] at java.io.FileOutputStream.<init>(FileOutputStream.java:171) 02.06.2021 01:54:15.451 ERROR [main] at org.apache.sling.launchpad.base.shared.Loader.spool(Loader.java:270) 02.06.2021 01:54:15.451 ERROR [main] at org.apache.sling.launchpad.base.shared.Loader.installLauncherJar(Loader.java:161) 02.06.2021 01:54:15.451 ERROR [main] at org.apache.sling.launchpad.app.Main.doStart(Main.java:357) 02.06.2021 01:54:15.451 ERROR [main] at org.apache.sling.launchpad.app.Main.doStart(Main.java:322) 02.06.2021 01:54:15.451 ERROR [main] at org.apache.sling.launchpad.app.Main.main(Main.java:123) 02.06.2021 01:54:15.453 ERROR [main] Failed to start Sling; terminating

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @niks1 

 

Please ensure root user is not starting the AEM instance. A service user should be created who should have complete access to /opt/cqadm and the same user should be used to start the application.

 

Please login as root user and make sure none of the java process are running.

 

Then navigate to /opt/cqadm

Execute the below command:

chown -R cqadm:cqadm *
 
now switch back to cqadm user and start the application.
 
The above command syntax is chown -R user:group *. If you do not have cqadm group then you can replace it with "root" i.e. chown -R cqadm:root *

 

Thanks!

View solution in original post

8 Replies

Avatar

Correct answer by
Community Advisor

Hi @niks1 

 

Please ensure root user is not starting the AEM instance. A service user should be created who should have complete access to /opt/cqadm and the same user should be used to start the application.

 

Please login as root user and make sure none of the java process are running.

 

Then navigate to /opt/cqadm

Execute the below command:

chown -R cqadm:cqadm *
 
now switch back to cqadm user and start the application.
 
The above command syntax is chown -R user:group *. If you do not have cqadm group then you can replace it with "root" i.e. chown -R cqadm:root *

 

Thanks!

Avatar

Level 3
@Asutosh_Jena_ - I am trying to run it with cqadm user not the root user

Avatar

Community Advisor

Hi @niks1 

 

Please login as root user and make sure none of the java process are running.

 

Then navigate to /opt/cqadm

Execute the below command:

chown -R cqadm:cqadm *
 
now switch back to cqadm user and start the application.
 
The above command syntax is chown -R user:group *. If you do not have cqadm group then you can replace it with "root" i.e. chown -R cqadm:root *

Avatar

Employee Advisor

Hi @niks1! I have updated my answer with a couple of things to check.

Avatar

Employee Advisor

Hi @niks1!

 

The interesting bits of that log extract are the following:

 

ERROR [main] java.io.FileNotFoundException: /opt/cqadm/aem5.6/aemcms/author_407/crx-quickstart/launchpad/Loader_tmp_1622616855081org.apache.sling.launchpad.base.jar (Permission denied)

 

It seems that at least the mentioned file sis not accessible by the executing user cqadm, probably even more files.

Please double check on the ownership and permissions of all files in your crx-quickstart directory (recursively) to ensure that they all belong to the executing user.

 

chown -r cqadm: /opt/cqadm/aem5.6/aemcms/author_407/*

 

This is a common issue if the instance has been started with a different user (most likely: root) in the past. If this is the case, please have a close look at the startup and error logs once file permissions have been corrected and you restart the instance to see if there are any other side effects.

 

 

Update

 

As you mention that file ownership and permissions look ok, please double check on that trying to read the according file (e. g. just user "cat". That won't produce any readable output but it will show if the user has read access).

Have you just checked the ownership/permissions or did you actually re-set them (recursively)?

Would you mind sharing the current ownership/permissions of that specific file?

 

If ownership and permissions are really set correctly, then there must be some other mechanism that prevents file access. I've seen security tools like selinux causing similar issues in the past. So please double check on the general system logs (/var/log/messages and the like) to see if you find any message related to the AEM startup.

You may also want to execute the startup not using the sudo command from you initial post but actually changing user (su) to the cqadm user and trying to start from there.

 

General advice on trouble shooting:

  • When has the AEM instance been started successfully for the last time?
  • What has changed in the meantime? (On all levels: operating system, file system, Java, AEM, deployments, etc.)
  • Have you tried reverting that change?

 

Hope that helps!

Avatar

Level 3
@markus_bulla_adobe - Application was running fine until last week.. for our server movement we have shutdown the server and unmounted the storage. Once it came back online , we again mounted back the external storage and tried to restart the service. while trying getting this error

Avatar

Employee Advisor
possibly the mount options have changed? Is the server-image (the VM/ bare metal) the same or has it been re-installed? Has the userid (uid) of your aem runtime user changed on the OS level, but it's still the "old" userid on the storage?