mongo-k8s-sidecar
mongo-k8s-sidecar copied to clipboard
sidecar process error
2017-06-06T08:00:49.961491000Z npm info it worked if it ends with ok
2017-06-06T08:00:49.961724000Z npm info using [email protected]
2017-06-06T08:00:49.961901000Z npm info using [email protected]
2017-06-06T08:00:50.190941000Z npm info lifecycle [email protected]~prestart: [email protected]
2017-06-06T08:00:50.199392000Z npm info lifecycle [email protected]~start: [email protected]
2017-06-06T08:00:50.204128000Z > [email protected] start /opt/cvallance/mongo-k8s-sidecar
2017-06-06T08:00:50.204323000Z > forever src/index.js
2017-06-06T08:00:50.455072000Z warn: --minUptime not set. Defaulting to: 1000ms
2017-06-06T08:00:50.456001000Z warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
2017-06-06T08:00:50.672112000Z Using mongo port: 27017
2017-06-06T08:00:50.756149000Z fs.js:584
2017-06-06T08:00:50.756399000Z return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
2017-06-06T08:00:50.756579000Z ^
2017-06-06T08:00:50.756915000Z Error: ENOENT: no such file or directory, open '/var/run/secrets/kubernetes.io/serviceaccount/token'
2017-06-06T08:00:50.757077000Z at Object.fs.openSync (fs.js:584:18)
2017-06-06T08:00:50.757240000Z at Object.fs.readFileSync (fs.js:491:33)
2017-06-06T08:00:50.757415000Z at Object.<anonymous> (/opt/cvallance/mongo-k8s-sidecar/src/lib/k8s.js:7:20)
2017-06-06T08:00:50.757577000Z at Module._compile (module.js:571:32)
2017-06-06T08:00:50.757743000Z at Object.Module._extensions..js (module.js:580:10)
2017-06-06T08:00:50.757902000Z at Module.load (module.js:488:32)
2017-06-06T08:00:50.758070000Z at tryModuleLoad (module.js:447:12)
2017-06-06T08:00:50.758227000Z at Function.Module._load (module.js:439:3)
2017-06-06T08:00:50.758397000Z at Module.require (module.js:498:17)
2017-06-06T08:00:50.758553000Z at require (internal/module.js:20:19)
2017-06-06T08:00:50.761551000Z error: Forever detected script exited with code: 1
is there an environment variable support k8s config?
/var/run/secrets/kubernetes.io/serviceaccount/token is something all pods should have access to. Is this an error you're getting running the sidecar on a k8s cluster?
Hmmm... strange. That is the secret that all pods should get mounted. It will give the pod read access to the k8s cluster api... we use that to get all the pods that should be in a mongo replica set.
Is this still an issue?
I have encountered this problem recently. Does anyone have a solution?
> [email protected] start /opt/cvallance/mongo-k8s-sidecar
> forever src/index.js
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
Using mongo port: 27017
fs.js:122
throw err;
^
Error: ENOENT: no such file or directory, open '/var/run/secrets/kubernetes.io/serviceaccount/token'
at Object.openSync (fs.js:451:3)
at Object.readFileSync (fs.js:351:35)
at Object.<anonymous> (/opt/cvallance/mongo-k8s-sidecar/src/lib/k8s.js:7:20)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
at Function.Module._load (internal/modules/cjs/loader.js:552:3)
at Module.require (internal/modules/cjs/loader.js:658:17)
at require (internal/modules/cjs/helpers.js:22:18)
error: Forever detected script exited with code: 1