I am using Mulesoft API Manager with 3.8.3 Runtime Engine.
We have created an API implementation with HTTPS and port 3105. In Anytime Studio the API runs ok, and it is related to an api-domain-config project, which was created to define an api-gateway domain in the server. When the API is running ok in the Anypoint studio, the URL address is https://localhost:3105/api/TestMessage and it can be launched successfully from any browser and receive the appropriate response.
The standalone Runtime engine was created in the same computer, and it runs when the Anypoint Studio is off and vice versa. This is because we want this API being call from another APIM Gateway outside.
After running ok in Anypoint Studio, we generate the zip file including the parent project (api-gateway) and deploy in the RT Manager. The application deploys ok apparently, and furthermore it shows an “Started” status. However, when you review the logs, will find that there was an error starting up the api-gateway domain…java.net.BindException Address already in use.
DOMAIN + - - - - + STATUS + - - default DEPLOYED api-gateway FAILED
APPLICATION DOMAIN STATUS
default default DEPLOYED
apitestmock default DEPLOYED
And the error found before in the log is:
org.mule.module.launcher.DeploymentStartException: Failure trying to start domain api-gateway at org.mule.module.launcher.domain.DefaultMuleDomain.start(DefaultMuleDomain.java:279) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.artifact.ArtifactWrapper$4.execute(ArtifactWrapper.java:105) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:136) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.artifact.ArtifactWrapper.start(ArtifactWrapper.java:100) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.domain.DomainWrapper.start(DomainWrapper.java:66) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:26) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:309) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedApp(DefaultArchiveDeployer.java:296) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedArtifact(DefaultArchiveDeployer.java:95) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DomainArchiveDeployer.deployExplodedArtifact(DomainArchiveDeployer.java:60) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DomainArchiveDeployer.deployExplodedArtifact(DomainArchiveDeployer.java:32) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DeploymentDirectoryWatcher.deployExplodedDomains(DeploymentDirectoryWatcher.java:472) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:143) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:134) ~[mule-module-launcher-3.8.3.jar:3.8.3] at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:172) ~[mule-module-launcher-3.8.3.jar:3.8.3] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_101] at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:52) ~[mule-module-boot-ee-3.8.3.jar:3.8.3] at org.tanukisoftware.wrapper.WrapperManager$11.run(WrapperManager.java:4242) ~[wrapper-3.5.29.jar:3.5.29] Caused by: org.mule.module.launcher.DeploymentStartException: BindException: Address already in use: bind at org.mule.module.launcher.domain.DefaultMuleDomain.start(DefaultMuleDomain.java:259) ~[mule-module-launcher-3.8.3.jar:3.8.3]
And if you execute the URL shown above, which is the same because is the same computer, it only responds “No listener for endpoint: /api/TestMessage”.
Please your comments about how to possibly solve this. Any help would be appreciated.
Thank you!
The solution was not including the domain in the zip file of the project. And the domain api-gateway had to be created first, just dropping the domain project zip file into the RT engine domains folder. After done that, the app worked fine after installed.