Hello,
I'm trying to deploy a Docker image of the microgateway in a local instance of OpenShift but I get the following error:
As you see in the image above, the microgateway actually starts correctly (indeed it downloads the public keys, products and config) but, for some reason, right after that, it shuts down immediately, returning the error "Error: ENOENT: no such file or directory, unlink '/edgemicro.sock'".
The problem is for sure not in the Docker image as if I deploy it in a Docker container, it works without issues.
Does anyone have experience in deploying the microgateway in OpenShift and knows what's causing this problem?
Thanks in advance,
Davide
Hello Davide, I have run MG in k8s (GKE) and I don't see any problem. Can you please add "export DEBUG=*" to your Dockerfile, build the image and try again? I'd like to see the debug output. I think something else is happening.
Hello,
The debug seems already active (see Dockerfile content below):
FROM node:slim ARG ADMINUSER=someuser ARG ADMINPASSWORD=somepassword ARG ORG=someorg ARG ENV=someenv ARG KEY=somekey ARG SECRET=somesecret RUN npm install -g edgemicro RUN edgemicro init RUN export EDGEMICRO_ORG=$ORG RUN export EDGEMICRO_ENV=$ENV RUN export EDGEMICRO_KEY=$KEY RUN export EDGEMICRO_SECRET=$SECRET RUN export DEBUG=* COPY $ORG-$ENV-config.yaml /root/.edgemicro # copy tls files if needed # COPY key.pem /root/.edgemicro # COPY cert.pem /root/.edgemicro CMD ["/bin/bash", "-c","edgemicro start"] EXPOSE 8000
was EXPOSE 800 a typo? Anything less than 1024 is a privileged port - is it not? Did you mean 8000? Also strange that debug output is not shown in the screenshot.
Yes, 800 is a copy/paste typo. It is 8000 in the actual file.
How the debug output should look like?
I cloned the https://github.com/srinandan/apigee-edgemicro-docker repo, and haven't changed the Dockerfile since, so I don't know why there is no debug output in the screenshot.
The unlink of file is a red herring. The error we want to get details on is the "null" that appears under "PROCESS PID : 1". The unlink is happening as part of the shutdown procedure. Let me see if I can reproduce this error in GKE.
Ok thanks a lot
I just ran the whole setup on GKE (Kubernetes Cluster) on v1.7.8. It worked fine. I will publish a repo soon with the scripts.