Search code examples
ibm-cloudibm-mobilefirst

MFPF on IBM Container using Cloudant doesn't work


I followed the steps below and choose Cloudant for it's database.

Run IBM MobileFirst Platform Foundation on IBM Containers https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/bluemix/run-foundation-on-bluemix/

It seems that creating db commands executed successfully.

./prepareserverdbs.sh args/prepareserverdbs.properties
Arguments : 
----------- 

DB_TYPE :  cloudantNoSQLDB
DB_SRV_NAME :  container1114
DB_SRV_PLAN :  Shared
APP_NAME :  container1114
RUNTIME_NAME : 
SCHEMA_NAME :  WLADMIN

Creating database Service - container1114
Successfully created Database Service
Creating application 'container1114'
Application Created Successfully
Getting database configuration
Configuration saved in file '../usr/config/wladmin.xml'
Successfully Completed Cloudant NoSQL DB Service Binding
bash-3.2$ ./prepareserverdbs.sh args/prepareserverdbs.properties
Arguments : 
----------- 

DB_TYPE :  cloudantNoSQLDB
DB_SRV_NAME :  container1114
DB_SRV_PLAN :  Shared
APP_NAME :  container1114
RUNTIME_NAME :  AdapterBasedAuth
SCHEMA_NAME :  AdapterBasedAuth

Database service 'container1114' exists
Application 'container1114' exists
Getting database configuration
Configuration saved in file '../usr/config/AdapterBasedAuth.xml'
Successfully Completed Cloudant NoSQL DB Service Binding

But when I open the Cloudant web console, I don't see any databases.

I created container using this cloudant service binded app successfully. But when I open MFPF console, I don't see any apps. And I got following error in "messages.log".

How can I fix this?

[11/13/15 12:31:40:955 UTC] 000000b4 com.ibm.worklight.management.ui.servlet.ServiceProxy         E Exception Server returned HTTP response code: 500 for URL: http://134.168.23.233:9080/worklightadmin/management-apis/1.0/runtimes?fullInfo=true while redirecting request to http://134.168.23.233:9080/worklightadmin/management-apis/1.0/runtimes?fullInfo=true
[11/13/15 12:34:56:406 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant URL = https://e8ebde9a-5f33-4364-8eb0-d77a028f5f66-bluemix:c27f9feffefc04bf53321c1185757fed47b0d6775334ee802bc0a180xxxxxx@e8ebde9a-5f33-4364-8eb0-d77a02xxxxxxx-bluemix.cloudant.com
[11/13/15 12:34:56:406 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Databasename = mfp_admin_db
[11/13/15 12:34:56:406 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Username = e8ebde9a-5f33-4364-8eb0-d77xxxxx6-bluemix
[11/13/15 12:34:56:406 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Password = ****************************************************************
[11/13/15 12:34:56:406 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Connect Timeout = null
[11/13/15 12:34:56:406 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Socket Timeout = null
[11/13/15 12:34:56:406 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Max Connections = null
[11/13/15 12:34:56:407 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant SSL Authentication = null
[11/13/15 12:34:56:407 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant SSL Configuration = null
[11/13/15 12:34:56:407 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Proxy Host = null
[11/13/15 12:34:56:407 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Proxy Port = null
[11/13/15 12:34:56:408 UTC] 000000ef com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant URL = https://e8ebde9a-5f33-4364-8eb0-d77a028f5f66-bluemix:c27f9feffefc04bf53321c1185757fed47b0d6775334ee802bc0a1800b2746e4@e8ebde9a-5f33-4364-8eb0-d77a0xxxxxx-bluemix.cloudant.com
[11/13/15 12:34:56:408 UTC] 000000ef com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Databasename = mfp_admin_db
[11/13/15 12:34:56:408 UTC] 000000ef com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Username = e8ebde9a-5f33-4364-8eb0-d77a028f5f66-bluemix
[11/13/15 12:34:56:408 UTC] 000000ef com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Password = ****************************************************************
[11/13/15 12:34:56:408 UTC] 000000ef com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      I Cloudant Connect Timeout = null
[11/13/15 12:34:56:407 UTC] 000000eb com.ibm.worklight.admin.datastore.DataStoreCloudantUtil      E Failed to allocate Cloudant Data Store even though it is configured.

Solution

  • FYI, in case of CloudantDB, the prepareserverdb.scripts doesnt create any tables. It happens during the creation of the container using the startserver scripts.

    When you face any problem, you can have a look at the Bluemix status notification page. It will show you every service state live.

    https://status.ng.bluemix.net/

    Did you add any project runtimes (WAR) before performing the prepareserver.sh script operation. Runtimes (not apps) will be displayed on the MFPF console only after adding the projects before performing the image build (post customization). You can add your apps, adapters after login into the admin console under the Runtime.

    For example... MobileFirstStarter image based container has only single runtime by default called "MobileFirstStarter"