node.js ENOTFOUND on windows despite working on mac - node.js

After having deployed a small project on mac I tried to get it running on another PC, windows this time (only have access to that one atm).
Using the same code, node.js version etc. I run into a problem.
When making a call to my mamp apache from my vue project (vue has host 8080, the apache server 80) I get greeted with a error 500 ENOTFOUND.
I configured the proxy in my vue.config which works on mac just fine. Strange thing on windows is I can change the localhost port (or 127.0.0.1) to whatever I want, it will always get resolved to port 80.
Anything I am overlooking here?

Related

Vue application running on Digitalocean times out in browser

First time I try to use a node.js droplet on Digitalocean: I have a vue.js application running on port 8080, but it times out when I try to load the masterpiece in the browser (I don't have a domain so I use the [server IP]:8080 to access it).
I made sure 8080 is open in the firewall (ufw):
Netstat -pln gave the result seen in the screenshot below, a node program is running but nothing is named vue in case that would be required:
Tried export HOST=0.0.0.0 on advice from a friend, but didn't seem to do anything.
Tested curl 127.0.0.1:8080 from the digitalocean console and it works correctly.
The browser error message is err _ connection timed out.
Any tips on how to get this to show in the browser? As I'm not experienced in working with servers please give me step by step instructions. Thanks!

Running Node App on Shared Hosting (It's almost working)

I've managed to get Node and NPM installed on my shared hosting account with Namecheap by following this answer. It all seems to be working, I can launch my app and it stays launched, but the subdomain which points to app's root route just shows up the folder of the domain.
I've tried going to myaddress.com/subdomain:8080 but I get a server error plus a 404. I've also tried changing Node's listening port from 8080 to 80, but on 80 I get an error:
Error: listen EACCES 0.0.0.0:80
So that means I don't have rights to port 80. How can I get clients to connect port 8080?
This is the part that shared hosting has a problem with, they wont open any ports for you. This is exactly where your workaround needs to be centered. Im currently looking for solutions to either use php to serve a node
see here https://www.npmjs.com/package/node-php-server
and here How to host a Node.Js application in shared hosting
or just configuring express to use somehow port 80.
These would be your best options.

localhost:3000 connection refused after app.js is set (Windows 7)

I've followed this manual of installing MEAN stack https://thecodebarbarian.wordpress.com/2013/07/22/introduction-to-the-mean-stack-part-one-setting-up-your-tools/
and I got stuck on the point where I should be able reach for localhost:3000 successfully, but instead I get ERR_CONNECTION_REFUSED. I checked the ports using
netstat -an
and it seems my port 3000 is not even open. My Apache is working on port 80 and after reaching for localhost:80 everything works fine (I even checked if closing the Apache helps). The only thing I changed in the manual is that I installed both express and express-generator thanks to this install express with npm.
Can anybody tell me what should I do additionally so my port 3000 responds?
EDIT: I also checked the host files in system32, the only localhost address I have is 127.0.0.1 (three times, though!)
EDIT2: Solved, same issue as here: Express Node.js doesn't work
Remember to change the app.js file in the folder you are currently working in!

socket.io example not working - Windows

Im using Node.js 0.6.2 on Windows 7
I managed to get the dependencies solved on Win7 for socket io, now when i launch one of the example apps it doesnt throw any errors.
however, for the IP and listener it reports its listening on , when i launch that in the browser, the connection times out.
Any ideas?
I've tried setting app.listen to different ports and IP addresses, but no luck.
Just for reference, i've tried the famous "hello world" Node.js example which works fine.
Things i've already checked
Other services running on the same ports or same listener IP
Different IP addresses and ports
Firewall / Port blocking
Restarting of the machine
dependencies in node_modules
Different browsers
Telnetting to the listener port (which shows a response so the listener must be working?)
So this works for me (running msysGit and node.js, both latest versions; both Windows installers):
$ cd c:\msysgit\msysgit\cmd
$ git clone git://github.com/ry/node_chat.git
$ cd node_chat
$ "c:\progra~1\nodejs\node.exe" server.js
I can open 127.0.0.1:8001 now and run it. The fact that you have to cd into the directory is a bug in node_chat, same behavior is in OS/X.
I managed to solve this problem with some outside help.
I downloaded Node 0.6.3 which comes with NPM.
I created a test folder and then ran NPM Install socket.io express within the test folder and then tested the example app from the Socket IO website in the how-to-use section.
Socket IO emitted the events fine and it all seems to be working well. Thanks everyone for the help and guidance.

IIS and Glassfish in Windows 7

I installed the newest version of Windows 7.
This is my development box, so I have glassfish installed, which I use for Java applications. Also, I use IIS to run PHP applications. I run both servers on port 80, but never at the same time.
However, since I set up IIS, I can't get glassfish to run. In eclipse, it always gives the following error:
Port conflict: Please stop the server process using the same port as the one used by the Application Server.
A server process is already running on this port but we cannot determine if it's a GlassFish process (lack of info or credentials).If you do not find something else running on this port, check for antivirus software blocking or monitoring this port.
Edit: I tried turning off IIS, and even turned off the IIS feature. Still no luck.
I also ran netstat, and the following are showing up on ports that glassfish uses:
Proto Local Address Foreign Address State
TCP 0.0.0.0:80 NBSDTVL01574:0 LISTENING
TCP [::]:80 NBSDTVL01574:0 LISTENING
Thanks
This turned out to be an issue with my virtual machine. A fresh copy fixed the issue.
this happen because you select the same port number use by the iis and glashfish, i suggest you configure either of the two to use different port number.

Resources