Err_connection_refused in amazon ec2 instance - amazon-web-services

I am facing ERR_CONNECTION_REFUSED / The site can't be reached issue with my ec2 instance(Amazon linux ami)
When I used telnet <publicIP> 80 it says
Trying
telnet: connect to address : Connection refused
The security group is open to port 80 for Inbound
When I use telnet <publicIP> 22 it hangs
Any help is highly appreciated. Thanks in advance.

What are you trying to do? If you want to just start a server, you need to enable a server on the machine (SSH). Then you can access your web server via IP (if that's what you want).
If you don't open a server, the connection will be refused.

Related

How to open a default listening port on gcp?

I am using ubuntu 18.04 in my GCP and have setup my firewalls to listen to port 5000 by default:
my output for netstat -tupln:
when I open <my-ip-address>:5000 I can access my hosted website, but when I try to do <my-ipaddress> It says connection refused. I don't know why it says show as I have changed default port on firewall as well. Can someone please help me out here?
when you open up the public address in a web browser it will go to the server looking for an application running on port 80 or 443 in case of https request. That is why the connection is refused because your firebase only allows for 5000 port request will be forward to your machine.

Amazon EC2 HTTP connection refused, but HTTP port is open

I created a new Ubuntu T2 Micro instance on EC2.
Created a new Elastic IP and selected "EIP used in: VPC"
Associated the address to my new EC2 Ubuntu instance.
I now have a Private IP and a Public/Elastic IP. No Public DNS.
My security group has SSH port 22 and HTTP port 80 open.
I can connect to the instance just fine through SSH using the Public IP, but when I try to browse to the Public IP through the browser it says connection refused. I can't ping it either.
I'm out of ideas.
Amazon EC2 HTTP connection refused, but HTTP port is open
That's already proven by the fact that you got 'connection refused'. If the port wasn't open it would have been 'connect timeout'.
'Connection refused' means that the service you tried to connect to wasn't listening at that port. Possibly it isn't started at all, or even installed.
You need to install a web server on your machine, such as Apache or Nginx. This is not provided by default in EC2.
go to security groups --> edit inbound rules --> add rule (add a custom TCP port 8888 with 0.0.0.0/0 ).
There are two major things that can happen to your web server.
Connection refused :- Which means there is no service running (http/JBOSS/nginx) on your server which is available to accept connections on port specified (which is 80 in this case)
Connection timed out :- Would mean server is not able to process any incoming connection hitting it at port 80. Once you fix the security group and your NACL (if you don't have a default one), then you need to re-check to see if it's service which is giving out the error, not to forget that the error response will change.

Ec2 Smtp Port connection refused issue not able to recieve emails

When I try to do
telnet goodin.hk 25
It gives connection refused on EC2 instance this is the issue do anyone know how to resolve this
I have this port turned on in security groups configuration.

Curl amazon EC2 instance getting error

Hi I have been using Amazon Ec2 server and I am trying to call to this server using curl from another server(php) which is hosted in godaddy.
While calling I am getting the below error
Error: "Failed to connect to ec2-**-**-**-**.us-west-2.compute.amazonaws.com port 8080: Connection refused" - Code: 7
Can anyone tell me about what is the actual issue.
Note: While trying to connect this through rest api tool it is working fine.
Make sure, the security group for the ec2 instances has the inbound rule from Goddaddy's IP range or set to all (0.0.0.0/0) with port 80 and 443.

Unable to access JBOSS server deployed on Amazon EC2

I have deployed jboss-4.2.3 on an EC2 instance. I have added appropriate rule to open port 8080 for inbound traffic. When I ssh into this instance and do curl localhost:8080, the expected response can be seen
But when I try to access it in a browser on my laptop, am unable to connect. Few other things I have tried to eliminate other possibilities
In order to eliminate possibility of firewall issues on my laptop, have tried to connect from another instance on amazon. Doesnt work
Also tried to configure jboss to listen to port 80. Still it can't be accessed. Apache running on port 80 however responds
Any guidance is highly appreciated
Bind your jboss to all IP addresses as below:
./run.sh -b 0.0.0.0
I was struggling with the same issue.
You need to open up port 8080 in the Security Groups as Wildfly is using it. Then you should be able to access the page.