fxgsell / GG-Edge-Inference

Using AWS Greengrass with the Nvidia Jetson TX2 to run ML models prepared with Amazon SageMaker.
MIT License
17 stars 7 forks source link

greengrass error when stopping/starting on device #8

Closed shirkeyaws closed 6 years ago

shirkeyaws commented 6 years ago

When stopping / starting per this page

where:

Restart the AWS Greengrass daemon by running the following commands in your core device terminal.
cd /greengrass/ggc/core/
sudo ./greengrassd stop
sudo ./greengrassd start

then, when executed on device:

nvidia@tegra-ubuntu:/greengrass/ggc/core$ sudo ./greengrassd stop
[sudo] password for nvidia:
nvidia@tegra-ubuntu:/greengrass/ggc/core$ sudo ./greengrassd start
Setting up greengrass daemon
Validating hardlink/softlink protection
Validating execution environment
Found cgroup subsystem: cpuset
Found cgroup subsystem: cpu
Found cgroup subsystem: cpuacct
Found cgroup subsystem: blkio
Found cgroup subsystem: memory
Found cgroup subsystem: devices
Found cgroup subsystem: freezer
Found cgroup subsystem: net_cls
Found cgroup subsystem: perf_event
Found cgroup subsystem: net_prio
Found cgroup subsystem: pids
Found cgroup subsystem: debug

Starting greengrass daemon

Greengrass daemon 11306 failed to start
Failed to parse config.json. err: UseSystemd [[yes|no]] is invalid, please use "yes" or "no"
nvidia@tegra-ubuntu:/greengrass/ggc/core$

and when catting config.json:

nvidia@tegra-ubuntu:/greengrass/ggc/core$ cat /greengrass/config/config.json
{
    "coreThing": {
        "caPath": "[ROOT_CA_PEM_HERE]",
        "certPath": "[CLOUD_PEM_CRT_HERE]",
        "keyPath": "[CLOUD_PEM_KEY_HERE]",
        "thingArn": "[THING_ARN_HERE]",
        "iotHost": "[HOST_PREFIX_HERE].iot.[AWS_REGION_HERE].amazonaws.com",
        "ggHost": "greengrass.iot.[AWS_REGION_HERE].amazonaws.com"
    },
    "runtime": {
        "cgroup": {
            "useSystemd": "[yes|no]"
        }
    },
    "managedRespawn": false
}
shirkeyaws commented 6 years ago

then on restart (after fixing systemd arg as "yes"...

Greengrass daemon 11980 failed to start
Unable to find: /greengrass/certs/[ROOT_CA_PEM_HERE], error: stat /greengrass/certs/[ROOT_CA_PEM_HERE]: no such file or directory

so something seems to have went astray during configuration / deployment of the device?

shirkeyaws commented 6 years ago

and no certs present:

nvidia@tegra-ubuntu:/greengrass/ggc/core$ ls /greengrass/certs
README
shirkeyaws commented 6 years ago

this appears to be a bug / issue with the original cert uploads -- it appears that through the device web interface, we first select the file, then click the Selected button,after which the file name disappears,then click Finished to reboot

shirkeyaws commented 6 years ago

Yay! Redeployed again, and success

screen shot 2018-06-09 at 9 46 57 pm

and on the device:

screen shot 2018-06-09 at 9 47 31 pm

and via mplayer

screen shot 2018-06-09 at 9 50 35 pm
shirkeyaws commented 6 years ago

Closing but opening several other issues for follow-up around:

1-greengrass-deployment

2-face-detection