Flutter web refuse to connect on port 8080 - flutter-web

I am trying to start my flutter web app on port 8080 but the chrome is giving me error. A couple context:
flutter doctor is all good
I am on flutter 2.0.6
I start the app with command flutter run -d chrome --web-port=8080
After start the app on port 8080, the only app using port 8080 is dart
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dart 57589 **** *** ******* 0t0 TCP localhost:http-alt (LISTEN)
The page basically hang there and eventually giving me the following error:
ERR_CONNECTION_REFUSED localhost refused to connect.
Is there a reason why this is happening?

Related

Access Superset through a remote browser

I have installed Apache Superset on a remote Linux Server and initialized it on port 8080. When I pull up localhost:8080 on the Linux server, the homepage shows up which suggests that the installation worked as per their instructions here.
When I try to access this page from my laptop (Windows- Browser:Chrome) with http://server-name:8080. It gives me the 'This site can't be reached' page.
I tested using netcat if the connection was open by typing nc -zvw3 server-name 8080 and it gave me Connection to server-name 8080 port [tcp/webcache] succeeded!
I have Jupyter installed on the same server on port 8888 and it works perfectly. Any thoughts would be greatly appreciated.
You may need to try this command by defining the IP address:
superset run -h 0.0.0.0 -p 8080

Running node app digitalocean and accessing it

Im running my node app with grunt on a DO droplet. I start the server
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:3000
But when I navigate to my dropletIP:3000 I cannot see the app, I get:
This site can’t be reached
mydropletIP refused to connect.
Shouldn't my app be available? I don't have nginx or anything installed.
I was having similar problem but the solution was simple. Change from 'localhost' to '0.0.0.0' i.e
.listen(8080, '0.0.0.0');
And then to test your api just enter your static ip of droplet with port that you have entered i.e droplet-ip:8080
Check the particular port is opened or not ,using following command
sudo ufw status
If any Firewall enabled and any port is block means you can see that.
netstat -an | grep "LISTEN " ( List of listening port on server)
I need this info ,then only we can find a problem

Access python web application from internet

I am running an Eve instance on my Linux webserver to allow me to access a database using HTTP. When I run the script, the following is displayed:
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
lsof -i :5000 yields
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 11824 root 3u IPv4 10213572 0t0 TCP localhost:5000 (LISTEN)
Trying to access http://goodenough.io:5000 doesn't work. I have this working on localhost on my Windows, but it just won't work over the internet.
http://www.yougetsignal.com/tools/open-ports/ shows that the port is closed despite the app listening and Digital Ocean claiming all ports are open by default.
But my new theory is that perhaps there is more to having external requests recognized?
Any ideas or suggestions would be amazing. Thank you.
In your application, there must be some code like this:
app = Eve()
app.run()
This will listen on the loopback interface by default. To listen on a specific IP address (the externally visible IP in your case), use:
app.run(host="X.X.X.X")
where X.X.X.X is the relevant IP.

Node-inspector in docker does not load sources

I've two docker containers with different images. This is the partial output of "docker ps" command:
$user: docker ps
CONTAINER ID IMAGE PORTS
9c8ff81215d4 node:slim 0.0.0.0:5858->5858/tcp, 0.0.0.0:10101->10101/tcp
d85a0de91432 node-debug 0.0.0.0:8080->8080/tcp
The first container is running a server app with debug option:
$user: node --debug server.js
Debugger listening on port 5858
...
and listens on port 5858 with debugger and on port 10101 with server.js app.
The second container is running node-inspector
$user: node-inspector
Node Inspector v0.12.6
Visit http://127.0.0.1:8080/?port=5858
that connects by default on port 5858 to debugger and listens on port 8080 for web-inspector in Chrome.
The issue is when I visit http://127.0.0.1:8080/?port=5858 I see the inspector without loaded sources.
In the Chrome console is see this error:
Request with id = 10 failed. "ErrorNotConnected: Error: connect ECONNREFUSED 127.0.0.1:5858. Is node running with --debug port 5858?"
The problem here is that node inspector is trying to connect to localhost/127.0.0.1, i.e. local to that container, not local to your host. When you run in bridge networking (default), each container is on its own IP.
You could quickly resolve this with either of these options:
Use host networking for both containers
In this case the port forwarding you configured is not necessary any longer
Use host networking just for the node inspector container
In this case you still need port 5858 mapped to host but no longer the port 8080 on node inspector

Debug meteorjs application with WebStorm7

I have WebStorm7 installed on a Windows7 machine.
If I run a meteor project in the Windows7 machine with:
>set NODE_OPTIONS=--debug=47977 & meteor
it prints:
=> Meteor server running on: http://localhost:3000/
=> debugger listening on port 47977
and I can debug with WebStorm7 using the_Node.js Remote debug_ configuration, with Host: 127.0.0.1 and Port: 47977.
If I run a meteor project in a Ubuntu machine (within a Oracle VM VirtualBox, with address 192.168.1.9) with:
$ NODE_OPTIONS="--debug=47977" meteor
it prints only:
=> Meteor server running on: http://localhost:3000/
and I cannot debug with WebStorm from the Windows7 machine using the Node.js Remote debug configuration, with Host: 192.168.1.9 and Port: 47977.
From the ubuntu machine a telnet 127.0.0.1 47977 does not work too. It looks like the debugger is not started at all. What am I doing wrong?
the issue might be related to the fact that node.js debugging is only listening on localhost, so you can't connect to the used port from remote host. The workaround is to use a proxy (see http://delog.wordpress.com/2011/04/08/a-simple-tcp-proxy-in-node-js/, for example)
This proxy can be used as follows:
$: node tcpproxy.js 8585 127.0.0.1 5858
8585 here is the 'exposed' port that webstorm will connect to (you can make this what you wish). You are directing traffic that is coming in on 8585 to 5858 (the local debugging port). Ensure 8585 is open on your firewall if you have one. You have to specify this 'exposed' port in your Remote Debug run configuration as a debug port

Resources