使用MobileFirst CLI

时间:2015-05-22 19:10:42

标签: ibm-mobilefirst mobilefirst-cli

我是关于mac pro的。安装Yosemite(10.10.3)并安装MobileFirst 6.3 CLI以尝试自动化我们的移动项目。我们有一个mac mini工作,但这似乎不能在mac pro上使用相同的设置(工作的机器是mac mini(10.10.3),Mobile first 6.3 CLI和java 7 u60安装,与mac pro相同。

似乎有一些令人毛骨悚然的事情,但我并不完全确定如何解决它。我得到了:

  

访问时出错   http://9.41.129.110:10080/worklightadmin/management-apis/1.0/runtimes/PerchReadyApp/adapters?locale=en_US:   找不到HTTP / 1.1 404

当我尝试在MFP项目目录中运行mfp stop然后mfp restart时,CLI始终失败并出现以下错误。

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

以下是CLI用于部署应用程序的Liberty服务器中的messages.log的输出。有更多消息,但这是自由服务器启动过程中的第一个错误。

[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 个答案:

答案 0 :(得分:0)

MFP开发人员推荐了两件事。一种是将我们的自动化脚本更改为使用mfp start而不是mfp restart。除此之外,当我向自动化添加从MFP项目的根目录中删除bin /目录时,一切都按预期开始工作。

不完全确定为什么MFP项目根目录下存在bin /目录会导致项目定期失败。

另外在旁注中,当我们在新项目中使用MFP CLI 7.x(但仍需要MFP 6.3以编译旧项目)时,建议我们也删除〜/ .ibm / mobilefirst我们自动化中的目录同时具有CLI 6.3和7.x内容可能会导致问题。