Docker issue during gatling performance test - spring-boot

I have a spring boot application, and I run a performance test on it, using Gatling.
The issue is that after a few requests where everything works OK, the server returns connection refused and no other requests are working.
Gatling log looks like this:
---- Requests ------------------------------------------------------------------
> Global (OK=14 KO=1001 )
> POST /template (OK=13 KO=938 )
> PUT /feedback (OK=1 KO=63 )
---- Errors --------------------------------------------------------------------
> j.n.ConnectException: Connection refused: no further informati 577 (57,64%)
on
> j.i.IOException: Premature close 240 (23,98%)
> j.n.c.ClosedChannelException 184 (18,38%)
When I create a manual request using curl, returns:
$ curl https://localhost:8087
curl: (7) Failed to connect to localhost port 8087: Connection refused
If I connect to docker and do the request:
$ docker exec -it web /bin/bash
root#794f9e808f14:/# curl https://localhost:8443
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html
SSL handshake failed, as expected, but this means that the server is up an running.
The port is mapped in docker:
$ docker port web
8443/tcp -> 0.0.0.0:8087
8443/tcp -> :::8087
After restart, all thing happen again.
I'm using docker on a WSL Ubuntu. Not sure if this matters too much. What can I do to make this connection more stable?

Related

curl: (7) Failed to connect to localhost port 9000

We are using AWS Lambda runtime interface emulator to run our app locally inside Docker using lite-server
I start my docker container with:
docker run -p 9000:8080 image-name
The curl http://localhost:9000 command is returning
curl: (7) Failed to connect to localhost port 9000 after 0 ms: Connection refused
I am a newbie to Docker, can anyone please suggest how to fix it?

cURL error 28: Failed to connect to systemb port 80: Timed out for http://systemb/api/push_products [duplicate]

This question shows research effort; it is useful and clear
I have checked the cURL not working properly
When I run the command curl -I https://www.example.com/sitemap.xml
curl: (7) Failed to connect
Failed to connect on all port
this error only on one domain, all other domain working fine, curl: (7) Failed to connect to port 80, and 443
Thanks...
First Check your /etc/hosts file entries, may be the URL which You're requesting, is pointing to your localhost.
If the URL is not listed in your /etc/hosts file, then try to execute following command to understand the flow of Curl Execution for the particular URL:
curl --ipv4 -v "https://example.com/";
After many search, I found that Hosts settings not correct
Then I check nano /etc/hosts
The Domain point to wrong IP in hosts file
I change the wrong IP and its working Fine
This is new error Related to curl: (7) Failed to connect
curl: (7) Failed to connect
The above error message means that your web-server (at least the one specified with curl) is not running at all — no web-server is running on the specified port and the specified (or implied) port. (So, XML doesn't have anything to do with that.)
you can download the key with browser
then open terminal in downloads
then type sudo apt-key add <key_name>.asc
Mine is Red Hat Enterprise(RHEL) Virtual Machine and I was getting something like the following.
Error "curl: (7) Failed to connect to localhost port 80: Connection refused"
I stopped the firewall by running the following commands and it started working.
sudo systemctl stop firewalld
sudo systemctl disable firewalld
If the curl is to the outside world, like:
curl www.google.com
I have to restart my cntlm service:
systemctl restart cntlm
If it's within my network:
curl inside.server.local
Then a docker network is overlapping something with my CNTLM proxy, and I just remove all docker networks to fix it - you can also just remove the last network you just created, but I'm lazy.
docker network rm $(docker network ls -q)
And then I can work again.

cURL error 7: Failed to connect to 127.0.0.1 port 8080 with no apparent reason

I'm developing a web API to communicate with Openstack, and I'm encountering the following error when sending a curl request:
cURL error 7: Failed to connect to 127.0.0.1 port 8080: Connection refused
What I dont understand is how I can:
1- access the Openstack API via my browser
2- send curl requests via Postman
, but can't:
1- send curl requests from my webAPI to the Openstack API
2- send curl requests from the Openstack virtual machine CLI
On my openstack machine:
Http service Apache2 is working
There are no errors on syslog
If I run
netstat -antp | grep :80
netstat -antp | grep:80
Already lost 2 days searching for something that would solve my problem but wasn't able to find anything. Anyone here can help?

How to enable remote access to Master's proxy - "Failed connect to <ip>:8080; Connection refused"

I am playing with Kubernetes on https://labs.play-with-k8s.com.
I tried to use the kubectl proxy following the instructions in Kubernete's website.
On the Master node (192.168.0.13) I ran: kubectl proxy --port=8080:
[node1 ~]$ kubectl proxy --port=8080
Starting to serve on 127.0.0.1:8080
On the Worker node I ran curl -v http://192.168.0.13:8080 and it failed:
[node2 ~]$ curl -v http://192.168.0.13:8080
* About to connect() to 192.168.0.13 port 8080 (#0)
* Trying 192.168.0.13...
* Connection refused
* Failed connect to 192.168.0.13:8080; Connection refused
* Closing connection 0
curl: (7) Failed connect to 192.168.0.13:8080; Connection refused
Any idea why the connection is refused ?
Starting to serve on 127.0.0.1:8080
As shown in the message it emits on startup, that is because kubectl proxy only listens on localhost (i.e. 127.0.0.1), unless you instruct it otherwise:
kubectl proxy --address=0.0.0.0 --accept-hosts='.*'
and that --accept-hosts business is a regular expression for hosts (presumably Referer headers? DNS lookups?) from which kubectl will accept connections, and .* is a regex that matches every string including the empty ones.

socks 5 danted proxy server on centos 7 not open any site

I have a VPS with Centos 7 os
I have installed danted script
wget --no-check-certificate https://raw.github.com/Lozy/danted/master/install.sh -O install.sh
bash install.sh
source : https://github.com/Lozy/danted
but when I test it by proxifier.
[23:14] Starting: Test 1: Connection to the Proxy Server
[23:14] IP Address: 95.216.149.37
[23:14] Connection established
[23:14] Test passed.
[23:14] Starting: Test 2: Connection through the Proxy Server
[23:49] Error : connection to the proxy server was closed unexpectedly.
Please make sure that the proxy server protocol and address are correct.
[23:49] Test failed.
[23:49] Testing Finished.
test step 2 failed
i have done every thing but nothing come to my mind to fix it.
ip: 95.216.149.37 port : 443 user: moh pass: Setaya12

Resources