Coder Social home page Coder Social logo

Comments (14)

vemeT5ak avatar vemeT5ak commented on August 14, 2024 1

Hoping this helps someone. This worked for me as of 10 min ago.

sudo apt-get install iptables-persistent
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -p udp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -L
sudo sh -c "iptables-save > /etc/iptables.rules"

In Node Red, the "Amazon Echo Hub" node needs to set to the whatever number port you set in the iptables. In my text above that number is 8080

from node-red-contrib-amazon-echo.

fragolinux avatar fragolinux commented on August 14, 2024

will this work redirecting port 80 to local 8980? As Peter's using port 8980:

sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8980

from node-red-contrib-amazon-echo.

scargill avatar scargill commented on August 14, 2024

I'll try that thanks - already moved nginx to port 86 - that was easy... 2 references in /etc/nginx/sites-enabled....

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

Port 80 is required for all new Echo devices, like Dot 3rd gen or Plus 2nd gen. They will try to connect to port 80 even if a different port is configured.

Port forwarding should resolve it. I added it as a possible solution in the troubleshooting page

from node-red-contrib-amazon-echo.

fragolinux avatar fragolinux commented on August 14, 2024

please add actual iptables config lines and not a generic tutorial on how to use iptables, because not everybody is good in using that :)

are these fine?

  • sudo apt-get install iptables-persistent
  • sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
  • sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8980
  • sudo sh -c "iptables-save > /etc/iptables/rules.v4"
  • sudo sh -c "ip6tables-save > /etc/iptables/rules.v6"

or better these to save?

  • sudo /etc/init.d/iptables-persistent save
  • sudo /etc/init.d/iptables-persistent reload

or these?

  • sudo netfilter-persistent save
  • sudo netfilter-persistent reload

thanks

from node-red-contrib-amazon-echo.

scargill avatar scargill commented on August 14, 2024

Done - resolved, thanks all.

from node-red-contrib-amazon-echo.

woody4165 avatar woody4165 commented on August 14, 2024

Hi all

I have NodeRed installed in a docker container in Ubuntu server.
I'm using Portainer to manage the containers and I don't have port 80 in use (checked with sudo lsof -i -P -n and with netstat -tulpn | grep LISTEN) in any other service.

Is there a way to add --network host --user 0 to run Node-Red with root user, without regenerating the container or the container image?

PS:
I've moved my NodeRED installation from docker to host.
I'm using VmWare ESXi 6.5 on an Intel NUC and I get a VM with Ubuntu Server 18.10.
Previously, NodeRed was installed in a Docker container on this VM, now I've moved off the container and I've directly on the Ubuntu server host in the VM.

I still get "Unable to start on port 80" error.

This is the result of sudo lsof -i -P -n | grep LISTEN

node-red  1021 vittorio   10u  IPv4  22194      0t0  TCP *:1880 (LISTEN)
lighttpd  1307 www-data    4u  IPv4  23936      0t0  TCP *:8080 (LISTEN)
lighttpd  1307 www-data    5u  IPv6  23937      0t0  TCP *:8080 (LISTEN)
sshd      1575     root    3u  IPv4  25909      0t0  TCP *:22 (LISTEN)
sshd      1575     root    4u  IPv6  25911      0t0  TCP *:22 (LISTEN)
docker-pr 2047     root    4u  IPv6  29958      0t0  TCP *:8765 (LISTEN)
docker-pr 2076     root    4u  IPv6  29995      0t0  TCP *:9000 (LISTEN)
pihole-FT 2534   pihole    5u  IPv4  31728      0t0  TCP *:53 (LISTEN)
pihole-FT 2534   pihole    7u  IPv6  31731      0t0  TCP *:53 (LISTEN)
pihole-FT 2534   pihole   10u  IPv4  32769      0t0  TCP 127.0.0.1:4711 (LISTEN)
pihole-FT 2534   pihole   11u  IPv6  32771      0t0  TCP [::1]:4711 (LISTEN)

so the 80 port should be free.

What else can I check?

Thanks

from node-red-contrib-amazon-echo.

datech avatar datech commented on August 14, 2024

Hello @woody4165 . If you want to run the Amazon Echo hub on port 80 you have to run Node-RED as root user. Another solution is to use port forwarding. iptables commands listed above should do the job

@fragolinux Thanks. I've just updated the wiki page. I've skipped apt-get commands as they are distribution specific. The interface name is also OS and configuration specific, but anyway, this should be a good starting point.

from node-red-contrib-amazon-echo.

scargill avatar scargill commented on August 14, 2024

You beat me to it, yes that should solve the discovery issue.

from node-red-contrib-amazon-echo.

vuiperez avatar vuiperez commented on August 14, 2024

@vemeT5ak vemeT5ak

how are you i did the comands that you posted but still have on Amazon Echo hub " unable to start on port 80" . what should i do or what i did wrong?

from node-red-contrib-amazon-echo.

vuiperez avatar vuiperez commented on August 14, 2024

done i didn't change to port 8080 :)
thanks

from node-red-contrib-amazon-echo.

EddyS83 avatar EddyS83 commented on August 14, 2024

Hi together,
i've still a problem with using on same ip pihole on port 80...
If i forward the port to 8080 alexa works on node-red but my pihole not anymore.
Do somebody have a solution or can suggest me a way?

from node-red-contrib-amazon-echo.

thalesmaoa avatar thalesmaoa commented on August 14, 2024

@EddyS83, without having the ability to change Alexa port, you have to give up and change pihole

$ sudo nano /etc/lighttpd/lighttpd.conf

search for

server.port = 80

and change it.

from node-red-contrib-amazon-echo.

fercod avatar fercod commented on August 14, 2024

Hoping this helps someone. This worked for me as of 10 min ago.

sudo apt-get install iptables-persistent sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 sudo iptables -t nat -A PREROUTING -p udp --dport 80 -j REDIRECT --to-port 8080 sudo iptables -t nat -L sudo sh -c "iptables-save > /etc/iptables.rules"

In Node Red, the "Amazon Echo Hub" node needs to set to the whatever number port you set in the iptables. In my text above that number is 8080

THANKS! This is a solution.

from node-red-contrib-amazon-echo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.