0
votes

I'm on a mac pro. Have Yosemite (10.10.3) installed and also have the MobileFirst 6.3 CLI installed in an attempt to automate our mobile projects. We have this working on a mac mini but this doesn't seem to work with the same setup on the mac pro (the machine that works is a mac mini (10.10.3) with the Mobile first 6.3 CLI and java 7 u60 installed, which is the same as the mac pro).

There seems to be something eerie going on but I'm not entirely sure what or how to resolve it. I am getting:

Error accessing http://9.41.129.110:10080/worklightadmin/management-apis/1.0/runtimes/PerchReadyApp/adapters?locale=en_US: HTTP/1.1 404 Not Found

When i try to run mfp stop then mfp restart within a MFP project directory, the CLI consistently fails with the following error.

runtime-status:
    [wladm] <?xml version="1.0" encoding="UTF-8"?>
    [wladm] <runtime name="PerchReadyApp" numberOfAdapters="3" numberOfApplications="1" synchronizationStatus="ok" running="false" auditEnabled="true" productVersion="6.3.0.00-20150214-1702"/>

BUILD SUCCESSFUL
Total time: 1 second
mobilefirst-cli verb ant variables -Dbasedir=/Users/milbuild/jenkins-build/workspace/test_mil-pro/PerchReadyApp
mobilefirst-cli verb ant variables -Dworklight.jars.dir=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib
mobilefirst-cli verb ant variables -Dworklight.ant.tools.dir=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/ant-tools
mobilefirst-cli verb ant variables -Dworklight.hostname=9.41.129.110
mobilefirst-cli verb ant variables -file=/Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml
mobilefirst-cli verb ant task deploy-All
Buildfile: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml

deploy-All:

deploy-Adapters:
     [echo] Deploy MobileFirst adapters for project PerchReadyApp
     [echo] Deploying MobileFirst Adapter /Users/milbuild/jenkins-build/workspace/test_mil-pro/PerchReadyApp/bin/AuthenticationAdapter.adapter to http://9.41.129.110:10080/worklightadmin
     [echo] Username admin
    [wladm] Error accessing http://9.41.129.110:10080/worklightadmin/management-apis/1.0/runtimes/PerchReadyApp/adapters?locale=en_US: HTTP/1.1 404 Not Found
    [wladm] FWLSE3002E: The resource is not found.
    [wladm] FWLSE3041E: No MBean found for MobileFirst project 'PerchReadyApp'. Possibly the MobileFirst runtime web application for MobileFirst project 'PerchReadyApp' is not running. If it is running, use JConsole to inspect the available MBeans. If it is not running, full error details are available in the Worklight Development Server Eclipse Console view.
mobilefirst-cli verb cli finish with mobilefirst restart
mobilefirst-cli verb code 1

The following is the output from the messages.log in the Liberty server that the CLI is using to deploy the application. There are more messages but this is the first error on the liberty server start process.

[5/22/15 13:48:19:925 CDT] 00000030 com.ibm.worklight.dataaccess.datastore.DataStoreUtil         I getWorklightDataSourceProperties Read properties file. allProperties: {ibm.worklight.admin.db.jndi.name=java:comp/env/jdbc/WorklightAdminDS}
[5/22/15 13:48:19:942 CDT] 00000030 com.ibm.worklight.dataaccess.datastore.DataStoreUtil         I Resource conf/jndi/default.properties not found. This is not an error. Context path is /worklightadmin
[5/22/15 13:48:19:953 CDT] 00000030 com.ibm.worklight.dataaccess.datastore.DataStoreUtil         I dereferenceProperties Handling propName=ibm.worklight.admin.db.jndi.name propValue=java:comp/env/jdbc/WorklightAdminDS
[5/22/15 13:48:19:953 CDT] 00000030 com.ibm.worklight.dataaccess.datastore.DataStoreUtil         I dereferenceProperties Handling propName=ibm.worklight.admin.db.openjpa.Log propValue=
[5/22/15 13:48:19:953 CDT] 00000030 com.ibm.worklight.dataaccess.datastore.DataStoreUtil         I dereferenceProperties Handling propName=ibm.worklight.admin.db.type propValue=
[5/22/15 13:48:20:067 CDT] 00000030 com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl              I CWRLS0010I: Performing recovery processing for local WebSphere server (Cell\Node\Server).
[5/22/15 13:48:20:101 CDT] 00000030 com.ibm.ws.recoverylog.spi.RecoveryDirectorImpl              I CWRLS0012I: All persistent services have been directed to perform recovery processing for this WebSphere server (Cell\Node\Server).
[5/22/15 13:48:20:103 CDT] 00000039 com.ibm.tx.jta.impl.RecoveryManager                          I WTRN0135I: Transaction service recovering no transactions.
[5/22/15 13:48:20:492 CDT] 00000031 SystemErr                                                    R Fri May 22 13:48:20 CDT 2015 Thread[LargeThreadPool-thread-18,5,LargeThreadPool Thread Group] Java exception: 'javax.management.InstanceAlreadyExistsException: org.apache.derby:type=Management,system=c013800d-014d-7cf4-62ff-000012153150'.
[5/22/15 13:48:20:493 CDT] 00000031 SystemErr                                                    R ERROR XJ001: Java exception: 'javax.management.InstanceAlreadyExistsException: org.apache.derby:type=Management,system=c013800d-014d-7cf4-62ff-000012153150'.
[5/22/15 13:48:20:493 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
[5/22/15 13:48:20:493 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.iapi.error.StandardException.plainWrapException(Unknown Source)
[5/22/15 13:48:20:493 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.impl.services.jmx.JMXManagementService.registerMBean(Unknown Source)
[5/22/15 13:48:20:494 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.impl.services.jmx.JMXManagementService.boot(Unknown Source)
[5/22/15 13:48:20:494 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
[5/22/15 13:48:20:494 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
[5/22/15 13:48:20:495 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
[5/22/15 13:48:20:495 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.iapi.services.monitor.Monitor.startSystemModule(Unknown Source)
[5/22/15 13:48:20:495 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.impl.services.monitor.BaseMonitor.runWithState(Unknown Source)
[5/22/15 13:48:20:495 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.impl.services.monitor.FileMonitor.<init>(Unknown Source)
[5/22/15 13:48:20:496 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.iapi.services.monitor.Monitor.startMonitor(Unknown Source)
[5/22/15 13:48:20:496 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.iapi.jdbc.JDBCBoot.boot(Unknown Source)
[5/22/15 13:48:20:496 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.jdbc.EmbeddedDriver.boot(Unknown Source)
[5/22/15 13:48:20:497 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.jdbc.EmbeddedDriver.<clinit>(Unknown Source)
[5/22/15 13:48:20:497 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.jdbc.EmbeddedDataSource.findDriver(Unknown Source)
[5/22/15 13:48:20:497 CDT] 00000031 SystemErr                                                    R      at org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.createPooledConnection(Unknown Source)
1

1 Answers

0
votes

There were two things recommended by the MFP developers. One was to change our automation scripts to use mfp start instead of mfp restart. Along with that, everything started working as expected when I added to our automation the deletion of the bin/ directory from the root of the MFP project.

Not entirely sure why the existence of the bin/ directory under the MFP project root caused the project to fail periodically.

Also on a side note, when we move to using MFP CLI 7.x on our new projects (but still need MFP 6.3 in order to compile older projects) it was recommended that we also delete the ~/.ibm/mobilefirst directory in our automation as having CLI 6.3 and 7.x content in there at the same time might cause issues.