Mesibo On Premise Deployment - curl: (56) Recv failure: Connection reset by peer - linux

I am trying to configure mesibo communication services On-Premise Deployment and tried to deploy while backend application using docker - FastCGI - NGINX. I have followed the below URL https://mesibo.com/documentation/on-premise/#hosting-mesibo-backend-apis Please see the title "Hosting mesibo backend APIs". I have used the 11443 port to deploy the application in the docker.
While checking the command sudo netstat -ltnp getting the following output. So the process is running correctly.
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 267497/mysqld
tcp 0 0 0.0.0.0:11443 0.0.0.0:* LISTEN 535097/backend
When I try to run the command
curl http://0.0.0.0:11443 => getting error as "curl: (56) Recv failure: Connection reset by peer"
Please help me to get out of this issue.
========= Found the Issue - But it may be help someone
run the command 'ifconfig' to find the docker ip address. then try the curl command with that ip address.

Please note, mesibo DOES NOT have any web server so you can't use curl directly.
Refer to this document
https://mesibo.com/documentation/on-premise/#hosting-mesibo-backend-apis
It clearly says you should configure and point to your web server. In turn, your web server will connect to the mesibo FastCGI server. From the above doc
you need to configure a URL on your webserver to access backend APIs.
Any API request received on this URL should be forwarded to the mesibo
backend FastCGI server at the port specified in the command, port 5000
in above example.
Please follow the document and configure a URL on your web server and then curl to that URL.

Related

AWS Route53 SSL communication failure: Received fatal alert

I have one site deployed on AWS Rosa. This site is secured with https protocol. I am trying to create Route53 healthcheck for that site. The Route53 healthcheck fails stating reason -
Failure: Resolved IP: x.x.x.x. SSL communication failure: Received fatal alert: protocol_version
However I am able to access the site on browser.
As mentioned at-
https://aws.amazon.com/premiumsupport/knowledge-center/route-53-fix-unhealthy-health-checks/
following curl command returns me httpcode 200 and response time less than 1 second
curl -Ik -w "HTTPCode=%{http_code} TotalTime=%{time_total}\n" <http/https>://<domain-name/ip address>:<port>/<path> -so /dev/null
Also when I was trying to run same command with old curl version, I was getting error -
routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
The error from Route53 also shows protocol version. Not sure if these 2 are related.
Anyone came across this issues , any pointers will be highly appreciated.
If site URL is accessible over browser, then Route53 health check should return healthy state

Rest API w/ JsonServer in Ubuntu - Connection Refused

I was requested to create a Web Server with an API in it to test firewall rule we are planning to implement soon. I am quite new with all this network stuff, so I'm a bit lost on it.
I need to call this API from another machine. The JsonServer is using my port 3000, when I request my API through Postman, using https://localhost:3000/posts, my JSON file is returned normally, however when I change the localhost, to my IP, my connection is being refused. I decided to install a WebServer, to test it and I could access the default Apache page from my others machines. I opened the port 3000 on my server, but I couldn't. The WebServer is working with my IP as well. It seems to be something with my port 3000, and I a not sure about how to fix that.
I executed the command:
sudo lsof -i -P -n | grep 3000
And this was my output
node 29472 user 22u IPv4 254348 0t0 TCP 127.0.0.1:3000 (LISTEN)
Any ideas how can I access my API from another machine?

error in ngrok - failed to complete tunnel connection

So I just wanted to create some phishing websites to try them out but now whenever I try to create one via ngrok or just start ngrok ./ngrok http 80 and then visit the site it shows me this -
Failed to complete tunnel connection
The connection to https://xxx.xxx.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
Make sure that a web service is running on localhost:80 and that it is a valid address
the error encountered was: dial tcp [::1]:80:Connect:connection refused.
and also google shows a warning to these whenever I visit them
any suggestions?
You should create a local server on port 80 . Use php or python to create a local server .
PHP
~$ php -S localhost:80
Python
~$ python -m http.server 80
After starting the local server open a new terminal session and start ngrok
~$ ./ngrok http 80
You can create a link with ssh also .make sure that you have installed ssh.
~$ php -S localhost:80 | ssh -R 80:localhost:80 ssh.localhost.run
or
~$ python -m localhost:80 | ssh -R 80:localhost:80 ssh.localhost.run
By the way chrome will automatically detect the phishing pages.

Failed to complete tunnel connection error with ngrok

Failed to complete tunnel connection
The connection to http://cc1e064782fc.ngrok.io was successfully tunneled to your ngrok client, but the client failed to establish a connection to the local address localhost:80.
Make sure that a web service is running on localhost:80 and that it is a valid address.
The error encountered was: dial tcp [::1]:80: connectex: No connection could be made because the target machine actively refused it.
Hi, I was setting up ngrok and got this error, I disabled the firewall too.
Take a look at this video where I show you the error.
https://youtu.be/uP4B79w4s7c
Its kind of a message that ngrok successfully created tunnel to your pc at port 80 but there is no service running at that port in your OS, Mostly people run a web server at 80 but you can run any service at that port.
So lets assume you are running a web server in your OS on port 80 then you can access that web server from anywhere on the internet using that ngrok tunnel.

How to set a Loopback nodeJS backend on Apache HTTP server running on CentOS

I've moved the backend (nodeJs+Loopback) of my application on a server CentOS. When I run it, it's listening on "localhost:3000". If I type "curl http://localhost:3000" while I'm on the server's terminal I get a response. When I try to call the application from remote, I use the real IP address instead of localhost, but it doesn't work.
The error is:
[proxy:error] (13)Permission denied:HTTP: attempt to connect to 127.0.0.1:3000(localhost) failed
Do I need to setup some configuration?
Thank you
Have you tried # setsebool -P httpd_can_network_connect 1 ??
Check out the bottom of this link:
https://wiki.apache.org/httpd/13PermissionDenied

Resources