TestProject Forum

Failed to open development socket while trying to use TP_MAX_WORKERS

I am pretty impressed with the new release, TestProject X.
GitHub integration and parallel agent worker capability are awesome.
And here I have a question regarding parallel agent worker configuration.

If I set TP_MAX_WORKERS as “4”, and I just left the previous setting TP_SDK_PORT as “8686” as it is.
And I met below error logs:

2021-06-30 01:13:36.118 [ERROR] i.t.a.m.b.a Failed to open development socket
java.net.BindException: Address in use
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:469)
at java.base/sun.nio.ch.Net.bind(Net.java:458)
at java.base/sun.nio.ch.NioSocketImpl.bind(NioSocketImpl.java:643)
at java.base/java.net.ServerSocket.bind(ServerSocket.java:361)
at java.base/java.net.ServerSocket.<init>(ServerSocket.java:247)
at java.base/java.net.ServerSocket.<init>(ServerSocket.java:138)
at io.testproject.agent.managers.b.a.a(TestProjectAgent:593)
at io.testproject.agent.managers.b.a.a(TestProjectAgent:334)
at io.testproject.agent.fsm.local.a.a.a(TestProjectAgent:232)
at io.testproject.agent.fsm.local.a.b.a(TestProjectAgent:102)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at io.testproject.agent.c.d.run(TestProjectAgent:33)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:830)

2021-06-30 01:13:36.119 [ERROR] i.t.a.f.l.a.a Failed to activate Developing state
io.testproject.java.exceptions.AppException: Failed to open a development socket on port 8686

When I tried with a single worker, it does not have any problems.
So I could assume that if I use TP_MAX_WORKERS then should I set TP_SDK_PORT within a certain range values?

Oh, I have tested with the below environment:

  • TestProject Agent Version: 3.0.4
  • Docker-compose with selenium-hub
  • Used pytest and pytest-xdist for the parallel execution

Thanks for your attention and help.

Jay Lee

Currently parallel execution for openSDK is not supported,
It’s on our roadmap. we will notify you once this feature has been added.

Thanks for your quick response. It was quite helpful.
I wish that parallel execution for openSDK could be supported very soon.
Please help me to close this ticket.