Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.8.1 - Grid] - javax.management.InstanceAlreadyExistsException when re-registering a node #5186

Closed
EugeneS30 opened this issue Dec 7, 2017 · 3 comments
Labels

Comments

@EugeneS30
Copy link

Meta -

OS:
Windows 7
Selenium Version:
3.8.1
Browser:
NA
Browser Version:
NA

Expected Behavior -

When a node goes down and then up again, it should print relevant information in log. For example:

When node registers for the first time:
10:22:21.591 INFO - Registered a node http://xx.xx.xx.xx:5555

Then if the node goes down:
13:27:19.249 INFO - Marking the node http://xx.xx.xx.xx:5555 as down: cannot reach the node for 2 tries

And when the node starts up again:

13:27:29.213 INFO - Registered a node http://xx.xx.xx.xx:5555
13:27:29.213 WARN - Cleaning up stale test sessions on the unregistered node http://xx.xx.xx.xx:5555

Actual Behavior -

At the moment when a node goes down and comes up again, there is the following exception printed out in hub log:

javax.management.InstanceAlreadyExistsException: org.seleniumhq.grid:type=RemoteProxy,node="http://10.25.67.96:5556"
        at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:522)
        at org.openqa.selenium.remote.server.jmx.JMXHelper.register(JMXHelper.java:31)
        at org.openqa.grid.selenium.proxy.DefaultRemoteProxy.<init>(DefaultRemoteProxy.java:74)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at org.openqa.grid.internal.BaseRemoteProxy.getNewInstance(BaseRemoteProxy.java:366)
        at org.openqa.grid.web.servlet.RegistrationServlet.process(RegistrationServlet.java:104)
        at org.openqa.grid.web.servlet.RegistrationServlet.doPost(RegistrationServlet.java:71)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:841)
        at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:535)
        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
        at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
        at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
        at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)
        at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)
        at org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
        at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
        at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.seleniumhq.jetty9.server.Server.handle(Server.java:561)
        at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:334)
        at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:251)
        at org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
        at org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:104)
        at org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
        at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
        at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
        at org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
        at org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
        at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
        at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
        at java.lang.Thread.run(Thread.java:745)

Steps to reproduce -

  1. Start Selenium Hub 3.8.1
  2. Start Selenium Node 3.8.1
  3. Make sure the node is successfully bound to the hub (see the hub.error.log)
  4. Stop Selenium node
  5. Wait until node marked is down by Selenium server (see the hub.error.log)
  6. Start the node again
  7. Find the above mentioned exception printed out in hub log.
@p0deje p0deje added the C-grid label Dec 7, 2017
@fbarletta
Copy link

@barancev - Is there a reason this was closed? I am also having this issue.

@barancev
Copy link
Member

barancev commented Apr 8, 2018

This issue was fixed by commit c067d6b, the fix was released in version 3.9.0

@fbarletta
Copy link

fbarletta commented Apr 8, 2018 via email

@lock lock bot locked and limited conversation to collaborators Aug 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants