“panic: runtime error: …” in AWS IoT app1.error.log - pls help

I’ve installed the AWS IoT Integration per the Quick Start instructions and seen my TTN Device appear as an AWS IoT Thing. However, when I subscribe to the +/devices/+/up topic under IoT Core|Test, I see nothing. I’ve checked that data are appearing in TTN for the device. Thoughts?

Per the Troubleshooting Guide, I have checked environment health (green) and downloaded the log files. Of possible interest:

app1.log consists of about 800 copies of the following:

INFO Performing first synchronization of the device registry
INFO Initializing AWS IoT client PolicyName=ttn-integration-TTNIoTPolicy-1LVVU37OMQXVA Region=us-west-2
INFO Found AWS IoT endpoint Endpoint=afyt8uvo0mjeb.iot.us-west-2.amazonaws.com
INFO Created certificate ID=d2d7fb85b618a00eb1ad5a25ecc278ad3825a35096733875cdcedc8164864628
INFO Attached policy to certificate Certificate=d2d7fb85b618a00eb1ad5a25ecc278ad3825a35096733875cdcedc8164864628 Policy=ttn-integration-TTNIoTPolicy-1LVVU37OMQXVA
INFO Initializing The Things Network client AccountServer=https://account.thethingsnetwork.org AppID=limno_aws_test DiscoveryServer=discovery.thethings.network:1900

Similarly, app1.error.log is made up of about 800 instances of the following:

goroutine 1 [running]:
github.com/TheThingsIndustries/integration-aws/aws.normalizeDevice(0xc0005440c0, 0x0, 0x1, 0xc00000c598)
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/aws/util.go:74 +0x5ff
github.com/TheThingsIndustries/integration-aws/aws.(*deviceManager).List(0xc00037fd00, 0x0, 0x0, 0xc00000c530, 0x1, 0x1, 0x0, 0x0)
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/aws/device_manager.go:50 +0x10e
github.com/TheThingsIndustries/integration-aws/vendor/github.com/TheThingsIndustries/go-integration-lib/sync.(*synchronizer).Sync(0xc0006275c0, 0xc0006275f0, 0x37, 0xc00000c3c8)
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/vendor/github.com/TheThingsIndustries/go-integration-lib/sync/synchronizer.go:54 +0x112
github.com/TheThingsIndustries/integration-aws/process/cmd.glob..func2(0x1692b60, 0x16c15e0, 0x0, 0x0)
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/process/cmd/run.go:128 +0xe05
github.com/TheThingsIndustries/integration-aws/vendor/github.com/spf13/cobra.(*Command).execute(0x1692b60, 0x16c15e0, 0x0, 0x0, 0x1692b60, 0x16c15e0)
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/vendor/github.com/spf13/cobra/command.go:750 +0x2cc
github.com/TheThingsIndustries/integration-aws/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x1692920, 0x1, 0x1, 0x9)
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/vendor/github.com/spf13/cobra/command.go:831 +0x2dc
github.com/TheThingsIndustries/integration-aws/vendor/github.com/spf13/cobra.(*Command).Execute(0x1692920, 0xc000543f58, 0x7fca45)
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/vendor/github.com/spf13/cobra/command.go:784 +0x2b
github.com/TheThingsIndustries/integration-aws/process/cmd.Execute()
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/process/cmd/root.go:40 +0x2d
main.main()
/home/travis/gopath/src/github.com/TheThingsIndustries/integration-aws/process/main.go:22 +0xfa
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xc188df]

Four days later, app1.error.log contains even more like this:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xc188df]

There are also connection errors in the nginx logs, like:

2019/04/02 07:46:00 [error] 3220#0: *2766 connect() failed (111: Connection refused) while connecting to upstream, client: 96.95.223.81, server: , request: “GET /manager/html HTTP/1.1”, upstream: “http://127.0.0.1:5000/manager/html”, host: “52.10.117.205”
2019/04/02 08:43:54 [error] 3220#0: *2787 connect() failed (111: Connection refused) while connecting to upstream, client: 184.154.189.90, server: , request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:5000/”, host: “52.10.117.205”
2019/04/02 09:43:36 [error] 3220#0: *2790 connect() failed (111: Connection refused) while connecting to upstream, client: 51.144.0.251, server: , request: “GET /manager/html HTTP/1.1”, upstream: “http://127.0.0.1:5000/manager/html”, host: “52.10.117.205”
2019/04/02 10:59:55 [error] 3220#0: *2792 connect() failed (111: Connection refused) while connecting to upstream, client: 187.74.24.116, server: , request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:5000/”, host: “52.10.117.205:80”
2019/04/02 11:22:55 [error] 3220#0: *2794 connect() failed (111: Connection refused) while connecting to upstream, client: 189.68.102.218, server: , request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:5000/”, host: “52.10.117.205:80”

Still looking for insight!

anyone with AWS experience that can help out here ? @Sly1 :roll_eyes:

Thanks for the ping.

Missing a nil check :blush:. Though if add a letter to the description of all your devices it will work.

Fix is on the way.

EDIT: new version of the integration is available now, you can start the update. @tadks

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.