IBM Mobilefirst CLI - Server start issue

无人久伴 提交于 2019-12-04 01:52:54

问题


I recently installed IBM MobileFirst CLI on my Mac, but I don't seem to be able to start the Server. See error below. I searched the internet and found that there is a bug in JDK which causes the JavaLaunchHelper error. I downloaded the beta version that supposedly fixes the issue from here - JDK Download Link . But this doesn't help either. Any other help is appreciated.

Imayas-MBP:EmployeeDirectory imaya$ mfp start Initializing MobileFirst Console. objc[18564]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined. Starting server worklight. Server worklight start failed. Check server logs for details. /Users/imaya/.ibm/mobilefirst/6.3.0/server/wlp/bin/server: line 744: 18563 Abort trap: 6 "${JAVA_CMD}" "$@" > "${JAVA_CMD_LOG}" 2>&1 Error: The MobileFirst server failed to start. The port may be in use by another instance of a running server, or the server may not exist.


回答1:


The JavaLaunchHelper error is not the problem here; Anyone using Java 7 will experience it, but things will work regardless.

The problem here is the second error:

The MobileFirst server failed to start. The port may be in use by another instance of a running server, or the server may not exist.

Verify you do not have an already running server, that was started either by the CLI or by MFP Studio in an Eclipse installation.

  1. In the command line, run mfp stop
  2. In Eclipse, well, quit it
  3. Make sure the Java process is not running

Then, start over. Using the CLI, create a new project and application and try to start the server. For example:

  1. cd /Users/idanadar/Desktop
  2. mfp create testProject
  3. cd testProject
  4. mfp add hybrid testApp
  5. mfp start
  6. mfp build
  7. mfp deploy
  8. mfp console



回答2:


On OSX, you can locate and kill a process holding open a port using the following:

Run (assumes port 10080):

$ lsof -i :10080

Then if a process is shown, run the following using the shown Process ID:

$ kill -9 {PID}



来源:https://stackoverflow.com/questions/28073927/ibm-mobilefirst-cli-server-start-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!