I get such an error:
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘localhost’, port=4444): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x7fbfa6327280>: Failed to establish a new connection: [Errno 111] Connection refused’))
The post is not formatted properly, which makes it hard to read. Please format it according this post: How to format your forum posts
Why would you expect the test_ui service to reach the application of the selenoid service using localhost?
Localhost of a container is not the same localhost of the host or any other container.
Please do not use network_mode: bridge, as it will put all containers into the default docker bridge network (not to confuse with a default network docker compose creates for this project). The default docker bridge network does not support dns-based service discovery. Remove this setting for all declared service and let the containers use the default network docker compose creates for you, as it provides service discovery.
Then use the service name of the target service to communicate with it:
Instead of HTTPConnectionPool(host=‘localhost’, port=4444), it must be HTTPConnectionPool(host=‘selenoid’, port=4444).
Please read the beginning of @meyay’s post and the topic that he linked.
About the eror message: What does the “status” mean? if the status is an HTTP status, you should see log messages in the selenoid container. HTTP 500 is internal server error.