Skip to content

Dispatchers container causing my kamailio pod to CrashLoopBackOff in on-premise k8s cluster #22

@delliott3662

Description

@delliott3662

Hi,

Thanks very much for your demo - it's been the only thing I've found that may address my SIP routing issues!

Though, I've been stuck on one problem for a week... I'm hoping someone could help me over this hurdle.
I'm running minikube on a Centos 7 VM.
Everything is Running with the exception of the kamailio pod, which is in CrashLoopBackOff.
Kubectl describe says the pod can't find /app:
exec: "/app": stat /app: no such file or directory: unknown

Any debug help would be much appreciated!
Thank you,
DRE

Commands and editing done:

$ minikube delete
$ minikube start
$ sudo swapoff -a
$ mkdir CyCore; cd CyCore
$ git clone https://github.com/CyCoreSystems/asterisk-k8s-demo.git
$ cd asterisk-k8s-demo/live-demo/k8s
$ vi 02-kamailio.yaml			// change CLOUD to "", change nodeSelector to "type: kamailio"
$ vi 03-asterisk.yaml			// change CLOUD to ""
$ kubectl label nodes minikube type=kamailio		// So kamailio pod will run on minikube node
$ kubectl apply -f 00-namespace.yaml			// so secret in voip will apply successfully
$ cd ../..
			// edited inbound.conf.tmpl, created config zip.
$ kubectl -n voip create secret generic asterisk-config --from-file=asterisk-config.zip
$ cd live-demo/k8s
$ kubectl apply -f 01-nats.yaml
$ kubectl apply -f 02-kamailio.yaml
$ kubectl apply -f 03-asterisk.yaml

Results:

$ kubectl get all --namespace=voip

NAME                            READY   STATUS             RESTARTS   AGE
pod/asterisk-758996b56d-t56c9   3/3     Running            4          95s
pod/kamailio-b96hs              2/3     CrashLoopBackOff   5          7m14s
pod/nats-666d56d6b8-q4bb5       1/1     Running            0          20m

NAME               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                      AGE
service/asterisk   ClusterIP   10.105.56.62     <none>        5060/UDP                     20m
service/kamailio   ClusterIP   10.110.250.161   <none>        5060/UDP                     20m
service/nats       ClusterIP   10.104.131.110   <none>        4222/TCP,6222/TCP,8222/TCP   20m

NAME                      DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/kamailio   1         1         0       1            0           type=kamailio   20m

NAME                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/asterisk   1/1     1            1           20m
deployment.apps/nats       1/1     1            1           20m

NAME                                  DESIRED   CURRENT   READY   AGE
replicaset.apps/asterisk-758996b56d   1         1         1       20m
replicaset.apps/nats-666d56d6b8       1         1         1       20m



$ kubectl describe pod kamailio-b96hs --namespace=voip 

Name:         kamailio-b96hs
Namespace:    voip
Priority:     0
Node:         minikube/192.168.49.2
Start Time:   Thu, 19 Aug 2021 08:56:05 -0400
Labels:       component=kamailio
              controller-revision-hash=5d4dd5d7cf
              pod-template-generation=3
Annotations:  <none>
Status:       Running
IP:           192.168.49.2
IPs:
  IP:           192.168.49.2
Controlled By:  DaemonSet/kamailio
Containers:
  kamailio:
    Container ID:   docker://90752fe442a294a2c37c44303d45dd6114dfe356663a40cfd7f403716331c7cc
    Image:          cycoresystems/kamailio
    Image ID:       docker-pullable://cycoresystems/kamailio@sha256:4a0804ab228a8eecd4abcf520a499af6119b4b30ae90a28abeec3f4008dc178b
    Port:           <none>
    Host Port:      <none>
    State:          Running
      Started:      Thu, 19 Aug 2021 08:57:52 -0400
    Ready:          True
    Restart Count:  0
    Environment:
      CLOUD:  
    Mounts:
      /data/kamailio from config (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-82wpn (ro)
  rtpproxy:
    Container ID:   docker://4a879cbfe529ee7c98efc452148b74caabeebbf6c93b8439839c4aa28cb9f69f
    Image:          cycoresystems/rtpproxy
    Image ID:       docker-pullable://cycoresystems/rtpproxy@sha256:e1443ca3b3a2f75cd0f26fb10e439cd6e920883d2ab1784962e56e2c01526beb
    Port:           <none>
    Host Port:      <none>
    State:          Running
      Started:      Thu, 19 Aug 2021 08:58:08 -0400
    Ready:          True
    Restart Count:  0
    Environment:
      CLOUD:  
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-82wpn (ro)
  dispatchers:
    Container ID:  docker://73389818732a94e43e3d8a62398b80f901aa6a1e8189569dc1f38a2e764a8ea4
    Image:         cycoresystems/dispatchers
    Image ID:      docker-pullable://cycoresystems/dispatchers@sha256:95f9cefb9d8454a907832f5d02d28a7f76f79e70c9a53c9c9a3aad4c700f27a0
    Port:          <none>
    Host Port:     <none>
    Command:
      /app
      -set
      voip:asterisk=1:5080
    State:          Waiting
      Reason:       CrashLoopBackOff
    Last State:     Terminated
      Reason:       ContainerCannotRun
      Message:      OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/app": stat /app: no such file or directory: unknown
      Exit Code:    127
      Started:      Thu, 19 Aug 2021 09:01:29 -0400
      Finished:     Thu, 19 Aug 2021 09:01:29 -0400
    Ready:          False
    Restart Count:  5
    Environment:    <none>
    Mounts:
      /data/kamailio from config (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-82wpn (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  config:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>
  default-token-82wpn:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-82wpn
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  type=kamailio
Tolerations:     node.kubernetes.io/disk-pressure:NoSchedule op=Exists
                 node.kubernetes.io/memory-pressure:NoSchedule op=Exists
                 node.kubernetes.io/network-unavailable:NoSchedule op=Exists
                 node.kubernetes.io/not-ready:NoExecute op=Exists
                 node.kubernetes.io/pid-pressure:NoSchedule op=Exists
                 node.kubernetes.io/unreachable:NoExecute op=Exists
                 node.kubernetes.io/unschedulable:NoSchedule op=Exists
Events:
  Type     Reason     Age                     From               Message
  ----     ------     ----                    ----               -------
  Normal   Scheduled  7m25s                   default-scheduler  Successfully assigned voip/kamailio-b96hs to minikube
  Normal   Pulling    7m24s                   kubelet            Pulling image "cycoresystems/kamailio"
  Normal   Pulled     5m39s                   kubelet            Successfully pulled image "cycoresystems/kamailio" in 1m45.372032898s
  Normal   Created    5m38s                   kubelet            Created container kamailio
  Normal   Started    5m38s                   kubelet            Started container kamailio
  Normal   Pulling    5m38s                   kubelet            Pulling image "cycoresystems/rtpproxy"
  Normal   Pulled     5m22s                   kubelet            Successfully pulled image "cycoresystems/rtpproxy" in 16.111961198s
  Normal   Created    5m22s                   kubelet            Created container rtpproxy
  Normal   Started    5m22s                   kubelet            Started container rtpproxy
  Normal   Pulled     5m7s                    kubelet            Successfully pulled image "cycoresystems/dispatchers" in 15.121616868s
  Normal   Pulled     5m2s                    kubelet            Successfully pulled image "cycoresystems/dispatchers" in 3.614521805s
  Warning  Failed     4m44s (x3 over 5m6s)    kubelet            Error: failed to start container "dispatchers": Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "/app": stat /app: no such file or directory: unknown
  Normal   Pulled     4m44s                   kubelet            Successfully pulled image "cycoresystems/dispatchers" in 4.063114355s
  Normal   Pulling    4m21s (x4 over 5m22s)   kubelet            Pulling image "cycoresystems/dispatchers"
  Normal   Created    4m13s (x4 over 5m6s)    kubelet            Created container dispatchers
  Normal   Pulled     4m13s                   kubelet            Successfully pulled image "cycoresystems/dispatchers" in 8.398882695s
  Warning  BackOff    2m18s (x12 over 4m44s)  kubelet            Back-off restarting failed container

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions