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

Monitoring TimeoutException using remoting websocket

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • remoting
    • None
    • Jenkins 2.226 running in Kubernetes

      When using new websocket remoting capability, we are seeing following error in node log after node is successfuly connected:

      Inbound agent connected from 192.168.0.207 Remoting version: 4.0.1 This is a Unix agent ERROR: Failed to monitor for Free Temp Space java.util.concurrent.TimeoutException at hudson.remoting.Request$1.get(Request.java:316) at hudson.remoting.Request$1.get(Request.java:240) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitorDetailed(AbstractAsyncNodeMonitorDescriptor.java:114) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:78) at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:306) ERROR: Failed to monitor for Free Disk Space java.util.concurrent.TimeoutException at hudson.remoting.Request$1.get(Request.java:316) at hudson.remoting.Request$1.get(Request.java:240) at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitorDetailed(AbstractAsyncNodeMonitorDescriptor.java:114) at hudson.node_monitors.AbstractAsyncNodeMonitorDescriptor.monitor(AbstractAsyncNodeMonitorDescriptor.java:78) at hudson.node_monitors.AbstractNodeMonitorDescriptor$Record.run(AbstractNodeMonitorDescriptor.java:306)

       

      Our setup is nginx proxy with OAuth2 and allowed locations without authentication:

      {{ location ~ (/jnlpJars/.*)$ {}}
        proxy_pass http://localhost:8080$1;
        access_by_lua return;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_max_temp_file_size 0;
      {{ }}}
      {{ location ~ (/generic-webhook-trigger/?)$ {}}
        proxy_pass http://localhost:8080$1;
        access_by_lua return;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_max_temp_file_size 0;
      {{ }}}
      {{ location ~ (/wsagents/.*)$ {}}
        proxy_pass http://localhost:8080$1;
        access_by_lua return;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_max_temp_file_size 0;
      {{ }}}
      {{ location ~ (/wsecho/?)$ {}}
        proxy_pass http://localhost:8080$1;
        access_by_lua return;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_max_temp_file_size 0;
      {{ }}}

       

      our jenkins-slave.jnlp:

      <jnlp codebase="https://ourjenkins.tld/computer/blr-jenkins-slave-01/" spec="1.0+"><information><title>Agent for blr-jenkins-slave-01</title><vendor>Jenkins project</vendor><homepage href="https://jenkins-ci.org/"></homepage></information><security><all-permissions></all-permissions></security><resources><j2se version="1.8+"></j2se><jar href="https://ourjenkins.tld/jnlpJars/remoting.jar"></jar></resources><application-desc main-class="hudson.remoting.jnlp.Main"><argument>oursecretkey</argument><argument>jenkins-slave-01</argument><argument>-webSocket</argument><argument>-workDir</argument><argument>/var/lib/jenkins</argument><argument>-internalDir</argument><argument>remoting</argument><argument>-url</argument><argument>https://ourjenkins.tld/</argument></application-desc></jnlp>

            Unassigned Unassigned
            genunix Filip Pytloun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: