Learn how integrated end-to-end grants-related transfer payments management system helps Government of Ontario website provide streamlined services to organizations. The solution is based on Adobe Experience Manager (AEM) Forms, part of Adobe Marketing Cloud.
Tired of missing out on updates in the AEM community – follow @4Point_ on Twitter and stay atop industry news such as the newest digital trends, creative competitions and social events! >>>
You have just arrived at your office and you open your email. You discover that your AEM system is down and you are getting dozens of messages from staff that are asking you what is happening. You know from that moment on its going to be a rough day. Now what do you do?
We invite you to come visit and subscribe to 4Point’s Youtube channel where you’ll find videos about our most successful Adobe based solutions. There you can find 4Point’s webinar records, customer showcases, and other content that will be regularly updated! >>>
The purpose of this blog is to create an environment where our technical team can share their insights, knowledge, opinions and experiences with you. Questions such as how do we move to a mobile platform? Has anyone one else done it? What are the pitfalls? Does it actually work? Read more >>>
You decided to take the plunge and invested in a full stack AEM development environment. To keep things compact, AEM author, publisher, and dispatcher are installed on a single server. Because you care, you have taken the extra time to set AEM to run as Windows services.
Everything is working as expected. Development workflow has improved and best of all your team can finally test client libraries and caching behaviour in a real world setting.
But something isn’t quite right. One day, after restarting the AEM Author service you get an error message that looks like this:
After a bit of experimentation, you manage to get the Author service started again, but it only works when the AEM Publish service is stopped. Similarly (and frustratingly) the Publish service only runs when the Author service is stopped. Getting both Author and Publish services to run at the same time seems impossible.
What is going on?
This is a very common problem, and today we are going to answer that question. We will explain what is happening, how to get Author and Publish working together again, and how to avoid the problem in the first place.
When troubleshooting, logs are a valuable tool. In AEM, log files are located under “crx-quickstart\logs.” For service start issues, “startup.log” is the ideal starting point.
Here is what it contains:
Based on the details it might be tempting to think this is a licensing issue (ERR: Wrong Key), but it’s not.
The more significant clue comes from the last line, “Sling already active.” Windows uses a control port to manage AEM when run as a service. The problem here is we have used the same control port for both the Author and Publish services. Here is how to fix it.
REUNITING AUTHOR AND PUBLISH
Step 1. Stop Author and Publish Services
Use the Services Console to stop both services. When done, the Services Console will look similar to this:
Step 2. Remove Author and Publish Services
You can do this using the uninstall option of the “instsrv.bat” helper.
You can also use the “SC” Windows command, like this:
Step 3. Delete “controlport” Files
These files located under “crx-quickstart\conf” on both Author and Publish. This file stores control port detail used by the system. There is no need to worry this file will be automatically recreated for you.
Step 4. Update the “instsrv.bat” Helper
This step only needs to happen on Author or on Publish. We’ve chosen to leave the author instance alone, and have made configuration changes on Publish only.
The “instsrv.bat” file lives under “crx-quickstart\opt\helpers” and it is editable using a text editor. The formatting of the file content is an issue, making Notepad a poor choice for the job. We have used Wordpad here but other editors will work too.
Find the control port section and change the port number to something other than the default 63000. We chose 63001. Make sure to use a high range port not already in use.
Save your changes.
Step 5. Recreate AEM Author and Publisher Services
In an administrative command prompt, navigate to “crx-quickstart\opt\helpers” and run “instsrv.bat” first on Author and then on Publish. Provide a meaningful service name as this will show up in the Services list in Windows. We ran the following commands:
· Instsrv.bat AEM-6.2-Author, and
· Instsrv.bat AEM-6.2-Publish
Once done, we have successfully registered our two services.
Before moving on, start both services. Both services should start now.
Step 6. Verify Control Port Settings
If you look under “crx-quickstart\conf” you will notice the “controlport” file will have been recreated for you. Confirming the port settings is as simple as opening this file up in Notepad.
Our configuration file for Author looks like this:
And on Publish, we can see our new port (63001) is now being used.
At this point your development environment is back on track, and Author and Publish are happily reunited.
If you haven’t set your development environment up yet, join in at Step 4 and work your way through until the end.