Troubleshooting Your Node.js app SMF Manifest

2014, Mar 02  —  ...

In order to run node apps on SmartOS, I have been creating SMF manifests in order to run them as services, which is much like using Upstart on Linux. With a manifest properly in place, a simple command like sudo svcadm enable my-node-app is all it takes to run your node app.

  1. Write your SMF manifest xml.
  2. Install and enable.

    $ sudo svccfg install my-node-app-manifest-service.xml
    $ sudo svcadm enable my-node-app-service
  3. Look at the logs find out you made a mistake.
  4. Disable your service.

    $ sudo svcadm disable my-node-app-service
  5. Remove your service. This step is important.

    $ sudo svccfg delete my-node-app-service
  6. Make changes to you manifest xml.
  7. Install and enable. See step 2.

For more information about how to create an SMF manifest for your node.js apps, check out the following links: