Page 1 of 3

Unable to Connect to remote AIO module with node red

Posted: 09 Mar 2020, 18:56
by Marcos
Hi All,
I'm here to ask for a suggestion.
I currently use node-red and since some weeks ago I've been started to test new Revolution Pi and AIO module.
Since I work on the RevPi, no problem with node-red nodes. I configure the AIO server as localhost:8000 on my nodes and everything is ok.

But, when I try to connect from another machine (different IP) I always obtain

Stopped reconnecting. Max Reconnections reached!
ERROR connect ETIMEDOUT 192.168.1.8:8000
Closed connection to WS Server!

And this is strange for me because there is not so much stuff to configure in the node and that is the correct IP of the RevPi.

Do you have any Idea?

I've tried several attempts by changing user and permissions on the remote pi but I have no positive results.

Thanks

Marco

Re: Unable to Connect to remote AIO module with node red

Posted: 12 Mar 2020, 08:49
by Marcos
Hi,
I try to go deep into the topic.
Here following, my 2 attempts to connect RevPi AIO server
Cattura.JPG
Cattura.JPG (94.13 KiB) Viewed 16084 times
Cattura2.JPG
Cattura2.JPG (42.56 KiB) Viewed 16084 times
In the first, I've tried to connect using authentication (both with pi user and node-red user) while in the second I've tried with no authentication.
Always the same result.

I've also tried to use the same user (and password) for RevPi and the remote Pi. No luck.

This is what I have on the remote Pi node
Cattura3.JPG
Cattura3.JPG (40.38 KiB) Viewed 16084 times
without any possibility to select an Input pin.

Of course on RevPi I can make all my choices

Re: Unable to Connect to remote AIO module with node red

Posted: 12 Mar 2020, 11:20
by Frank
Hello Marcos,

one basic question in advance:
Your remote AIO module is reachable from the Node-RED machine (Pinging works) in principle - but ONLY the web server is not responding?

Regards,
Frank

Re: Unable to Connect to remote AIO module with node red

Posted: 12 Mar 2020, 11:40
by jgerlach-erminas
Hi Marco,

remote connections are currently disabled in noderedrevpinodes, because https/wss support is not added yet and no user authentification is in place. If you are on a local network and willing to take the safety risk, try the following:

Download the latest server code from the github repo on the remote revpi:

Code: Select all

wget https://raw.githubusercontent.com/erminas/noderedrevpinodes-server/master/revpi-server.py
Edit the file and disable the external connection blocking, by changing the line 237 to block_external_connections = False

Code: Select all

nano revpi-server.py
Overwrite existing server

Code: Select all

sudo cp revpi-server.py /usr/share/noderedrevpinodes-server/revpi-server.py
Remove temporary file

Code: Select all

rm revpi-server.py
Restart python server

Code: Select all

sudo systemctl restart noderedrevpinodes-server.service
Sorry for the inconvenience, external connections and config files are planned features for future releases. Feel free to ask further questions.
Greetings,
Jonas

Re: Unable to Connect to remote AIO module with node red

Posted: 14 Mar 2020, 20:37
by Marcos
Dear Jonas,
thank you so much for your help.
I've just checked it and it works.
I'll perform other tests in the next days.
Marco

Re: Unable to Connect to remote AIO module with node red

Posted: 29 Sep 2020, 17:58
by Marcos
Hi Jonas,
I'm here with a new issue similar to the previous.

On a fresh install RevPi, after having installed node-red, I have noted that

/usr/share/noderedrevpinodes-server/

folder is not present anymore, then I don't know how to apply your suggestions and, moreover, this time also standard nodes are not working anymore.

I mean, I have exactly the same errors but on localhost:8000 server.

Please could you or anyone else clarify on this topic?

Marco

Re: Unable to Connect to remote AIO module with node red

Posted: 30 Sep 2020, 08:00
by dirk
Hi all together I moved your topic to this board so that the experts from Erminas may support and notice your request.

Re: Unable to Connect to remote AIO module with node red

Posted: 30 Sep 2020, 10:00
by Marcos
Thanks Dirk for your prompt reply.
I've done a little investigation and seems to be a noderedrevpinodes-server problem.
It is not running.
Because it has dependency problem it can't be installed

Code: Select all

connect  demo  noderedrevpinodes-server_1.0.1.deb  procon-web-iot  revpi-server.py
pi@RevPixxxxx:~ $ sudo apt-get install noderedrevpinodes-server
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze
Lettura informazioni sullo stato... Fatto
Alcuni pacchetti non possono essere installati. Questo può voler dire
che è stata richiesta una situazione impossibile oppure, se si sta
usando una distribuzione in sviluppo, che alcuni pacchetti richiesti
non sono ancora stati creati o sono stati rimossi da Incoming.
Le seguenti informazioni possono aiutare a risolvere la situazione:

I seguenti pacchetti hanno dipendenze non soddisfatte:
 noderedrevpinodes-server : Dipende: nodered (>= 0.2) ma non sta per essere installato
E: Impossibile correggere i problemi, ci sono pacchetti danneggiati bloccati.
pi@RevPixxxxx:~ $ sudo dpkg -i noderedrevpinodes-server_1.0.1.deb
Selezionato il pacchetto noderedrevpinodes-server non precedentemente selezionato.
(Lettura del database... 85447 file e directory attualmente installati.)
Preparativi per estrarre noderedrevpinodes-server_1.0.1.deb...
Estrazione di noderedrevpinodes-server (1.0.1)...
dpkg: problemi con le dipendenze impediscono la configurazione di noderedrevpinodes-server:
 noderedrevpinodes-server dipende da nodered (>= 0.2); comunque:
  Il pacchetto nodered non è installato.

dpkg: errore nell'elaborare il pacchetto noderedrevpinodes-server (--install):
 problemi con le dipendenze - lasciato non configurato
Si sono verificati degli errori nell'elaborazione:
 noderedrevpinodes-server
Marco

Re: Unable to Connect to remote AIO module with node red

Posted: 30 Sep 2020, 15:21
by dirk
Hi Marco, tuto bene ;) could you please avoid italian output by using this command:

Code: Select all

export LC_ALL=C
The way you tried to install with download and install with the "dpkg" command does not
fix the missing dependencies. Please try the installation again but by using the "apt" command,

Code: Select all

sudo apt update
sudo apt install noderedrevpinodes-server

Re: Unable to Connect to remote AIO module with node red

Posted: 30 Sep 2020, 16:30
by Marcos
Hi Dirk,
I'm sorry for Italian output....maybe this is the reason why it is not so clear but,
if you read from the top, you can see that I've already tried the suggested command (2nd line).
Problem is still there.
Any way

Code: Select all

pi@RevPi39635:~ $ sudo apt install noderedrevpinodes-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 noderedrevpinodes-server : Depends: nodered (>= 0.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Of course RevPi was firstly updated and I've tried also to do "sudo apt-get -f install".
Thanks,
Marco