Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db2express-c kubernetes pod does not start on centos probably because of entrypoint.sh #7

Open
raguks opened this issue Dec 15, 2016 · 6 comments

Comments

@raguks
Copy link

raguks commented Dec 15, 2016

kubectl logs db2xc --previous
Changing password for user db2inst1.
passwd: all authentication tokens updated successfully.
New password: Retype new password: /entrypoint.sh: line 51: exec: : not found

This I think is the compatible docker version with kubernetes.

docker --version
Docker version 1.10.3, build cb079f6-unsupported

kubectl version
Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"ec7364b6e3b155e78086018aa644057edbe196e5", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"ec7364b6e3b155e78086018aa644057edbe196e5", GitTreeState:"clean"}

Please let me know if you need more information.

@wzymaster
Copy link
Contributor

I don't see the error here and please elaborate the issue.

@raguks
Copy link
Author

raguks commented Dec 16, 2016

Basically for kubernetes when I try to create a pod the pod does not comeup and ends up in CrashBackoff

NAME                        READY     STATUS             RESTARTS   AGE
db2xc                       0/1       CrashLoopBackOff   10         33m```


 27m	10s	133	{kubelet wdp-downloadgo-dev3.fyre.ibm.com}					Warning	FailedSync	Error syncing pod, skipping: failed to "StartContainer" for "db2express-c" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=db2express-c pod=db2xc_default(742da930-c2b9-11e6-b9f0-00163e01a246)"

 33m	10s	161	{kubelet wdp-downloadgo-dev3.fyre.ibm.com}	spec.containers{db2express-c}	Warning	BackOff	Back-off restarting failed docker container

When I look at the docker logs <containername>

I see the error coming from

kubectl logs db2xc --previous
Changing password for user db2inst1.
passwd: all authentication tokens updated successfully.
New password: Retype new password: /entrypoint.sh: line 51: exec: : not found

```/entrypoint.sh: line 51: exec: : not found```

I do not have any other information.... I am thinking the script returns 1 and the pod creation fails

My yaml file looks like this:

cat pod-db2xpc.yaml
apiVersion: v1
kind: Pod
metadata:
 name: db2xc
 labels:
   app: db2app
spec:
 containers:
 - name: db2express-c
   image: ibmcom/db2express-c
   ports:
   - containerPort: 50000
   env:
   - name: DB2INST1_PASSWORD
     value: somepasswd!
   - name: LICENSE
     value: accept

@diewuq
Copy link

diewuq commented Mar 15, 2017

I try with k8s today, it seems that add command: ["/entrypoint.sh","db2start"] into yaml is ok. There should be a launch parameters in k8s container.

@MaheshIBM
Copy link

The solution given by @diewuq works for me.

@pedrojimenez
Copy link

The solution also worked for me. Thanks @diewuq
The change:

--- a/k8s/db2express-c-deployment.yaml
+++ b/k8s/db2express-c-deployment.yaml
@@ -19,6 +19,7 @@ spec:
       containers:
       - image: ibmcom/db2express-c
         name: db2express-c
+        command: ["/entrypoint.sh","db2start"]
         env:
         - name: LICENSE
           value: accept

@thelfensdrfer
Copy link

Or for docker-compose version > 3: command: "db2start" (db2start will just be appended to /entrypoint.sh)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants