0
votes

I use MFP CLI 7.1 and native Android Studio app. I've started local development server (127.0.0.1) using CLI. I've succeed with app connection to this server.

I'm trying to redeploy app to the remote Tst MFP server (192.168.1.117). This server was started from CLI as well.

I've run mfp push from the app Android Studio project. It completed successfully. I could see native API application in Tst server Operations Console and wlclient.properties has new I.P. and runtime application.

I'm getting following error in logcat for WLClient.connect operation:

D/wl.request: WLRequestSender.run in WLRequestSender.java:40 :: Sending request http://192.168.1.117:10080/tstMFP/apps/services/api/com_example_timurmarkunin_mfpstart/Androidnative/init
D/com.worklight.nativeandroid.common.WLUtils: WLUtils.convertStringToJSON in WLUtils.java:437 :: Input string does not contain brackets, or input string is invalid. The string is: Error 500: FWLSE0304E: Unhandled exception caught: null [project tstMFP]
D/wl.failResponse: WLFailResponse.parseErrorFromResponse in WLFailResponse.java:100 :: Additional error information is not available for the current response and response text is: Error 500: FWLSE0304E: Unhandled exception caught: null [project tstMFP]

Any ideas?

Thanks in advance.

1
Where, in your problem description, are you "moving servers"? You do not explain what you have actually done. Is the IP address shown in the log the IP address you are expecting to see (of the remote server)? Provide the messages.log file. Edit the question and provide full reproduction steps. - Idan Adar
The easy way to reproduce the error: Using CLI: 1. create new MFP project 2. Start server 3. Push Android Studio app to this server 4. Stop server 5. Create new MFP project 6. Start server for the new project 7. Push Android Studio app to the new server (step 6) 8. Try to connect from Android Studio app to the new server - TMarkunin

1 Answers

1
votes

In order to have an application connect to a different MobileFirst Server, you need to:

  1. mfp server add - and provide the remote server's protocol, ip/host, port, admin username/password and adminservices context root (typically the default one)
  2. mfp push given-new-server-name-from-step-1

This will ensure that when pushing the wlapp to the remote server in step 2, it will also update the wlclient.properties in the native project, to use the remote server's IP address.

I have tried this myself with the existing InvokingAdapterProcedures project in MobileFirst Platform Foundation 7.1.