1
votes

I am working with AEM6.3 on Redhat linux server. I have one author and one publish instance on two different linux servers. I am able to start my author instance using the start command (./start) under crx-quickstart/bin folder. But my publish instance is not getting started using the ./start command. I am getting "Sling already active in /mnt/crx/publish/crx-quickstart " error in the stdout.log file as below-

Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
06.09.2017 46:24:38.789 *INFO * [main] Setting sling.home=crx-quickstart (command line)
06.09.2017 46:24:38.789 *INFO * [Apache Sling Control Listener@/277.0.0.9:36038] /277.0.0.9:44314>status
06.09.2017 46:24:38.790 *INFO * [Apache Sling Control Listener@/277.0.0.9:36038] /277.0.0.1:44314<OK
06.09.2017 46:24:38.791 *INFO * [main] Sent 'status' to /277.0.0.9:36038: OK
06.09.2017 46:24:38.792 *ERROR* [main] Sling already active in /mnt/crx/publish/crx-quickstart

I can see some posts with the same error mentioned, but they are for the windows system.

How can I resolve this in the linux?

1

1 Answers

3
votes

Have a look at the ControlListener.java which is referred in the sling launchpad documentation

specifically, the listen method:

boolean listen() {
    final File configFile = getConfigFile();
    if (configFile.canRead() && statusServer() == 0) {
        // server already running, fail
        Main.error("Sling already active in " + this.slingMain.getSlingHome(), null);
        return false;
    }
    .
    .
    .
}

the listen method calls getConfigFilemethod:

private File getConfigFile() {
    final File configDir = new File(this.slingMain.getSlingHome(), "conf");
    return new File(configDir, "controlport");
}

So basically, by default (with default AEM installation) it will look for the file: crx-quickstart/conf/controlport (somewhat documented in the sling launchpad documentation) if it finds and can read it, then it will fail as it thinks there is a running instance. My assumption is that you've stopped a running instance by killing its process or an unexpected shutdown happened.

either way, try this:

  1. copy the file: crx-quickstart/conf/controlport to a different location (as a backup)
  2. Delete the file crx-quickstart/conf/controlport
  3. run your start command

This is hypothetical as I could not reproduce, but looking at launchpad code, this seems like it will fix your issue.