How change ajp port if you run atlas-run
Asked by Petr Ro?e?:

Dear Mr or Mrs,

I have problem with develop jira gadjet. I have problem with my gadjet in confluence.

If I run atlas-debug for jira and for confluence atlas-run, so confluence stop starting with error:

\[ERROR\] confluence: The configured AJP port, 8009, is in use

If I change target\\container\\tomcat9x\\apache-tomcat-9.0.11\\conf\\server.xml, so the atlas-run ignoring this change.

I am using atlassian-plugin-sdk-8.0.7.

Thank you for your help.

Petr


Answers:
author: existpierre
body: ```
<configuration>
    <enableQuickReload>true</enableQuickReload>
    <extractDependencies>true</extractDependencies>
    <ajpPort>8010</ajpPort>

...
```


author: Stephen Sifers
body: Hello Petr,

Thank you for providing the steps you took along with what you're seeing when you have the port conflict. There is an option within atlas-run to specify your ports. This would look similar to as follows:

* --http-port
  * HTTP port for the servlet container. The defaults are as described in the [SDK overview](https://developer.atlassian.com/server/framework/atlassian-sdk/working-with-the-sdk-2818723.html#ports). You may need to change this if you already have a process listed for the default port, such as when you want to bring up two instances of Confluence.
  * **Shortened: -p**
* --ajp-port
  * AJP port for the servlet container. The defaults are as described in the [SDK overview](https://developer.atlassian.com/server/framework/atlassian-sdk/working-with-the-sdk-2818723.html#ports). You may need to change this if you already have a process listed for the default port, such as when you want to bring up two instances of Confluence.
  * **Shortened: -ajp**

Source documentation: [atlas-run](https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-run/)

The above should allow you to manually specify your ports to avoid the conflict with running applications.

I hope this proves helpful and you're able to run atlas-run without further conflicts.

Regards,  
Stephen Sifers

comments: author: Petr Ro?e?
body: Hello Stephen,

thank you for your help, but in atlassian-plugin-sdk-8.0.7 this options missing.

C:\\Users\\procen\>atlas-run --help

Usage: atlas-run \[options\]

Runs the product with your plugin installed.

The following options are available:  
-v \[value\], --version \[value\]  
Version of the product to run (default is RELEASE).

-c \[value\], --container \[value\]  
Container to run in (default is tomcat6x).

-p \[value\], --http-port \[value\]  
HTTP port for the servlet container.

--context-path \[value\]  
Application context path (include the leading forward slash).

--server \[value\]  
Host name of the application server (default is localhost).

--jvmargs \[value\]  
Additional JVM arguments if required.

--log4j \[value\]  
Log4j properties file.

--test-version \[value\]  
Version to use for test resources. DEPRECATED: use data-version instead.

--data-version \[value\]  
Version to use for data resources (default is RELEASE)

--sal-version \[value\]  
Version of SAL to use.

--rest-version \[value\]  
Version of the Atlassian REST module to use.

--plugins \[value\]  
Comma-delimited list of plugin artifacts in GROUP_ID:ARTIFACT_ID:VERSION form, where version can be ommitted, defaulting to LATEST.

--lib-plugins \[value\]  
Comma-delimited list of lib artifacts in GROUP_ID:ARTIFACT_ID:VERSION form, where version can be ommitted, defaulting to LATEST.

--bundled-plugins \[value\]  
Comma-delimited list of bundled plugin artifacts in GROUP_ID:ARTIFACT_ID:VERSION form, where version can be ommitted, defaulting to LATEST.

--product \[value\]  
The product to launch with the plugin.

--instanceId \[value\]  
The product instance to launch with the plugin.

--testGroup \[value\]  
Test group whose products will be launched with the plugin.

-u \[value\], --maven-plugin-version \[value\]  
Maven AMPS plugin version to use (default is 8.0.0)

Blessings,

Petr


author: Stephen Sifers
body: Hello Petr,

I also just confirmed that this flag was removed from the SDK and submitted a documentation review to have this corrected. The case for this change may be found at [DOCS-2917](https://ecosystem.atlassian.net/browse/DOCS-2917).

We did find that this is a bug within the SDK itself and is going to be resolved in a future release. There is a workaround that you may apply now which you can use the following to change the port:

```
-Dajp.port=8010
```

This should allow you to run atlas-run without a port conflict from Confluence or Jira.

Regards,  
Stephen Sifers


Tags: atl-adm

atl-dev

developer

jira