Selenium jobs getting stuck with only local connection allowed message

I am using Java spring with cucumber and run my automation test using selenium images for both firefox and chrome on circle ci 2.0, when I run automation jobs it get stuck randomly with Only local connection allowed message .
I am using selenium standalone version 3.3.1 for both brosers

had any one face same issue?

Thanks