Skip to content

Debugging

Inevitably, something goes wrong with your application. Nullstone provides 3 commands that will help you diagnose any issues and understand what your application is doing.

Status

The nullstone status command allows you to view the current status of your Nullstone application. This reports everything from infrastructure status to application version to load balancer health. Typically, you will want to run nullstone status in watch mode using the -w flag. Watch mode will continue to poll the status and automatically update your terminal when something changes.

shell
> nullstone status -w node-hello-world dev
Env: dev        Infra: provisioned      Version: 62d67b0b386ad6fcd433076e9e3b7fd56e750fe5

Deployments
Created                            Status   Running  Desired  Pending
2021-08-30 20:50:23.518 +0000 UTC  PRIMARY  1        1        0

Load Balancers
> nullstone status -w node-hello-world dev
Env: dev        Infra: provisioned      Version: 62d67b0b386ad6fcd433076e9e3b7fd56e750fe5

Deployments
Created                            Status   Running  Desired  Pending
2021-08-30 20:50:23.518 +0000 UTC  PRIMARY  1        1        0

Load Balancers

You can omit the environment to view an overview of your app across all environments.

shell
> nullstone status -w node-hello-world
Env   Infra        Version                                   Running  Desired  Pending
dev   provisioned  62d67b0b386ad6fcd433076e9e3b7fd56e750fe5  1        1        0
prod  provisioned  62d67b0b386ad6fcd433076e9e3b7fd56e750fe5  1        1        0
> nullstone status -w node-hello-world
Env   Infra        Version                                   Running  Desired  Pending
dev   provisioned  62d67b0b386ad6fcd433076e9e3b7fd56e750fe5  1        1        0
prod  provisioned  62d67b0b386ad6fcd433076e9e3b7fd56e750fe5  1        1        0

Logs

The nullstone logs command allows you to view logs of your Nullstone application. You can use the -s flag to "start" looking for logs a duration ago from now. If you would like to watch all new logs as well, use -t to tail the logs.

In this example, we look for logs starting 5 minutes ago and tailing

shell
> nullstone logs -s '5m' -t node-hello-world dev
Performing application command (Org=nullstone, App=node-hello-world, Stack=, Env=dev)

Identifying log provider for app "node-hello-world"
Retrieving log provider details for app "node-hello-world"
    region: "us-east-1"
    log group: "node-hello-world-kohxy"
Querying logs starting 01 Sep 21 12:11 EDT
Watching logs (poll interval = 1s)
...Application logs
> nullstone logs -s '5m' -t node-hello-world dev
Performing application command (Org=nullstone, App=node-hello-world, Stack=, Env=dev)

Identifying log provider for app "node-hello-world"
Retrieving log provider details for app "node-hello-world"
    region: "us-east-1"
    log group: "node-hello-world-kohxy"
Querying logs starting 01 Sep 21 12:11 EDT
Watching logs (poll interval = 1s)
...Application logs

Connect via SSH

Sometimes you want to connect to one of your application containers in order to run a command directly. The nullstone ssh command will establish a shell connection to a container. If there is more than one container, the container selected is random.

$ nullstone ssh --app=node-hello-world --env=dev
Performing application command (Org=nullstone, App=node-hello-world, Stack=, Env=dev)

Identifying infrastructure for app "node-hello-world"
    fargate cluster: "arn:aws:ecs:us-east-1:522657839841:cluster/fargate1-ehmra"
    fargate service: "node-hello-world"
    repository image url: "522657839841.dkr.ecr.us-east-1.amazonaws.com/node-hello-world-xkjrz"

Starting session with SessionId: ecs-execute-command-00b6391971b75c961
#
$ nullstone ssh --app=node-hello-world --env=dev
Performing application command (Org=nullstone, App=node-hello-world, Stack=, Env=dev)

Identifying infrastructure for app "node-hello-world"
    fargate cluster: "arn:aws:ecs:us-east-1:522657839841:cluster/fargate1-ehmra"
    fargate service: "node-hello-world"
    repository image url: "522657839841.dkr.ecr.us-east-1.amazonaws.com/node-hello-world-xkjrz"

Starting session with SessionId: ecs-execute-command-00b6391971b75c961
#