1

I'm trying to use the MobileFirst Command Line Interface (7.1) to deploy to a remote MobileFirst 7.1 server.

This server is hosted at http://1.2.3.4:9080/, and the console and admin services are available at the default URLs http://1.2.3.4:9080/worklightconsole and http://1.2.3.4:9080/worklightadmin. I already have the project .war deployed, and have verified this through the admin console (where everything looks normal). I've also verified from my browser that the admin services are reachable. Username and password are the defaults of admin/admin.

I've tried adding a server profile with the command:

/Applications/IBM/MobileFirst-CLI-7.1/mfp server add myserveralias --url http://1.2.3.4:9080 --login admin --password admin

However, this keeps failing with:

Couldn't connect to server 'myserveralias' at 'http://1.2.3.4:9080'.
failed to retrieve runtime information: Unexpected token <: HTTP 404 - Not Found
Server profile 'myserveralias' added successfully.

(I think the "successfully" message is wrong.)

I've tried adding --contextroot /worklightadmin (which I think is the default anyway) and this doesn't seem to make a difference.

There are no proxies or firewalls between the host being used and the MFP CLI.

What am I doing wrong?

Andrew Ferrier
  • 16,664
  • 13
  • 47
  • 76
  • Look at the raw config (~/.ibm/mobilefirst/config.json), and ensure that it has proper values, similar to this: `{ "servers": { "bluemix": { "local": false, "protocol": "http", "host": "134.168.20.196", "port": "9080", "login": "admin", "password": "YWRtaW4=", "contextRoot": "worklightadmin" },` Also, ensure that you can actually get to the OpsConsole using the defined URL. In your case - `http://1.2.3.4:9080/worklightconsole/index.html` – Karl Bishop Nov 11 '15 at 16:36
  • @KarlBishop thanks. Double-checked those values (and that I could navigate to the worklightconsole) - still having the same problem. – Andrew Ferrier Nov 16 '15 at 06:28

1 Answers1

0

The mfp server add command is used to create a server profile. The server profile was created successfully even though it was unable to connect, thus the reason for the successful message. When run in direct mode it will always create the profile in order to support those running in offline mode. If run in interactive mode it will ask if you want to still create the profile when it cannot connect.

What type of server is the remote server? Is it a Bluemix server? Does it contain a runtime?

  • 1
    The server is a server being hosted locally on docker (specifically, I'm using docker-machine on OS X). I've verified that the IP and port I'm trying to deploy to are reachable via a browser. – Andrew Ferrier Nov 16 '15 at 06:29