Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52509

WARNING: Attempt to (de-)serialize anonymous class hudson.plugins.selenium.PluginImpl$1

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: selenium-plugin
    • Environment:
    • Similar Issues:

      Description

      Using the selenium plugin on jenkins to kick off a selenium hub on my machine, I created a  selenium node on a remote machine and registered with the hub. This was successful and the Selenium console  and web console confirm this.  If I  then try to run A Fitnesse test using the grid I get a "Connection Refused" exception:

      ---------- exception -----

      java.net.ConnectException: Connection refused (Connection refused)
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
      at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
      at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
      at java.net.Socket.connect(Socket.java:589)
      at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
      at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
      at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
      at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
      at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
      at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
      at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
      at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
      at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
      at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
      at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:138)
      at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:86)
      at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101)
      at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
      at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
      at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
      at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:155)
      at com.britebill.qa.selenium.webdriver.Browser.openBrowser(Browser.java:158)

      ---------- exception -----

       

      If I take Jenkins out of the equation and run  selenium hub on my local machine from the command line with the remote selenium node registering as before and run the same Fitnesse test it succeeds

      When running via jenkins, I noticed the following message in the console when I  clicked on "Selenium Grid" from the Jenkins dashboard

      WARNING: Attempt to (de-)serialize anonymous class hudson.plugins.selenium.PluginImpl$1 in file:/Users/johnog/.jenkins/plugins/selenium/WEB-INF/lib/selenium.jar; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/

      I am unsure if this warning is significant but would  be interested if this was a known issue

        Attachments

          Activity

          Hide
          jsoref Josh Soref added a comment -

          Fwiw, the warning and the error aren't related. I've tried to fix some instances of the warning. You're welcome to have bugs for both (personally, if I were you, I'd be more interested in the error than the warning...).

          From an IT/Ops perspective, I'd hope there's more logging to report: the url/host/port/ip that was failing... (and if not, I'd want it added...)

          Show
          jsoref Josh Soref added a comment - Fwiw, the warning and the error aren't related. I've tried to fix some instances of the warning. You're welcome to have bugs for both (personally, if I were you, I'd be more interested in the error than the warning...). From an IT/Ops perspective, I'd hope there's more logging to report: the url/host/port/ip that was failing... (and if not, I'd want it added...)
          Hide
          mobrockers Rouke Broersma added a comment -

          The first thing I would recommend is if the selenium hub is reachable on the configured url and port, as on first glance it seems to me like the port you are using is simply not accessible from the location at which you run the tests.

          Show
          mobrockers Rouke Broersma added a comment - The first thing I would recommend is if the selenium hub is reachable on the configured url and port, as on first glance it seems to me like the port you are using is simply not accessible from the location at which you run the tests.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          https://github.com/jenkinsci/selenium-plugin/blob/master/src/main/java/hudson/plugins/selenium/PluginImpl.java#L328 . It sounds like an issue to be fixed IMHO. It's a really bad idea to serialize Plugin class instances over the channel

          Show
          oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/selenium-plugin/blob/master/src/main/java/hudson/plugins/selenium/PluginImpl.java#L328  . It sounds like an issue to be fixed IMHO. It's a really bad idea to serialize Plugin class instances over the channel

            People

            • Assignee:
              mobrockers Rouke Broersma
              Reporter:
              leathdub John OGrady
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: