Calling localhost:3000 on the browser after starting dagit returns ERR_CONNECTION_REFUSED [duplicate] - wsl-2

This question already has answers here:
Localhost refused to connect on WSL2 when accessed via https://localhost:8000/ but works when using internal WSL IP adress
(2 answers)
Closed 6 months ago.
I have just started trying out dagster, I am already stumped at the first steps.
In the guide they specify:
Then, start the Dagit web server:
dagit
Open http://localhost:3000 with your browser to see the project.
Now, you can start writing assets in my_dagster_project/assets/, define your own ops or jobs and include them in my_dagster_project/repository.py.
Alright, I started dagit but I get ERR_CONNECTION_REFUSED when I try to open it via the browser. Any ideas?
FYI, I am using WSL2.

Ok,
This was a WSL2 port forwarding or localhost definition problem, nothing to do with dagster. I restarted my local machine and now it is working.

Related

NodeJS and React - LAN connection not working

Description
I have a Node server and React App running on my notebook Ubuntu 18.04.
Notebook ip is 10.0.0.101
I tried to connect my desktop to this server on the same network
Desktop ip is 10.0.0.100
Node is running on PORT=3333
React is running on PORT=3000
I can ping my notebook from my desktop but when I try to connect to node using Insomnia or to http://10.0.0.101:3000 from my desktop I cannot reach.
Errors
When try to connect to backend with Insomnia
Error: Couldn't connect to server
When try to connect to app on 10.0.0.101:3000
ERR_CONNECTION_TIMED_OUT
What I've done
I already changed the node listen and specified the port and the ip but it didn't work.
I tried to use my phone as router and connect from my phone to react on my notebook and also didn't work.
I've tried so many things since I can't remember them all.
I'm also creating a react-native app and when I try to connect to my mobile using Expo, it just works using tunnel, but cannot get data from the backend.
Please save me.
Thanks
After making many failed attempts, I realized that the problem was in my notebook.
I checked my firewall and it was disabled and still cannot get acess to my notebook on LAN. But finally I discovered what have to be done
Solution
You have to open the specific port for TCP traffic
Ubuntu:
sudo ufw allow <PORT-NUMBER>/tcp
or for Red Hat Enterprise
firewall-cmd --add-port <PORT-NUMER>/tcp
Reference: Examples of how to open firewall ports

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!

how to run nodejs app in vps with plesk enable

Hi guys im newbie in vps... I've bought an ovh not managed vps . I like to face problems... But I don't find any documents to these one. Is simple like I said I want to run a nodejs app in centos vps environment but I have enabled plesk.. and I saw in console running the app with the trace but I try to open website with the port and doesn't find anything.
http://vps406315.ovh.net
Thx for all guys
-----------------EDIT-------------------
I'm going to explain better,sorry for previous post.
There is no error, in my console all is ok. Like I said i have an CentOS VPS. Steps that I did:
Connect with PUTTY
Go to folder where is the NodeJS project.
I set the port to 8080
Write node index.js
The app is running and writing the right trace.
I use chrome to check the ip, and show me the default plesk page.
I use wget to check it, and with only http://92.222.71.137/. I attach
an screenshot
I tried to use with the port 8080 with the chrome and wget in putty,
and the response was the same.
In the other hand if I use http://92.222.71.137:8080/login with putty
download the right login.html, and the nodejs app write a trace
indicate me that someone connect to that page. But if I access with
chrome is not working.
Now I would like no know how to make access frome Chrome.
Thx 4 all and sorry for my newbie knowledge
You should give some other details on the configuration or eventual errors you get (both on the browser and the VPS) and how you run the node app (behind a web server, for example)
If you are not running you node app behind a web server, are the node app listening on the correct interface ? 127.0.0.1 and 92.222.71.137 (your site external address) are not the same.
On your VPS you can try to call the node app from the VPS itself using wget or cURL and looking for what happen in the app trace.
Finally it was easy... only i had to open a port to use with TCP, using
iptables -I INPUT -p tcp --dport 8856 --syn -j ACCEPT –

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.

Resources