New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redeployment to cloudhub with applicationName containing UPPERCASE letters caused "Domain not available" error #64

Open
ykyuen opened this Issue Jul 31, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@ykyuen

ykyuen commented Jul 31, 2017

Version: 2.2.1

I could deploy to cloudhub on initial deployment but whenever i tried to update the application by redeployment it will throws Domain is not available error. Here is part of my pom.xml.

<plugin>
  <groupId>org.mule.tools.maven</groupId>
  <artifactId>mule-maven-plugin</artifactId>
  <version>2.2.1</version>
  <configuration>
    <skip>${lc.profile.skip.deploy}</skip>
    <deploymentType>cloudhub</deploymentType>
    <muleVersion>${mule.version}</muleVersion>
    <username>${env.ANYPOINT_USERNAME}</username>
    <password>${env.ANYPOINT_PASSWORD}</password>
    <environment>${lc.profile.env}</environment>
    <redeploy>true</redeploy>
    <application>target/${project.artifactId}-${project.version}.zip</application>
    <applicationName>${lc.profile.env}-${project.artifactId}</applicationName>
    <workerType>Micro</workerType>
    <properties>
       <anypoint.platform.analytics_base_uri>https://analytics-ingest.anypoint.mulesoft.com</anypoint.platform.analytics_base_uri>
       <anypoint.platform.coreservice_base_uri>https://anypoint.mulesoft.com/accounts</anypoint.platform.coreservice_base_uri>
       <anypoint.platform.platform_base_uri>https://anypoint.mulesoft.com/apiplatform</anypoint.platform.platform_base_uri>
       <anypoint.platform.contracts_base_uri>https://anypoint.mulesoft.com/apigateway/ccs</anypoint.platform.contracts_base_uri>
       <anypoint.platform.client_id>${env.ANYPOINT_CLIENT_ID}</anypoint.platform.client_id>
       <anypoint.platform.client_secret>${env.ANYPOINT_CLIENT_SECRET}</anypoint.platform.client_secret>
       <lc.profile.env>${lc.profile.env}</lc.profile.env>
       <lc.profile.api.version>${lc.profile.api.version}</lc.profile.api.version>
       <lc.anypoint.api.name>${lc.anypoint.api.name}</lc.anypoint.api.name>
    </properties>
  </configuration>
  <executions>
    <execution>
      <id>deploy-cloudhub</id>
      <phase>deploy</phase>
      <goals>
        <goal>deploy</goal>
      </goals>
    </execution>
  </executions>
</plugin>

The applicationName depends on properties and if it contains UPPERCASE letters, those letters will be lowercased after the deployment as shown on the Anypoint runtime manager.

And the end, i guess a possible root cause of the error is In the CloudhubDeployer.java, the string comparison at line 97 is case sensitive.

So during the redeployment, the findApplicationFromCurrentUser() would return null since the the string comparison is case sensitive and resulted in Domain is not available error.

@ykyuen ykyuen changed the title from Redeployment with applicationName containing UPPERCASE letters caused "Domain not available" error to Redeployment to cloudhub with applicationName containing UPPERCASE letters caused "Domain not available" error Jul 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment