Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Boost 1
Level 1
niks1
Level 1

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
View profile

Avatar
Boost 1
Level 1
niks1
Level 1

Like

1 like

Total Posts

22 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
Give Back
View profile
niks1
Level 1

02-06-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

551 likes

Total Posts

663 posts

Correct Reply

191 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

551 likes

Total Posts

663 posts

Correct Reply

191 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

02-06-2021

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!

Answers (1)

Answers (1)

Avatar

Avatar
Boost 100
Employee
markus_bulla_adobe
Employee

Likes

104 likes

Total Posts

86 posts

Correct Reply

44 solutions
Top badges earned
Boost 100
Applaud 25
Affirm 25
Boost 50
Boost 25
View profile

Avatar
Boost 100
Employee
markus_bulla_adobe
Employee

Likes

104 likes

Total Posts

86 posts

Correct Reply

44 solutions
Top badges earned
Boost 100
Applaud 25
Affirm 25
Boost 50
Boost 25
View profile
markus_bulla_adobe
Employee

02-06-2021

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!