Teamcity - Selenium Grid environment - Unable to connect to the remote server - selenium

I am running a small selenium project using grid setup. All is fine when I run locally which has the hub and the node running in the same machine. What I did next was kept the hub running in my local machine and tried running the test through teamcity. I presume that the test will run in one of the build agents. When I kick start the build job, I got the following exception. Not sure what the issue is.
Test(s) failed. System.Net.WebException : Unable to connect to the remote server ---->
System.Net.Sockets.SocketException : A connection attempt failed because the connected
party did not properly respond after a period of time, or established connection failed
because connected host has failed to respond 192.168.6.121:80 at
System.Net.HttpWebRequest.GetResponse()
Also, the team city build agent IP is 192.168.7.132 whereas I am getting a message that it is unable to contact 192.168.6.121
Is there something happening which I am not aware of.
The selenium server is up and running in my local machine. and all is fine at the server end.
Any pointers will be much helpful

Related

Payara server starts for a brief time but doesn't connect

I recently had to reinstall IntelliJ IDEA, and ever since then, I've been unable to run this one app that runs on Payara. I have Payara 5.2022.3 (full) installed and the project is using java 11.
This is the server log:
Artifact my_project-ear:ear exploded: Waiting for server connection to start artifact deployment…
Detected server admin port: 4848
Detected server http port: 8080
And then nothing happens.
And if I terminate the process I get a message:
Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:4848
Based on my observation it seems like a process starts running on port 4848 for a few seconds but then stops abruptly.
I checked the CrashDumps and here is the .dpm file in question.
https://drive.google.com/file/d/1AyLU2HOyXKxREjaDNyIU9eRYMnzaBspw/view?usp=sharing
I'd already tried:
Running it on a different port./ Checking if there was not a process blocking used ports.
"Renewing" the domain.xml in case it was corrupted somehow.
Using different JDK.
Reinstalling Windows
I'm positive there is no problem with the app's code (seen a friend run it on his computer today) and I also think no changes happened to the run/debug configuration or the payara and domain configuration ever since it was working before the IDEA reinstall.
(I'm also very new to payara, and software development in general, so I'm not quite as skilled in solving this kind of problem.)
Thank you for all your answers.
It looks like a bug in the Java version/vendor you are using which is causing the crash of the process. Updating to a more recent Java build or to a different JVM vendor should help.

Azure Container Instance Can't Connect to Internet (outbound http GET request failed)

I have an Azure Container Instance created from the base image microsoft/windowsservercore:ltsc2016. The image has mercurial installed and checks out a private repo using hg clone but fails with the result abort: error: getaddrinfo failed. When run on my workstation using Docker for Windows, the container successfully checks out the repo.
I believe this is a network connectivity issue, because if I run powershell Invoke-WebRequest http://microsoft.com the container also logs an error that the request could not be completed due to failure to connect to the server.
The Windows container on ACI has a known issue about the out-bound network. It is suggested to add a retry logic on any network request or add a 30 seconds' delay before you start your application.
https://learn.microsoft.com/en-us/azure/container-instances/container-instances-troubleshooting#windows-containers-slow-network-readiness
The issue only impacts the Windows Server 2016. It is fixed in Windows Server 2019. Once ACI adapts WS2019, the workaround will be no longer needed.

Starting phantomjs node on Selenium grid on a external machine

I am trying to start a phantomjs node on a virtual machine to connect to my own computer which hosts the hub. I have gotten a generic node set up externally (5 instances of firefox, chrome and one instance of IE). When I try and set up a phantomjs node however, it registers fine from the command prompt, but when I go to the grid console, the following message is displayed:
DefaultRemoteProxy unknown version,Connect to failed: [myIp] Connection refused: connect
Does anyone have any experience with this?
Connection refused when phantomjs is run on different machine than selenium hub
Referenced this question... Basically had to add the IP of my node machine to the --webdriver param in the command line...

Problems while running an web application on Cloudbees

I am trying to access one service from the application which I deployed on cloudbees but I receive 500 error and a big stacktrace. It fails because it cannot open the JPA EntityManager due to CommunicationsException: Communications link failure due to underlying exception: ... java.net.SocketException: java.net.ConnectException: Connection refused .
The database configuration seems fine because tests on Jenkins successfully connect to the DB from cloudbees and insert data.
If I do a deploy on localhost (and using the local mysql) all services work fine.
Can anyone suggest what might be the problem?
Thanks
Fixed without additional configuration - just a new deploy.

Selenium Grid Error

Has anyone seen this error in CentOS, when running Selenium Grid:
SEVERE: Could not find any remote control providing the '*chrome' environment. Please make sure you started some remote controls which registered as offering this environment.
thanks!
I take it you started the hub but didn't start any nodes? You must start a node so it can run the RC Server needed to handle your client request.