精华内容
下载资源
问答
  • jstack dump的线程有一半的线程都在waiting on condition,而且都是一些tomcat的线程池之类的问题线程栈如下: ![图片说明](https://img-ask.csdn.net/upload/201904/19/1555638646_167074.png) 53%的线程都是...
  • 请教一下 JStack中的wait on condition是什么意思? 我发现,某个线程在jstack中被标识为“wait on condition”时, 下面的线程状态,有时候是:“RUNNABLE”,也有的时候是:“TIMED_WAITING” 至于其他状态,...
  • Error: timed out waiting for the condition 查看 kubectl get pod --all-namespaces lynx@n149-136-019:/root$ kubectl get pod --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE jhub hook-image-...

    背景

    helm 安装jhub时超时

    lynx@n149-136-019:~/magellan_docker/magellan_k8s/k8s_dev/k8s_jhub$ helm upgrade --install jhub jupyterhub/jupyterhub \
    >   --namespace jhub  \
    >   --version=0.9.0 \
    >   --values k8s_config.yaml
    Release "jhub" does not exist. Installing it now.
    Error: timed out waiting for the condition
    

    查看

    kubectl get pod --all-namespaces

    lynx@n149-136-019:/root$ kubectl get pod --all-namespaces
    NAMESPACE              NAME                                         READY   STATUS              RESTARTS   AGE
    jhub                   hook-image-awaiter-nxf8v                     1/1     Running             0          5m43s
    jhub                   hook-image-puller-5ljjj                      0/1     Init:0/2            0          5m51s
    jhub                   hook-image-puller-j95bf                      0/1     Init:0/2            0          5m51s
    jhub                   hook-image-puller-nblf5                      0/1     Init:0/2            0          5m51s
    jhub                   hook-image-puller-wk2vp                      1/1     Running             0          5m51s
    kube-system            coredns-66bff467f8-kx4ck                     1/1     Running             0          117m
    kube-system            coredns-66bff467f8-v9wcb                     1/1     Running             0          117m
    kube-system            etcd-n149-136-019                            1/1     Running             0          117m
    kube-system            kube-apiserver-n149-136-019                  1/1     Running             0          117m
    kube-system            kube-controller-manager-n149-136-019         1/1     Running             0          117m
    kube-system            kube-flannel-ds-4dsqt                        1/1     Running             0          79m
    kube-system            kube-flannel-ds-5g2p5                        1/1     Running             0          102m
    kube-system            kube-flannel-ds-6ldvm                        1/1     Running             0          80m
    kube-system            kube-flannel-ds-9ssh9                        1/1     Running             0          78m
    kube-system            kube-flannel-ds-sxhxd                        1/1     Running             0          81m
    kube-system            kube-proxy-6nhc8                             0/1     ImagePullBackOff    0          79m
    kube-system            kube-proxy-8nqfc                             0/1     ImagePullBackOff    0          81m
    kube-system            kube-proxy-l55gh                             0/1     ImagePullBackOff    0          78m
    kube-system            kube-proxy-m27q7                             0/1     ImagePullBackOff    0          80m
    kube-system            kube-proxy-qq899                             1/1     Running             0          117m
    kube-system            kube-scheduler-n149-136-019                  1/1     Running             0          117m
    kube-system            tiller-deploy-5d58456765-dpkbm               1/1     Running             0          16m
    kubernetes-dashboard   dashboard-metrics-scraper-6b4884c9d5-nspnm   1/1     Running             0          78m
    kubernetes-dashboard   kubernetes-dashboard-7b544877d5-tzdxg        0/1     ContainerCreating   0          78m
    

    定位错误

    在这里插入图片描述

    • 查看日志

    kubectl describe pod hook-image-puller-5ljjj -n jhub

    Events:
      Type     Reason                  Age                     From               Message
      ----     ------                  ----                    ----               -------
      Normal   Scheduled               6m59s                   default-scheduler  Successfully assigned jhub/hook-image-puller-5ljjj to n130-072-042
      Warning  FailedCreatePodSandBox  6m56s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "2bf2fb6f9344934744ee9c87465ca210278af14eb26d433043eca0822cfb92de" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m53s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "7d161f41f7829e44140cacd8faf6f857fa48d31a3db14607a1c0e40748eaf30c" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m51s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "c820f8456ce718645d757cff8092cab3ee0b44f36b2f05450a40f41b43e41221" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m49s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "21d1ac2870454f2ffdb1c1dc838753c32af41e53989cf45c48612eca714aa589" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m46s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "be549b17fcec87e6861ed0b1e36e6642c6f2f66addfa96d3d8ddee56c47fe36a" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m44s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "365d8545d30979b1c3cc27518873fbfe403395f39c0d26cf07c3ae234eb921ec" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m42s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "47f79483aebfa9a86355841d98951c1fed0e882f6b403169066ca657a58e0af5" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m40s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "7e65c5ff153c2bda95db271fae704660e49a9700b366d684a986da101aa81e8f" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Warning  FailedCreatePodSandBox  6m38s                   kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "a93392dcc3ea288db5db2d4851076e3bf3378280788f5623919707b0da1e37fc" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
      Normal   SandboxChanged          6m31s (x12 over 6m56s)  kubelet            Pod sandbox changed, it will be killed and re-created.
      Warning  FailedCreatePodSandBox  113s (x120 over 6m36s)  kubelet            (combined from similar events): Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "9c7388a6ce257bed5bb7ad4218e14a53f43a5086978f42878e69746c98667335" network for pod "hook-image-puller-5ljjj": networkPlugin cni failed to set up pod "hook-image-puller-5ljjj_jhub" network: failed to set bridge addr: "cni0" already has an IP address different from 10.244.4.1/24
    

    在这里插入图片描述

    原因

    几个node节点加入了多次
    期间没有没有重启到docker,导致原先的网络与现有的网络冲突

    解决

    ifconfig cni0 down
    ifconfig flannel.1 down
    ifconfig docker0 down
    ip link delete cni0
    ip link delete flannel.1
    
    systemctl restart docker
    
    展开全文
  • 最近发现个问题,不知道是使用不当还是何种...现象,运行一段时间后,Quartz的线程池中9个线程的状态是Waiting on Condition,一个是runnable。整进程的状态貌似停住了,调度时间到了,没有执行高度线程中的代码。...

    最近发现个问题,不知道是使用不当还是何种原因造成的。

    具体内容:

         用Quartz调度任务,周期10分钟。但具体业务执行的时间要大于10分钟。Quartz线程池的配置是缺省,查了一下10个大小。

    现象,运行一段时间后,Quartz的线程池中9个线程的状态是Waiting on Condition,一个是runnable。整进程的状态貌似停住了,调度时间到了,没有执行高度线程中的代码。

       

         怀疑,由于业务操作的时候大于10分钟(调度周期),可能会导致(猜的)Quartz的线程池中的线程还在处理业务,一次调度结束但实际业务操作还在运行(指在调度的线程池中运行),运行一段时间后这样的线程变多,导致无法响应下一次调度。

     

        解决办法,目前设想的是,具体的业务,在另一个线程池中完成而不使用Quartz的线程池做具体业务操作,每一次调度线程只把任务放到具体执行线程池中,就结束。

     

        继续上面说的,把一个实际基于FTP的文件定时扫描发送程序按上述思路调整了下。

     

    调整前:

     

    调度执行内容:

    1.扫述表找到要转发的文件到LIST

    2.遍历LIST,顺序发送文件。

     

    调整后:

     

    调度执行内容:

    1.扫述表找到要转发的文件到LIST

    2.遍历LIST,以每个元素构造转发Thread并提交到线程池。(或者设个最大转发数来控制同时转发的数量)

     

    最后的结论不知道是否正确,业务操作时间较长的话,不要在调试本身的线程池中做。

    展开全文
  • helm upgrade --install xxx . \ --timeout 600s 注意要加上单位s

    helm upgrade --install  xxx . \   
        --timeout 600s
     

    注意要加上单位s

    展开全文
  • 因为改了master 名字,集群起不来,后来删除所有节点,重新部署,删除配置文件,rm /etc/kubernetes/kubelet.conf /...error execution phase kubelet-start: error uploading crisocket: timed out waiting for the c

    因为改了master 名字,集群起不来,后来删除所有节点,重新部署,删除配置文件,rm /etc/kubernetes/kubelet.conf /etc/kubernetes/bootstrap-kubelet.conf /etc/kubernetes/pki/ca.crt -f
    关闭kubelet服务,节点加入集群时报错,
    error execution phase kubelet-start: error uploading crisocket: timed out waiting for the condition

    后来,知道所有节点都要kubeadm reset才可以。
    如何改名而不重新部署还要研究

    展开全文
  • "http-bio-8062-exec-8" #81 daemon prio=5 os_prio=0 tid=0x000000001f873000 nid=0x8d8c waiting on condition [0x0000000032eaa000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park...
  • 深入理解Condition实现原理

    千次阅读 2020-06-08 23:15:03
    本篇文章主要是讲condition实现原理(即等待队里),同步队列实现原理看这篇文章:深入理解AQS实现原理和源码分析。等待队列是由Condition内部实现的,是一个虚拟的FIFO单向队列,在AQS中同步队列、...
  • java condition await() 与object wait()的区别 object wait() * The current thread must own this object's monitor. The thread * releases ownership of this monitor and waits until another thread ....
  • [超级链接:Java并发学习系列-绪论] Lock接口在之前的章节中多次提及,...本章主要通过解读Condition接口的源码注释,来学习Condition接口的各个方法。 1.Condition接口与Lock接口 在Java并发18章节,我们对...
  • getWaitQueueLength(Condition condition); // 查询给定线程是否正在等待获取此锁。 boolean hasQueuedThread(Thread thread); //查询是否有些线程正在等待获取此锁。 boolean hasQueuedThreads(); ...
  • Condition源码分析

    千次阅读 2018-07-20 16:08:54
    Condition接口 概述 condition与Lock的实现类结合使用。 如果Lock替换了synchronized方法和语句的使用,则Condition将替换Object监视方法(wait,notify和notifyAll)的使用。 condition,也称为condition queue...
  • C++11中std::condition_variable的使用

    万次阅读 多人点赞 2017-06-24 23:27:56
    C++11中std::condition_variable的使用
  • * acquire on failure. */ final void lock ( ) { // 先尝试获取,实现非公平 if ( compareAndSetState ( 0 , 1 ) ) setExclusiveOwnerThread ( Thread . currentThread ( ) ) ; else ...
  • Object的wait()和Condition的await() 1、Object的wait() Object类: 1)源码: public final void wait() throws InterruptedException { wait(0); } 2)解释: Object的wait方法,是当前线程调用...
  • WaitForMultipleObjects returns a strangely cooked DWORD value that can have flags meaning error, time out, signaled or abandoned condition, as well as an index into a handle in the array that is pas
  • 报错环境: 10.1.1.10 内网 VisualSVN Server服务器 10.1.1.18 内网 Jenkins服务器 63.1.1.22 阿里云 JenkinsNode服务器,阿里云主机 10.1.1.38 内网(代理;内网出口) Nginx代理服务器 阿里主机作为Je...
  • From:http://www.cs.wustl.edu/~schmidt/win32-cv-1.... Strategies for Implementing POSIX Condition Variables on Win32 Douglas C. Schmidt and Irfan Pyarali Department of Computer Science Washi
  • jstack日志深入理解

    万次阅读 多人点赞 2016-08-06 17:11:36
    在分析线上问题时常使用到jstack ...线程的状态有:new、runnable、running、waiting、timed_waiting、blocked、dead 线程状态变迁图: 各状态说明: New: 当线程对象创建时存在的状态,此时线程不可能执行;
  • "http-nio-8085-exec-11" #119066 daemon prio=5 os_prio=0 tid=0x00007f22c040d000 nid=0xdc413 waiting on condition [0x00007f1f830b7000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe....
  • Java--Lock&Condition的理解

    千次阅读 2018-12-13 16:35:53
    本文为后续介绍AbstractQueuedSynchronizer.ConditionObject做一下铺垫。 Lock&Condition ...Condition用于控制多线程之间的、基于该状态的条件等待。 PS:这里的“同一状态”指的就是...
  •  The caller passes it locked to the function, which then atomically places the calling thread on the list of threads waiting for the condition and unlocks the mutex.  上面的伪代码,一...
  • 1、java.util.concurrent.locks.Condition接口一览: void await() throws InterruptedException; void awaitUninterruptibly(); long awaitNanos(long nanosTimeout) throws InterruptedException; boolean ...
  • 今天就分享下我对 ReentrantLock 和 Condition 的理解。 以前文章 两个线程交替执行输出,一个数字1-10,一个字符a-e ,打印出来12a34b56c78d910e 这里使用了 java.util.concurrent 包下的 ReentrantLock 和 ...
  • AQS笔记之Condition

    2019-05-26 23:44:44
    Condition接口的一个实现类ConditionObject是AQS的内部类,每个Condition对象都包含一个队列,这个队列是Condition对象实现等待/通知的关键。 与Object的监视器模型(synchronized)中一个对象拥有一个同步队列和...
  • 在上文详解threading模块:lock、Rlock的使用(二)详细介绍了互斥锁,但是互斥锁是最简单的线程同步机制,Python提供的Condition对象提供了对复杂线程同步问题的支持。 Condition被称为条件变量,除了提供与Lock...
  • Condition接口

    2018-11-01 12:16:02
    Condition条件输出一个类监视器的wait,notify,notifyall方法到不同的类,给每一个类不同的wait集合,通过结合它和Lock类实现一起替代传统 的synchronized方法和语句,替代类监视器的使用。 当在一个condition上...
  • 通过jstack查看,发现接受mp的线程WAITING java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000006addee0c8> (a java.util.concurrent.locks....
  • Condition的await和signal与Object的wait与notify区别: 任何一个Java对象都天然继承于Object类,在线程间实现通信会用到Object的几个方法,如wait(),wait(long timeout),wait(long timeout,int nanos)与notify(),...
  • 锁(Lock/synchronized)只能实现互斥不能实现通信,Condition的功能类似于在传统的线程技术中的,Object.wait()和Object.notify()的功能,在等待Condition时,允许发生"虚假唤醒",这通常作为对基础平台语义的...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 24,250
精华内容 9,700
关键字:

conditiononwaiting