I've installed docker and i've created container with port expose 8080:80 and tried to connect via browser to web server and I've noticed something strange, on IE the connection is working like a charm towards web server but on Chrome doesn't work, why is that?
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
46a1e9019c36 ubuntu:latest "/bin/bash" About a minute ago Up About a minute 0.0.0.0:8080->80/tcp apache_server_1
From other servers I can connect to webserver via port 8080.
wget 10.xxx.xx.144:8080
--2018-06-04 22:49:16-- http://10.xxx.xx.144:8080/
Connecting to 10.xxx.xx.144:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10918 (11K) [text/html]
Saving to: `index.html'
100%[==============================================================================================================================>] 10,918 --.-K/s in 0s
2018-06-04 22:49:16 (521 MB/s) - `index.html' saved [10918/10918]
Try clear the browser history in chrome and access . Check for any proxy configuration between IE and chrome
Related
I have a Digital Ocean droplet running two Docker containers, one that is a Vue3 app which I'm having issues with, and a Django server that I'm not having issues with.
vue-cli-service serve --mode production --host 0.0.0.0 --public http://XXX.YYY.ZZZ.XXX:8080
If I go in Chrome and type www.websitename.com
This site can’t be reached websitename.com refused to connect.
If I go in Chrome and directly type the IP and the port I can see the website load. Is this a DNS resolution issue? I really don't think so, here's why:
If I go in Chrome and type http://websitename.com:8000/admin
I see a Django administration site. This means that I have no problem with Django, only with Vue3.
I tried setting --host 0.0.0.0, I tried adding --public with the website name and with the IP directly.
Also nmap seems to show everything working fine
nmap -F websitename.com <---- No issue with DNS resolution
Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-26 20:14 PDT
Nmap scan report for XXX.YYYY.ZZZ.XXX <---- Correct IP
Host is up (0.090s latency).
Not shown: 92 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp filtered smtp
111/tcp filtered rpcbind
135/tcp filtered msrpc
139/tcp filtered netbios-ssn
445/tcp filtered microsoft-ds
8000/tcp open http-alt <---- Django
8080/tcp open http-proxy <---- Vue3
If you do not provide a port in Chrome - it will default to port 80. But your Vue3 Docker is running on port 8080. Therefore you have to either provide this port when you type the URL in Chrome - or you must run your Docker on port 80.
You are providing port 8000 for the Django administration site - do the same (with port 8080) for your Vue3 application.
I'm running the Selenium on Kubernetes, behind the Ingress-Nginx controller.
One thing I noticed is when I try to see the live VNC through the Selenium Grid web, the browser keeps trying to connect the 4444 port of the Selenium grid server for the WebSocket connection.
Is there a way to make it point the 80 port instead?
I already tried to switch the port number for the Selenium router to 80 (SE_ROUTER_PORT to 80), but apparently, the WebSocket is still not working.
This is what I'm seeing on the browser console:
I already confirmed the functionality itself with the kube-proxy localhost proxying.
Thank you very much.
I have a functional app running in a docker on port 3000. I have selenium tests that works when I set my host to http://localhost:3000. I created a container to launch the selenium tests and it fails with the following error:
WebDriverError:Reachederrorpage:about:neterror?e=nssFailure2&u=https://app:3000/&c=UTF-8&f=regular&d=An error occurred during a connection to app:3000.
SSL received a record that exceeded the maximum permissible length.
Error code: <a id="errorCode" title="SSL_ERROR_RX_RECORD_TOO_LONG">SSL_ERROR_RX_RECORD_TOO_LONG</a>
Snippet of my docker-compose.yml
app:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- ./:/usr/src/app/
ports:
- "3000:3000"
- "3001:3001"
networks:
tests:
selenium-tester:
build:
context: .
dockerfile: Dockerfile.selenium.tests
volumes:
- ./:/usr/src/app/
- /dev/shm:/dev/shm
depends_on:
- app
networks:
tests:
I replaced the host by http://app:3000 but firefox seems to want to redirect this http to https (which is not working). And finally I build my driver like this:
const ffoptions = new firefox.Options()
.headless()
.setPreference('browser.urlbar.autoFill', 'false'); // test to disable auto https redirect… not working obviously
const driver = Builder()
.setFirefoxOptions(ffoptions)
.forBrowser('firefox')
.build();
When manually contacting the http://app:3000 using curl inside the selenium-tester container it works as expected, I get my homepage.
I'm short on ideas now and even decomposing my problem to write this question didn't get me new ones
I had exactly the same problem - couldn't successfully make request on HTTP to app from Selenium-controlled browsers (Chrome or Firefox) in other Docker container on same network. cURL from that container though worked fine! Connect on HTTP, but something seemed to be trying to force HTTPS. Identical situation right down to the name of the container "app".
The answer is... it's the name of the container!
"app" is a top level domain on the HSTS preloaded list - that is, browsers will force access through HTTPS.
Fix is to use a container name that isn't on HSTS preloaded lists.
HSTS - more reading
As you mentioned manually contacting the http://app:3000 using curl inside the selenium-tester container it works as expected
This error message...
WebDriverError:Reachederrorpage:about:neterror?e=nssFailure2&u=https://app:3000/&c=UTF-8&f=regular&d=An error occurred during a connection to app:3000.
SSL received a record that exceeded the maximum permissible length.
Error code: <a id="errorCode" title="SSL_ERROR_RX_RECORD_TOO_LONG">SSL_ERROR_RX_RECORD_TOO_LONG</a>
...implies that SSL layer in curl or one of its dependencies seems broken.
#RussellFulton in this discussion mentioned:
This seems to be the result you see from Firefox when the server is not configured properly for SSL. Possibly Chrome would have just gave a generic ssl failed error.
This can happen when the browser sends a SSL handshake when the server is expecting an HTTP request. Server responds with a 400 code and an error message that is much bigger that the handshake message that the browser expects. Hence you see the message.
Reasons and Solution
When the error prone code tries to redirect to HTTPS on port 80 (port 3000 in your case).
Solution: Removing the port 80 (port 3000 in your case) from the url, the redirect works.
HTTPS by default runs over port 443.
This error also occurs when you have enabled the SSL module.
Solution: You have run a2enmod ssl.
a2enmod ssl
//or
a2ensite default-ssl
Provided a wrong IP in the ssl config.
Solution: Changed IP to what it should be.
Remove the IP if not needed in the ssl config.
Solution: Change
VirtualHost your.domain.com:443
//to
VirtualHost default:443
curl: (35) SSL received a record that exceeded the maximum permissible length. issue was discussed at length.
As per Curl Support HTTPS proxy and SOCKS+HTTP(s) there was another attempt to get the HTTPS proxy support into Curl.
This curl commit should have addressed your issue.
I am trying to install Attunity Replicate into a local virtual machine with CentOS 7 on it. I can see that it is running - using 'ps -ef | grep repctl', and I know that the 3552 port is open in the firewall, and the host is visible (using 'nc -zv 3552').
But I cannot connect my UI browser to Attunity server using 'https://:/AttunityReplicate' - the Safari answers that 'Safari can't open the page XXX becauseSafari cannot establish a secure connection to the server...', and Chrome answers with 'ERR_SSL_SERVER_CERT_BAD_FORMAT' error...
Any hints - what and where should I configure in the Attunity Server to resolve the security issue, please?
Kind regards,
Alex
On the Linux server where you installed Replicate Express, cd into /opt/Attunity/replicate/bin (this is the default location) and run the following command:
cd /opt/attunity/replicate/bin
source arep_login.sh
./repctl SETSERVERPASSWORD
./arep.ctl stop
./arep.ctl start
Ensure that your Linux server allows inbound TCP connections on port 3552
Open your browser and try to connect to the following URL: https://:3552/attunityreplicate replacing with the DNS name or IP address of the Linux Server where Replicate is installed.
When prompted, enter the Username: Admin and Password from Step 1.
You may have to allow the webpage on Chrome:
1- On your computer, open Chrome.
2- On the page where you see a warning, click Details.
3- Click Visit this unsafe site.
4- The page will load.
Reference: https://support.google.com/chrome/answer/99020?co=GENIE.Platform%3DDesktop&hl=en
I have created below setup in Jmeter to run recorded test cases.
Added Thread Group to test plan.
Added HTTP Request Defaults to thread group (in path section i have given url as 'http://localhost:8044')
note: 'http://localhost:8044' is the url which i want to launch on firefox.
Added Recording controller to thread group
In workbench
Added HTTP(S) Test Script Recorder (In port section i have given 8080 as port no)
Now when I recorded test cases and played the test plan- test samples are failing with the following error.
Error:
Response code: Non HTTP response code: java.net.ConnectException
Response message: Non HTTP response message: Connection timed out: connect
Running this setup in virtual machine.I have tried with some other ports like 7070,8055,8044 but still getting same error.
Not sure where the issue is. Can any one please help me on this.
You have to setup the proxy in the browser also with same port that you mentioned in Test Script Recorder
8044 port - is in which server is listening (HTTP Sampler port)
8080 port - is in which proxy server is listening (Test Script Recorder port)
Both are different. we need to configure proxy server port (which we specified in Test Script Recorder) in the browser setting also.
Note: If 8080 is already taken by some other process in your machine, try different port.
Setting up proxy in Firefox:
Options -> Advanced -> Network tab -> Settings button related to Connection -> enter port in Manual Proxy Configuration).
Follow the steps mentioned here:
https://jmeter.apache.org/usermanual/jmeter_proxy_step_by_step.pdf
Add Thread Group to test plan.
Add Transaction controller to thread group
Add HTTP(S)Test Script Recorder to workbench
In HTTP(S)Test Script Recorder set global setting port to 8080,in target controller select the transaction controller in which you want to record the test click on start button before clicking start button you have to set proxy to record the script to do that go to firefox-option-Advanced-Network-Connection click on setting- select manual proxy config-in HTTP proxy give localhost and port 8080 and check the use this proxy server for all protocols .
This works for me.Check if 8080 port used by another process to do so in cmd type netstat -an
The issue is resolved. Recording was not happening because of this.
Firefox default setting will bypass "localhost, 127.0.0.1" from proxy so your JMeter still not able to record it. You have to empty the "No Proxy for" field, by removing the "localhost, 127.0.0.1". Hope this will help.
I removed localhost, 127.0.0.1 from the no proxy field in firefox.
Got the fix from the link https://stackoverflow.com/a/37776363/4715839
Thanks all for sharing your comments.