You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PagePark routing requests between apps on the same server #17
Make the request from another server and it works fine.
Where to look
This is where PP maps requests to domains it's serving.
BTW, it uses request, yes I know it has been deprecated.
The pipe stuff in delegateRequest is like a black box to me, I don't really understand the magic it's doing or if it's really necessary. It probably isn't, but I wrote this code a long time ago, when I wasn't as skilled in Node.
Please disregard if this is off base, not considering all the details you've shared or is something so basic that you've already ruled it out...
The host machine may need to have ports 1339 and 1340 open (on my Ubuntu dev server, for example, for Node.js development, when I'm ready to test from another machine on my network, I have to use UFW to specifically OPEN the custom ports I'm using.
And I think I saw a reference to port 80 in the code as well, so nothing else can be running on that port also.
That would be my starting point at least. Next I would look to see if I can identify any networking related issues that may come into play -- same ip range? same VLAN?
I think this is related to scripting/Scripting-News#110 where the PREROUTING to map 80 to the pagepark listener is never even seen by connections that originate from the same host. That is, processes on that server try to connect to port 80, and get blocked because nothing is listening there. You can diagnose this by opening a terminal and using sudo nc -k -l -v 80 < /dev/null to see what clients connects to port 80 locally, and then trying the relevant cross-site requests.
Activity
tamaker commentedon Feb 4, 2021
Please disregard if this is off base, not considering all the details you've shared or is something so basic that you've already ruled it out...
The host machine may need to have ports 1339 and 1340 open (on my Ubuntu dev server, for example, for Node.js development, when I'm ready to test from another machine on my network, I have to use UFW to specifically OPEN the custom ports I'm using.
And I think I saw a reference to port 80 in the code as well, so nothing else can be running on that port also.
That would be my starting point at least. Next I would look to see if I can identify any networking related issues that may come into play -- same ip range? same VLAN?
Good luck!
mcenirm commentedon Feb 5, 2021
I think this is related to scripting/Scripting-News#110 where the PREROUTING to map 80 to the pagepark listener is never even seen by connections that originate from the same host. That is, processes on that server try to connect to port 80, and get blocked because nothing is listening there. You can diagnose this by opening a terminal and using
sudo nc -k -l -v 80 < /dev/nullto see what clients connects to port 80 locally, and then trying the relevant cross-site requests.Update: https://grainier.net/iptables-nat-prerouting-not-work-localhost/ has a reasonably concise explanation of the PREROUTING issue with localhost:
(You'd need to replace "9191" with the actual listener port in both entries.)
scotthansonde commentedon Feb 5, 2021
I was about to point to a ServerFault entry about OUTPUT rules for localhost, but @mcenirm beat me by 30 seconds. 😄 Here it is anyway: https://serverfault.com/questions/211536/iptables-port-redirect-not-working-for-localhost
scripting commentedon Feb 5, 2021
Thanks to all esp @mcenirm. That was the problem. Whew. Glad I asked.
I posted this note in my development diary.
scripting commentedon Feb 5, 2021
Updated the docs.
https://github.com/scripting/pagePark#mapping-port-80-to-1339