I'm working with an IBM MobileFirst Platform 7.1 server supported by the Command-Line interface; however, my server isn't starting and stopping correctly. How can I recreate it easily from scratch in one command?
相关问题
- IBM Worklight 6.0 - Worklight Console does not sho
- Output delayed from Cordova Plugin
- Android Application Build with MobileFirst 7.1 is
- Custom ListView in Worklight using Dojo
- How to display a custom keyboard
相关文章
- Unknown realm [myRealm]. null returned for key: is
- How To Calling a Stored Procedure in Worklight
- Worklight 6.0 WL development Server not starting
- How to open the phone dialer?
- Is there a tool to install an existing Cordova 3 p
- Worklight Online + Offline Authentication
- Cannot Call determinedVisibility() never saw a con
- Getting “Cannot install applications because the c
This chain of commands forcibly kills your MobileFirst server, then deletes it and recreates it from scratch:
kill -9 $(cat ~/.ibm/mobilefirst/7.1.*/server/wlp/usr/servers/.pid/worklight.pid)
- Forcibly kill your MobileFirst server using its process ID.(sudo lsof -i tcp:10080 | awk "NR!=1 {print $2}" | xargs kill -9)
- In case that missed it (in the rare case where it hasn't persisted its process ID correctly), kill any process listening on TCP port 10080. (Be careful. This assumes that MobileFirst is the only server which ever listens on TCP port 10080 on your system. If this is not the case, you may inadvertently kill another server.)mfp server remove
- Remove the MFP server using the MFP CLIrm -R ~/.ibm/mobilefirst/7.1.*/
- Clean up any remaining logs and other junk.rm -R $TMPDIR/wlBuildResources
- Remove thewlBuildResources
directory, which the CLI uses to build projects.rm -R $TMPDIR/wlPreview
- Remove thewlPreview
directory, which the CLI uses to preview projects.mfp server create && mfp start
- Create a new server and start it.On my system I have this entire chain set up as a shell alias to easily recreate my MFP server when needed.
The mfpx project also does something similar with the
mfpx kill
command.You might also give the "MFP eXtras" project a try --> https://github.com/kfbishop/mfpx
The
mfpx kill
command will stop server, kill processes, clean tmp dirs, etc. MFPX is not supported / endorsed by IBM, just me (and AndrewF :). Feedback welcomed.