antibm-mobilefirstmobilefirst-cli

404 error deploying production mobilefirst 7.1 environment with ant-cli


I'm trying to deploy with an ant script which works fine with my local developer server, buy when I'm moving to production this is the error that I'm getting:

deploy-environments:
     [echo] **************Deploying all environments*************
    [wladm] Error accessing http://127.0.0.1:9080/worklightadmin/management-apis/1.0/runtimes/RUNTIME/applications?locale=en_US: HTTP/1.1 404 Not Found

BUILD FAILED
/opt/IBM/Compilacion/scripts/app/build.xml:44: com.ibm.worklight.admin.restclient.RESTException: Error accessing http://127.0.0.1:9080/worklightadmin/management-apis/1.0/runtimes/RUNTIME/applications?locale=en_US: HTTP/1.1 404 Not Found
    at com.ibm.worklight.admin.restclient.RESTClient.getResponse(RESTClient.java:1282)
    at com.ibm.worklight.admin.restclient.RESTClient.getResponseWithTimeout(RESTClient.java:1359)
    at com.ibm.worklight.admin.restclient.RESTClient.getPOSTResponse(RESTClient.java:1477)
    at com.ibm.worklight.admin.restclient.RESTClient.getPOSTFileResponse(RESTClient.java:1499)
    at com.ibm.worklight.admin.commands.DeployApp.getResponse(DeployApp.java:41)
    at com.ibm.worklight.admin.restclient.ActionClient.execute(ActionClient.java:93)
    at com.ibm.worklight.admin.ant.types.AbstractActionElement.executeCommand(AbstractActionElement.java:77)
    at com.ibm.worklight.admin.ant.types.ActionElement.executeCommands(ActionElement.java:43)
    at com.ibm.worklight.admin.ant.WladmTask.executeCommands(WladmTask.java:734)
    at com.ibm.worklight.admin.ant.WladmTask.execute(WladmTask.java:473)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
    at org.apache.tools.ant.Main.runBuild(Main.java:853)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)

Total time: 3 seconds

this is is the part where I'm configuring my deploy in my buil.xml

 <target name="deploy-environments">
  <echo message="**************Deploying all environments*************"/> 
    <wladm url="${wl.server.url.deploy}${wl.admserverpath}" user="${wl.user}" password="${wl.pass}" secure="false">
      <deploy-app runtime="${wl.runtime}" file="${app.output.folder}/APP_NAME-android-1.0.wlapp"/>
    </wladm>
  </target> 

Solution

  • the ${wl.admserverpath} variable was wrong, the worklight admin was chango for wladmin