aws-iot-greengrass-v2-deploy-nvidia-deepstream icon indicating copy to clipboard operation
aws-iot-greengrass-v2-deploy-nvidia-deepstream copied to clipboard

The aws.greengrass.JetsonDLRImageClassification connection errors

Open tomiszili opened this issue 2 years ago • 0 comments

Hi all!

I'm using a Jetson Nano 2GB with the latest JP 4.6 SDK. I couldn't downgrade the Nucleus module on my greengrass core to 2.0.5 so I modified the dependency for the Nucleus module in the recepies to my current Nucleus version (=2.1.0) After debugging for several hours, I found this issue but this sample tutorial still not working.

After fixing the init.sh no such file error I got this aws.greengrass.JetsonDLRImageClassification.log file in the Jetson device.

I have tried to run the deployed component in local mode with the following command:

root@jetson-desktop:~# python3 /greengrass/v2/packages/artifacts-unarchived/aws.greengrass.JetsonDLRImageClassification/1.0.0/image_classification/jetson_inference.py gpu /greengrass/v2/packages/artifacts-unarchived/variant.Jetson.ImageClassification.ModelStore/0.1.1/ '{"24":"\"resnet18_v1-jetson_tx2\"","25":"\"resnet18_v1-jetson_xavier\"","33":"\"resnet18_v1-jetson_nano\""}' /root/greengrass_ml dog.npy 30

The output for the local run:

argv[0]= /greengrass/v2/packages/artifacts-unarchived/aws.greengrass.JetsonDLRImageClassification/1.0.0/image_classification/jetson_inference.py
argv[1]= gpu
argv[2]= /greengrass/v2/packages/artifacts-unarchived/variant.Jetson.ImageClassification.ModelStore/0.1.1/
argv[3]= {"24":"\"resnet18_v1-jetson_tx2\"","25":"\"resnet18_v1-jetson_xavier\"","33":"\"resnet18_v1-jetson_nano\""}
models= {'24': '"resnet18_v1-jetson_tx2"', '25': '"resnet18_v1-jetson_xavier"', '33': '"resnet18_v1-jetson_nano"'}
argv[4]= /root/greengrass_ml
argv[5]= dog.npy
argv[6]= 30
hostname= None
env vars: environ({'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LANG': 'en_US.UTF-8', 'USER': 'root', 'PWD': '/root', 'HOME': '/root', 'XDG_DATA_DIRS': '/usr/local/share:/usr/share:/var/lib/snapd/desktop', 'MAIL': '/var/mail/root', 'SHELL': '/bin/bash', 'TERM': 'xterm-256color', 'SHLVL': '1', 'LOGNAME': 'root', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin', 'LESSOPEN': '| /usr/bin/lesspipe %s', '_': '/usr/bin/python3', 'OLDPWD': '/root'})
svcid= None
Found Jetson GPU id: 33
Current path: /greengrass/v2/packages/artifacts-unarchived/aws.greengrass.JetsonDLRImageClassification/1.0.0/image_classification
Calling inference: TVM_TENSORRT_CACHE_DIR=/tmp python3 /greengrass/v2/packages/artifacts-unarchived/aws.greengrass.JetsonDLRImageClassification/1.0.0/image_classification/inference.py -a gpu -m /greengrass/v2/packages/artifacts-unarchived/variant.Jetson.ImageClassification.ModelStore/0.1.1//resnet18_v1-jetson/"resnet18_v1-jetson_nano" -p /root/greengrass_ml -i dog.npy -s 30
Using dlr from /usr/local/lib/python3.8/dist-packages/dlr/__init__.py.

Traceback (most recent call last):

Using numpy from /usr/local/lib/python3.8/dist-packages/numpy/__init__.py.

  File "/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.JetsonDLRImageClassification/1.0.0/image_classification/inference.py", line 40, in <module>

Using cv2 from /usr/local/lib/python3.8/dist-packages/cv2/cv2.cpython-38-aarch64-linux-gnu.so.

    connection = ipc_utils.connect()



  File "/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.JetsonDLRImageClassification/1.0.0/image_classification/IPCUtils.py", line 55, in connect

 CALL HOME FEATURE ENABLED

    connect_future = connection.connect(self.lifecycle_handler)



  File "/usr/local/lib/python3.8/dist-packages/awsiot/eventstreamrpc.py", line 449, in connect



    raise e

 You acknowledge and agree that DLR collects the following metrics to help improve its performance.                     

  File "/usr/local/lib/python3.8/dist-packages/awsiot/eventstreamrpc.py", line 437, in connect

 By default, Amazon will collect and store the following information from your device:

    protocol.ClientConnection.connect(



  File "/usr/local/lib/python3.8/dist-packages/awscrt/eventstream/rpc.py", line 301, in connect

 record_type: <enum, internal record status, such as model_loaded, model_>,

    _awscrt.event_stream_rpc_client_connection_connect(

 arch: <string, platform architecture, eg 64bit>,

TypeError: argument 1 must be str, not None

 osname: <string, platform os name, eg. Linux>,

Please help me find the root cause of this issue, or give me some hint about what am I doing wrong. Thanks in advance!

tomiszili avatar Aug 06 '21 14:08 tomiszili