111: Connection refused while connecting to upstream - asp.net-core

I tried to duplicate my .NET Core Linux environment from this question to have 2 environments, and the logs say
Now listening on: http://[::]:5000
which makes me think it is working, but the requests get this error:
(111: Connection refused) while connecting to upstream, client:
172.31.44.219, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:5000/", host: "172.31.47.124"
And it times out. I believe everything is the same, while the initial environment is working perfectly fine. I created this one without "configuring more options" so it is not part of a VPC etc but neither is my initial environment. What should I be checking? I have viewed some answers on here for this issue but no fixes worked. For example, I commented out app.UseHttpsRedirection(); but still have the issue.

Okay, so I have noticed that EB creates and attaches a security group, and it listens on port 80, not 5000. I am leaving this here as it might be helpful for someone else (aka my future self).

Related

Testing OC4J's default configuration

I have installed Oracle Developer Suite 10g release 2(Complete), which leaded to installed standalone OC4J. Now I am trying to Testing OC4J's default configuration.
I started the OC4J instance through Start> Search for oc4j> clicked oc4j batch file. OC4J is initialized now.
According to the docs...
https://docs.oracle.com/cd/B14099_19/web.1012/b14361/config.htm#i1049203
I tried to test it by accessing http://localhost:8888/ from a Web browser.
Unfortunately, the result is...
localhost refused to connect.Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
According to the docs, I also tried...
http://localhost:8888/servlet/HelloWorldServlet, which should return a "Hello World" page.
Unfortunately, same result was produced...
localhost refused to connect.Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
I also tried starting the server using...
java -jar oc4j.jar
from J2EE>Home directory, and tried both links mentioned above...
http://localhost:8888/
and
http://localhost:8888/servlet/HelloWorldServlet
And the result was...
404 Not Found
Resource / not found on this server
and
404 Not Found
Resource /servlet/HelloWorldServlet not found on this server
respectively.
P.S. I have a static IP address.
What could be the cause for that?

Unable to establish SSL connection upon wget on windows, accessing NASA CDDIS

I've been using wget to pull some .rnx files from the CDDIS NASA archives. This has been working no problem for ~200 iterations until now. Not sure what happened.
I'm receiving an SSL connection error that occurs on other files in the CDDIS website. when I try the same command for, say, www.google.com, the index file is downloaded fine to the given output directory.
I have found this solution thread for linux which seems like my issue:
Unable to establish SSL connection upon wget on Ubuntu 14.04 LTS
or
Unable to establish SSL connection, how do I fix my SSL cert?
I am on Windows 11. To be completely honest despite some googling and toying around with the ports (302/443) based on that thread, it's all a bit opaque on how I can fix this issue myself. Would really appreciate a bit more of a breakdown on how I might approach this problem.
>wget -P C:\Users\name\Desktop\brdc http://cddis.nasa.gov/archive/gnss/data/daily/2021/001/21p/BRDC00IGS_R_20210010000_01D_MN.rnx.gz
--2022-05-01 17:47:05-- http://cddis.nasa.gov/archive/gnss/data/daily/2021/001/21p/BRDC00IGS_R_20210010000_01D_MN.rnx.gz
Resolving cddis.nasa.gov (cddis.nasa.gov)... 198.118.199.52
Connecting to cddis.nasa.gov (cddis.nasa.gov)|198.118.199.52|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://cddis.nasa.gov/archive/gnss/data/daily/2021/001/21p/BRDC00IGS_R_20210010000_01D_MN.rnx.gz [following]
--2022-05-01 17:47:05-- https://cddis.nasa.gov/archive/gnss/data/daily/2021/001/21p/BRDC00IGS_R_20210010000_01D_MN.rnx.gz
Connecting to cddis.nasa.gov (cddis.nasa.gov)|198.118.199.52|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://urs.earthdata.nasa.gov/oauth/authorize?client_id=gDQnv1IO0j9O2xXdwS8KMQ&response_type=code&redirect_uri=https%3A%2F%2Fcddis.nasa.gov%2Fproxyauth&state=aHR0cDovL2NkZGlzLm5hc2EuZ292L2FyY2hpdmUvZ25zcy9kYXRhL2RhaWx5LzIwMjEvMDAxLzIxcC9CUkRDMDBJR1NfUl8yMDIxMDAxMDAwMF8wMURfTU4ucm54Lmd6 [following]
--2022-05-01 17:47:05-- https://urs.earthdata.nasa.gov/oauth/authorize?client_id=gDQnv1IO0j9O2xXdwS8KMQ&response_type=code&redirect_uri=https%3A%2F%2Fcddis.nasa.gov%2Fproxyauth&state=aHR0cDovL2NkZGlzLm5hc2EuZ292L2FyY2hpdmUvZ25zcy9kYXRhL2RhaWx5LzIwMjEvMDAxLzIxcC9CUkRDMDBJR1NfUl8yMDIxMDAxMDAwMF8wMURfTU4ucm54Lmd6
Resolving urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)... 198.118.243.33
Connecting to urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)|198.118.243.33|:443... connected.
Unable to establish SSL connection.

webrtc app show my Turn server broken, but it works

I have my stun / turn server running on local pc (CoTurn). It is tested on "https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/" and works. I have a domain name and configured the modem with public ip. I configured apache2 to make the site visible to the world. I have active and valid letsencript certificates. Everything works in short. But the test application starts the connection (the external pc communicates with the local via socket.io) but then the video is not seen and the console returns the error: ICE failed, your TURN server appears to be broken, see about:webrtc for more details.
The link of the application that I use as a test, because with my original I had no comparisons to make. First time with socket.io. But socket.io send and receive messages so these not appear a problem for now.
https://github.com/anoek/webrtc-group-chat-example
P.S.:
Ok. Server is behind the nat. My app (but linked app too) work very fine on local network (sorry I checked this point first before). These with my turn/stun server, than with public stun/turns google servers. This evidently indicates a bad setting of apache2 server or/and turn server. Where could I find a guide about it?
My server situation: myServerIpLocal-xxx.xxx.xxx.xxx -> nat/router/modem WithPublicIpStatic-xx.xx.xx.xx. I can see my sites from all the world, but turn server not work outside the local network. Inside local network work ok.
these my turn config:
listening-port=3478
tls-listening-port=5349
alt-listening-port=3479
alt-tls-listening-port=5350
listening-ip=xxx.xxx.xxx.xxx /*mylocal ip*/
relay-ip=xxx.xxx.xxx.xxx /*mylocal ip*/
external-ip=xx.xx.xx.xx /*my public ip on nat/ruter/modem */
min-port=49152
max-port=65535
verbose
fingerprint
userdb=/var/lib/turn/turndb
realm=mysite.com
cert=/etc/ssl/certificate.pem
pkey=/etc/ssl/private.key
dh-file=/etc/turn/dhparam.pem
no-stdout-log
log-file=/myhome/.turn/turn.log
lt-cred-mech
user=myusername:mypasswd
# Turn OFF the CLI support.
# By default it is always ON.
# See also options cli-ip and cli-port.
#
no-cli
#Local system IP address to be used for CLI server endpoint. Default value
# is 127.0.0.1.
#
cli-ip=127.0.1.1
# CLI server port. Default is 5766.
#
cli-port=5766
# CLI access password. Default is empty (no password).
#
cli-password=logen
no-sslv3
no-tlsv1
my old code on turn.conf:
lt-cred-mech
user=myusername:mypasswd
but turn work only locally .... probabily because I use:
sudo turnserver -L myPublicIp -o -a myrealm
at every coturn start command ....
actually I try not use the command "turnserver" and I try to use onlu sudo coturn start .....
basically in my turn.conf file I change these:
lt-cred-mech
user=mypasswd:myusername /***** mind the gap ;) *****/
these because my index.js file debug never see my external connection as authrized user ..... magically at these time my app perform webrtc multiple connection with every pc and mobile .... inside and outside my lan .... (I try connect my appa from phone in barcelona spain to other one in london with good result).
May be coturn wiki need to update?
Finally I would like to thank the serverfault and super-user guys who rejected my question. Since I had to make arrangements, I was able to acquire new and interesting information on this subject.
regards

Kurento Hello World, not returning loopback

I am trying to setup the basic hello world example.
I am using a t2.micro instance with Ubuntu 14.04 LTS and I have the github code for the example on my local machine.
The url I am using is:
https://localhost:8443/index.html?ws_uri=wss://ec2INSTANCE:8888&ice_servers=[{"urls":"stun:stun.l.google.com"}]#
I do not have the stun or turn configured on the server, but it should be ok since I am passing the stun server to use in the url.
Any advice on this?
I just checked my console and I see this, even though port 8888 is open in AWS Security group that this instance is in
VM8812:35 WebSocket connection to 'wss://ec2Instance:8888/' failed: Error in connection establishment: net::ERR_CONNECTION_CLOSED
I was able to get past the issues that I was seeing
Follow basic instructions on a fresh EC2 (Ubuntu 14.04 LTS), using http://doc-kurento.readthedocs.io/en/stable/installation_guide.html
Add a STUN server in conf
Using stun:173.194.66.127:19302
Tested with http://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/
Secure WS to use WSS, which is required due to HTTPS requirement since Chrome 47, using http://doc-kurento.readthedocs.io/en/stable/mastering/securing-kurento-applications.html#configure-javascript-applications-to-use-https
Uncomment secure section of /etc/kurento/kurento.conf.js
Create the self signed certificate, and placed in /etc/kurento
Go to https://ec2InstanceUrl:8433/kurento and accept insecure connection
Go to example https://ec2InstanceUrl:8443
You must verify that your STUN server is working by seeing something similar to the below image, with the srflx under Component Type.

Vagrant share producing a 400 bad request

I'm using Vagrant with apache2 and specifically the command
vagrant share --https 443
It all starts fine and provides a URL. When I access that URL I'm presented with a 400 error:
Bad Request
Your browser sent a request that this server could not understand.
Apache/2.4.12 (Ubuntu) Server at *.vagrantshare.com Port 443
I have been accessing the vagrant machine using https just fine, but it doesn't seem to like to work with vagrant share.
This is a known Vagrant Share bug: https://github.com/webdevops/vagrant-docker-vm/issues/51
The only workarounds I've seen discussed are to use a custom domain or to use another product entirely (e.g. ngrok) to create the share. See the bug discussion here: https://github.com/mitchellh/vagrant/issues/5493#issuecomment-159792794
Vagrant Share docs for custom domains are here: https://atlas.hashicorp.com/help/vagrant/shares/custom-domains