Image not running using capstan

20 views
Skip to first unread message

Shambo Bose

unread,
Apr 28, 2022, 7:45:59 AM4/28/22
to OSv Development
Hi All,

I am trying to build one package with a simple nodejs app. I already built the image and seems like it is running fine without any errors but I don't see any running instances nor any service is listening on the port 3000. Please find screenshots below:

ubuntu@unikern:~/calc$ cat meta/package.yaml
name: calculator.app.pkg
title: Calculator App
author: Shambo
created: "2022-04-27T19:05:46Z"
require:
  - osv.node-js
ubuntu@unikern:~/calc$ cat meta/run.yaml
runtime: native
config_set:
   ################################################################
   ### This is one configuration set (feel free to rename it).  ###
   ################################################################
   default:
      # REQUIRED
      # Filepath of the NodeJS entrypoint (where server is defined).
      # Note that package root will correspond to filesystem root (/) in OSv image.
      # Example value: /libnode.so server.js
      bootcmd: /libnode.so server.js
      # OPTIONAL
      # Environment variables.
      # A map of environment variables to be set when unikernel is run.
      # Example value:  env:
      #         PORT: 3000
      #         HOSTNAME: www.myserver.org

      #env:
      #   PORT: 3000

# Add as many named configurations as you need

# OPTIONAL
# What config_set should be used as default.
# This value can be overwritten with --runconfig argument.
config_set_default: default


#############################################################


OS details:
ubuntu@unikern:~/calc$ cat /etc/os-release
PRETTY_NAME="Ubuntu 21.10"
NAME="Ubuntu"
VERSION_ID="21.10"
VERSION="21.10 (Impish Indri)"
VERSION_CODENAME=impish
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=impish


Please help me here. Thanks.

Cheers,
SB

Waldek Kozaczuk

unread,
May 4, 2022, 4:03:35 PM5/4/22
to OSv Development
Hi,

Which version of capstan are you using? Most likely you have to pass '-f' option to expose the port your app is listening to host like in this example:

capstan run com.example.word-finder -f 4004:4000


Regards,
Waldek

SB

unread,
May 12, 2022, 7:02:16 AM5/12/22
to OSv Development
Hi,

capstan version v0.5.0
Command I am running is :
#  capstan run com.calculator.app.pkg. -f 3000:3000

This is an app running on node v8.
Reply all
Reply to author
Forward
0 new messages