Search code examples
mulesoft

Mulesoft Deployment failed with password key-store


i am running my project with 8.5.0 run time server, during the deployment I am getting below error

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact 'mule-customer', see below  +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
org.mule.module.launcher.DeploymentInitException: IllegalArgumentException: Could not resolve placeholder 'https.port' in string value "<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="${https.port}" doc:name="HTTP Listener Configuration" protocol="HTTPS">
<tls:context doc:name="TLS Context">
<tls:key-store path="keystore.jks" password="password" keyPassword="password"></tls:key-store>
</tls:context>
</http:listener-config>"
    at org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:212) ~[mule-module-launcher-3.8.5.jar:3.8.5]
    at org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:63) ~[mule-module-launcher-3.8.5.jar:3.8.5]
    at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:136) ~[mule-module-launcher-3.8.5.jar:3.8.5]
    at org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:58) ~[mule-module-launcher-3.8.5.jar:3.8.5]

Here the configuration.xml file which is referring keysore.jks file in resources direcotry


<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="${https.port}"
  doc:name="HTTP Listener Configuration" protocol="HTTPS">
   <tls:context doc:name="TLS Context">
   <tls:key-store path="keystore.jks" password="password" keyPassword="password"/>  
  </tls:context>
</http:listener-config>

Solution

  • The configuration you show uses a property called https.port, however that property has not been defined anywhere in the application or the runtime. You need to define it.

    See the documentation on how to define properties through properties files o System properties: https://docs.mulesoft.com/mule-runtime/3.8/configuring-properties

    Note that if you are planning to deploy to CloudHub that value will be overwritten because some properties are predefined in CloudHub.