MFP 8 Server Maintenance - ibm-mobilefirst

Is there any default way to enable/disable maintenance in MFP 8 ? So that, App should not be accessible. Also, if MFP is down, what's the default message to check UNRESPONSIVE_HOST or UNKNOWN_ERROR ? Pl help !

There is no way to enable maintenance in MFP 8 from the app, it can only be done from the mfp server console only. Workaround - You can put custom Pop up in error callback for every call made to the MFP server.

Related

Push notification does not work on mobilefirst platform 7.1 server

We have develop a cross platform app with mobilefirst studio 7.0 and test it on production environment.
It was fine before we upgrade our project with mobilefirst studio 7.1.0.00-201510120-1525 and test it on clean staging server (7.1.0.0 20151012-1525).
It seems that the push notification functionality dedicated on mobilefirst 7.0 did not work properly on production server of mobilefirst platform version 7.1. The source code and configuration file of our mobilefirst push notifcation adapter and configuration files are here.
Inorder to fix the issue, we refer to official push notification tutorial which was documented here.
Surprisingly, although the source project in official tutorial looks fine on development server, it still not work on production server either.
We have test this project using iphone5s with ios 8.4 and HTC 816h phone with android 4.4.2, both of them fail to register push notification service after we login to the HybridEventSource sample application and tap the “Subscribe Notification” button.
The Mobilefirst server logs down internal server error message during the registration process of client devices.
I am wondering how to let the push notification mechanism work again on mobilefirst 7.1?
Either a valid push notification sample code of mobilefirst 7.1 or any fix pack which we do not know is welcomed.
Since we did not authenticate users via mobilefirst server, and devices were connected through vpn to server,
we prefer to have a solution which does not depends on particular mobilefirst server side authentication mechanism.
The server log message generated during this test is in this file.
The log file generated while we run EventSourceNotification app as xcode project is in this file.
For detail system log from ios device, please refer to device log file
And the Log message generated by HTC 816h android 4.4.2 phone is here
Information about our server environment:
Operating system : centos 5.8 linux
Java development kit : Oracle jdk 1.8 update 65 x86-64
Application server : Apache tomcat server 7.0.63
Worklight environment database : oracle database 11g.
Apple push notification service certificate : sandbox version
Well that's kinda suspicious, isn't it?
Since we did not authenticate users via mobilefirst server, and devices were connected through vpn to server, we prefer to have a solution which does not depends on particular mobilefirst server side authentication mechanism.
You are using the push mechanism provided by MFPF but you do not want to go through MFPF? You are required to go through MFPF if you want to use the push mechanism provided by MFPF... What did you mean by the above?
That said, did your DBA examine mf7-1-EventSourceNotifications-catalina.out.log? There are quite a few Oracle-related exceptions there that you should look at.
If you are still unable to resolve it I suggest to open a PMR instead so that the development team will be able to further investigate.

MobileFirst application not using deployed adapter, attempting to use development server adapter instead

I'm running MobileFirst 7.0 on a Liberty installation.
Having successfully deployed my application and adapter into the runtime, the preview, when run from the servers operations console, is apparently trying to communicate with the adapter from the development server rather than the one running on Liberty.
[/MaximoMobile/apps/services/api/PhyCount/common/query] failure. state: 404, response: undefined
The runtime on the server is not called MaximoMobile, that is just the name of the project within Eclipse. It shouldn't be being referenced at all outside of the local copy of Mobilefirst.
I've looked up documentation in instructing the application to use the deployment server rather than the development server using JNDI entries in the server.xml file (http://www-01.ibm.com/support/knowledgecenter/SSHSCD_6.3.0/com.ibm.worklight.deploy.doc/admin/t_using_JNDI_lookup_to_override_WL_properties.html), but I can't see anything incorrectly set, or anything even relating to the adapter.
I have managed to set the endpoint to /worklight as required using Eclipse, but it's still returning 404 and attempting to access a non-existent file.
Answering my own question for people who may later stumble upon this looking for an answer:
The preview on the server doesn't work in the same way as the local preview does, and any part of the interface that requires an adapter won't function.
If you need to test the connection to the server, deploying to a device will allow you to do so!

IBM Worklight - push notifications from standalone server take longer to arrive compared to development server

I'm using Worklight 6.1 on Liberty profile 8.5.5 in Windows XP in a VMWare in a Mac.
I have an Android app that receives notifications. I'm using an adapter to send the notifications.
It is my own app but the adapter is the same as in the push notifications sample project provided by IBM.
For sending the notification I'm directly calling the adapter from a browser using the REST call (protocol://server:port/app/[dev/]invoke?adapter=myAdapter&procedure...)
When I execute the application in the development server the notifications arrives almost immediately, but when I test the application in the test server (mentioned above) the notifications takes a lot of time to arrive, if they arrive.
However, when the notification does arrive, the next notifications arrives in seconds.
It is something I have experienced in the past also with previous Worklight versions.
I do not know what is the difference between the servers or if the problem is related to the server.
Any hints for debugging this?
I have enabled the trace:
<logging traceSpecification="*=audit=enabled:com.worklight.integration.notification.*=finest=enabled" />
I can see the trace:
com.worklight.integration.notification.gcm.GCMSender 1 sendNoRetry Sending JSON to GCM server: {"collapse_key":"myPush","data":{"alert":"Hay una nueva ficha","payload":"{\n \"alias\": \"myPush\",\n \"identificador\": \"a035\",\n \"nombre\": \"aName35\"\n}","badge":"1"},"registration_ids":["APA91bG03cXkyVM6pA2-CO1g-tZUQL6FwJgugaa68YngIyGbbR_oDzVNn-1RULpoktvMUKwF3D1qK4bx-4OVeAbUzBqNpqO3m_1hwz0Z6I0B_DS_Jvc0wzI_fjKpJ9vqPNO58Bdt40ms"]} [project DemoM]
But I do not know if that trace means that everything has gone ok and the message is now in the GCM servers.
I have also enabled sniffers (WireShark in Mac and SmartSniff in XP) in dev server and stand alone server but I have not been able to detect any pattern. Everything is under https so I only see some traces for google hosts but I can not take any conclusions. Although it is valid to see a trace for google gcm immediately after the server trace that takes less than 500ms
Anyway now it is taking time to the notification to arrive in both servers so I guess everything is working fine in the worklight side.

IBM Worklight 6.0 - Busy indicator remains displayed in AppCenter client

After successfully building the AppCenter client application and launching it in an iOS device, my problem is that when I enter my Worklight Server credentials, the server URL and the port and with or without the applicationcenter context, the loading progress keeps running...
How to solve this issue?
I agree with Idan, first thing to do is to run the application center client on the iOS emulator and look at the device logs. I have seen the loading never ending when the client was not compiled correctly, note that the native folder of the application center client worklight project contains native code (a cordova plugin) that needs to be present in order for the application to run properly. If this is the problem you are facing, the cordova log will tell you that the plugin named 'com.ibm.mobile.InstallerPlugin' is missing.

Check programmatically if glassfish is running in debug mode

To provide special debug information I want to know if the glassfish server is running in debug mode. Is it possible to check the running mode programmatically?
GlassFish Server offers a REST API for management and monitoring. You can connect to the DAS and parse the jvm options:
http://localhost:4848/management/domain/list-jvm-options.html
or:
http://localhost:4848/management/domain/list-jvm-options.json
or:
http://localhost:4848/management/domain/list-jvm-options.xml
Hope this helps!