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

Connection timed out (worked well before) #110

Open
CharlesB2 opened this issue Jan 23, 2020 · 1 comment
Open

Connection timed out (worked well before) #110

CharlesB2 opened this issue Jan 23, 2020 · 1 comment

Comments

@CharlesB2
Copy link

CharlesB2 commented Jan 23, 2020

For some reason after working without problems on GCP, our sidecar instance now fails with the following error:

> [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                                                                                                                                           
Starting up mongo-k8s-sidecar                                                                                                                                     
The cluster domain 'cluster.local' was successfully verified.                                                                                                     
Error in workloop { MongoError: connection 0 to 127.0.0.1:27017 timed out                                                                                         
    at Function.MongoError.create (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/error.js:29:11)                                                 
    at Socket.<anonymous> (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/connection.js:200:20)                                        
    at Object.onceWrapper (events.js:273:13)                                                                                                                      
    at Socket.emit (events.js:182:13)                                                                                                                             
    at Socket._onTimeout (net.js:452:8)                                                                                                                           
    at listOnTimeout (timers.js:324:15)                                                                                                                           
    at processTimers (timers.js:268:5)                                                                                                                            
  name: 'MongoError',                                                                                                                                             
  message: 'connection 0 to 127.0.0.1:27017 timed out' }                                                                                                          

Complete log is here: sidecar.txt

Our statefulset.yml is the following:

apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
  name: mongo
spec:
  serviceName: "mongo"
  replicas: 3
  template:
    metadata:
      labels:
        role: mongo
        environment: test
    spec:
      terminationGracePeriodSeconds: 10
      containers:
        - name: mongo
          image: mongo:3.4
          command:
            - mongod
            - "--replSet"
            - rs0
            - "--smallfiles"
            - "--noprealloc"
          ports:
            - containerPort: 27017
          volumeMounts:
            - name: mongo-persistent-storage
              mountPath: /data/db
        - name: mongo-sidecar
          image: cvallance/mongo-k8s-sidecar
          env:
            - name: MONGO_SIDECAR_POD_LABELS
              value: "role=mongo,environment=test"
@CharlesB2 CharlesB2 changed the title Connection timed out after update or restart Connection timed out (worked well before) Jan 23, 2020
@ogostus
Copy link

ogostus commented Feb 27, 2020

Same here
I guess it's related to updating services into ssl ?!

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

2 participants