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

Can't get streaming pod events log in jenkins console

    Details

    • Similar Issues:

      Description

      as kubernetes release description.  there is new feature which can show pod event log in jenkins console. but it doesn't work.

      I configured role in our k8s

      apiVersion: rbac.authorization.k8s.io/v1
      kind: Role
      metadata:
        annotations:
          kubectl.kubernetes.io/last-applied-configuration: |
            {"apiVersion":"rbac.authorization.k8s.io/v1beta1","kind":"Role","metadata":{"annotations":{},"name":"jenkins","namespace":"default"},"rules":[ ...{"apiGroups":[""],"resources":["events"],"verbs":["watch"]}]}
        creationTimestamp: "2019-09-03T03:35:11Z"
        name: jenkins
        namespace: default
        resourceVersion: "80735737"
        selfLink: /apis/rbac.authorization.k8s.io/v1/namespaces/default/roles/jenkins
        uid: d5649bf7-cdfb-11e9-9710-0eb0549a2882
      rules:
      ...
      - apiGroups:
        - ""
        resources:
        - events
        verbs:
        - watch
      

      and get kubernetes log

      May 29, 2020 3:51:23 AM FINE org.csanchez.jenkins.plugins.kubernetes.KubernetesCloudMay 29, 2020 3:51:13 AM FINE org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncherCreating Pod: default/disoh-nodejs-example-20200529035056163-08fz9-81hvxMay 29, 2020 3:51:13 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launchCreated Pod: default/disoh-nodejs-example-20200529035056163-08fz9-81hvxMay 29, 2020 3:51:13 AM FINEST org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcher[ADDED] disoh-nodejs-example-20200529035056163-08fz9-81hvxMay 29, 2020 3:51:13 AM FINEST org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcherIn provisioning : [disoh-nodejs-example-20200529035056163-08fz9-81hvx]May 29, 2020 3:51:23 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provisionExcess workload after pending Kubernetes agents: 0May 29, 2020 3:51:23 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud provisionTemplate for label disoh-nodejs-example-20200529035056163: disoh-nodejs-example-20200529035056163-08fz9May 29, 2020 3:51:23 AM FINEST org.csanchez.jenkins.plugins.kubernetes.KubernetesCloudPlanned Kubernetes agents for template "disoh-nodejs-example-20200529035056163-08fz9": 0May 29, 2020 3:51:27 AM FINEST org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcher[MODIFIED] disoh-nodejs-example-20200529035056163-08fz9-81hvxMay 29, 2020 3:51:27 AM FINE org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcherAll containers are running for pod disoh-nodejs-example-20200529035056163-08fz9-81hvxMay 29, 2020 3:51:27 AM FINE org.csanchez.jenkins.plugins.kubernetes.TaskListenerEventWatcherTaskListenerEventWatcher onClose: disoh-nodejs-example-20200529035056163-08fz9-81hvxMay 29, 2020 3:51:27 AM INFO org.csanchez.jenkins.plugins.kubernetes.KubernetesLauncher launchPod is running: default/disoh-nodejs-example-20200529035056163-08fz9-81hvx
      
      

      Could you please have a check what is missing?

       

        Attachments

          Activity

          Hide
          jackyou jack you added a comment -

          Can someone experts have a check?  this is great feature for users I think.  but it doesn't work.

          Show
          jackyou jack you added a comment - Can someone experts have a check?  this is great feature for users I think.  but it doesn't work.
          Hide
          jackyou jack you added a comment -

          following I find kubernetes log.  I think TaskListenerEventWatcher  should print some log to jenkins console, right? but here, seems AllContainersRunningPodWatcher finish , it force close all watcher.

          Jun 23, 2020 1:24:02 AM FINEST org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcher
          [MODIFIED] k8s-build-git-lfs-43ad5dac-1629-429e-a891-6a90861b8ca1-jc-n65xc
          Jun 23, 2020 1:24:02 AM FINE org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcher
          All containers are running for pod k8s-build-git-lfs-43ad5dac-1629-429e-a891-6a90861b8ca1-jc-n65xc
          Jun 23, 2020 1:24:02 AM FINE io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager close
          Force closing the watch io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager@1d1d3177
          Jun 23, 2020 1:24:02 AM FINE org.csanchez.jenkins.plugins.kubernetes.TaskListenerEventWatcher
          TaskListenerEventWatcher onClose: k8s-build-git-lfs-43ad5dac-1629-429e-a891-6a90861b8ca1-jc-n65xc
          Jun 23, 2020 1:24:02 AM FINE io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager closeWebSocketClosing websocket okhttp3.internal.ws.RealWebSocket@6819a826
          
          
          Show
          jackyou jack you added a comment - following I find kubernetes log.  I think TaskListenerEventWatcher  should print some log to jenkins console, right? but here, seems AllContainersRunningPodWatcher finish , it force close all watcher. Jun 23, 2020 1:24:02 AM FINEST org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcher [MODIFIED] k8s-build-git-lfs-43ad5dac-1629-429e-a891-6a90861b8ca1-jc-n65xc Jun 23, 2020 1:24:02 AM FINE org.csanchez.jenkins.plugins.kubernetes.AllContainersRunningPodWatcher All containers are running for pod k8s-build-git-lfs-43ad5dac-1629-429e-a891-6a90861b8ca1-jc-n65xc Jun 23, 2020 1:24:02 AM FINE io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager close Force closing the watch io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager@1d1d3177 Jun 23, 2020 1:24:02 AM FINE org.csanchez.jenkins.plugins.kubernetes.TaskListenerEventWatcher TaskListenerEventWatcher onClose: k8s-build-git-lfs-43ad5dac-1629-429e-a891-6a90861b8ca1-jc-n65xc Jun 23, 2020 1:24:02 AM FINE io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager closeWebSocketClosing websocket okhttp3.internal.ws.RealWebSocket@6819a826

            People

            • Assignee:
              Unassigned
              Reporter:
              jackyou jack you
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: