KEGustafsson / signalk-aisstream

1 stars 0 forks source link

Error while starting/loading plugin on signalK (victron cerbo gx with Large image) #2

Open roelbroersma opened 1 month ago

roelbroersma commented 1 month ago

Hello,

Having latest Victron Cerbo GX with Venus Large image and SignalK (v2.8.3) enabled.

Configured the API key for AISSTREAM.IO and it tells me this in the logfiles:

Jul 30 15:09:20 TypeError: Cannot read properties of null (reading 'close') at Timeout._onTimeout (/data/conf/signalk/node_modules/signalk-aisstream/index.js:103:16) at listOnTimeout (node:internal/timers:569:17) at process.processTimers (node:internal/timers:512:7)

I am running plugin version: v0.4.2

Plugin config:

image

KEGustafsson commented 1 month ago

For some reason socket closing is giving you this error while the code is doing watchdog reset. https://github.com/KEGustafsson/signalk-aisstream/blob/main/index.js#L100-L108

What node version you are having in Cerbo GX? Is network connection to Internet OK?

I need to debug this a bit more and all info is welcome. So far I didn't see any issues when I did a fresh install to my boat setup.

roelbroersma commented 1 month ago

Actually, I don't know which Nodejs version it has. Then I found this link: https://community.victronenergy.com/questions/208633/venusos-large-node-red-upgrade-nodejs.html

I will try to login with SSH and do a node -v I will let you know later today.

I you want, we can do a share screen or something.

roelbroersma commented 1 month ago

root@einstein:~# node -v v18.20.3

KEGustafsson commented 1 month ago

@roelbroersma I added a check if socket is already closed, so this should not trigger error, https://github.com/KEGustafsson/signalk-aisstream/commit/65b0e5b235754f9225fd423967f593394a3b220b

Can you test if this is a valid fix for the problem?

Install directly from Github repo. npm install KEGustafsson/signalk-aisstream

roelbroersma commented 1 month ago

I am sorry. I tried to login to the Victron Cerbo GX with root access:

`root@einstein:~# npm install KEGustafsson/signalk-aisstream npm error code ENOENT npm error syscall spawn git npm error path git npm error errno -2 npm error enoent An unknown git error occurred npm error enoent This is related to npm not being able to find a file. npm error enoent

npm error A complete log of this run can be found in: /home/root/.npm/_logs/2024-08-07T19_42_33_787Z-debug-0.log root@einstein:~# `

I think it has no git.

Some more info about the Cerbo:

root@einstein:~# uname -a
Linux einstein 5.10.109-venus-17 #1 SMP Fri Jul 26 14:36:14 UTC 2024 armv7l GNU/Linux

root@einstein:~# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/arm-ve-linux-gnueabi/9.5.0/lto-wrapper
Target: arm-ve-linux-gnueabi
Configured with: ../../../../../../work-shared/gcc-9.5.0-r0/gcc-9.5.0/configure --build=x86_64-linux --host=arm-ve-linux-gnueabi --target=arm-ve-linux-gnueabi --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/ --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-ve-linux-gnueabi- --without-local-prefix --disable-install-libiberty --enable-lto --disable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-float=hard --with-build-sysroot=/ --enable-nls --with-glibc-version=2.28 --enable-initfini-array --with-arch=armv7ve+fp
Thread model: posix
gcc version 9.5.0 (GCC)
root@einstein:~# node -v
v18.20.3
root@einstein:~# make -v
GNU Make 4.3
Built for arm-ve-linux-gnueabi
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
root@einstein:~#
KEGustafsson commented 1 month ago

I don't have Cerbo GX, but did you try this installation on .signalk folder? I'm not sure where Signal K configuration folder is located, but install should be done in that folder.