-
Type: Bug
-
Resolution: Community Answered
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
Labels:None
-
ALL
Here is the error log
2020-12-21T19:01:44.384+0000 I ASIO [NetworkInterfaceASIO-Replication-0] Failed to connect to mongodb-0.mongodb.default.svc.cluster.local
:27017 - HostUnreachable: Connection refused
2020-12-21T19:01:44.384+0000 I ASIO [NetworkInterfaceASIO-Replication-0] Dropping all pooled connections to mongodb-0.mongodb.default.svc
.cluster.local:27017 due to failed operation on a connection
2020-12-21T19:01:44.384+0000 I REPL [ReplicationExecutor] Error in heartbeat request to mongodb-0.mongodb.default.svc.cluster.local:27017
; HostUnreachable: Connection refused
Here is my yaml
ansible@sq-kube-01:~$ kubectl edit statefulset mongodb
- -v
- --replSet
- abacus
- --dbpath
- /data/db
- --logpath
- /var/log/mongodb/server.log
- --logRotate
- reopen
- --logappend
command: - mongod
image: library/mongo:3.4.4
imagePullPolicy: IfNotPresent
name: mongodb
ports: - containerPort: 27017
protocol: TCP
resources:
limits:
cpu: "3"
memory: 21Gi
requests:
cpu: 100m
memory: 100Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts: - mountPath: /data/db
name: mongodb - mountPath: /var/log/mongodb
name: logs - env:
- name: MONGO_SIDECAR_POD_LABELS
value: role=mongodb,environment=stage - name: KUBERNETES_MONGO_SERVICE_NAME
value: mongodb - name: KUBE_NAMESPACE
value: default
image: cvallance/mongo-k8s-sidecar
imagePullPolicy: IfNotPresent
name: mongo-sidecar
resources:
limits:
cpu: 300m
memory: 500Mi
requests:
cpu: 100m
memory: 100Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
- args:
- proxy
- sidecar
- -v
- "2"
- --configPath
- /etc/istio/proxy
- --binaryPath
- /usr/local/bin/envoy
- --serviceCluster
- istio-proxy
- --drainDuration
- 45s
- --parentShutdownDuration
- 1m0s
- --discoveryAddress
- istio-pilot.istio-system:8080
- --discoveryRefreshDelay
- 1s
- --zipkinAddress
- zipkin.istio-system:9411
- --connectTimeout
- 10s
- --statsdUdpAddress
- istio-mixer.istio-system:9125
- --proxyAdminPort
- "15000"
env: - name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name - name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: INSTANCE_IP
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.podIP
image: docker.io/istio/proxy:0.2.6
imagePullPolicy: IfNotPresent
name: istio-proxy
resources: {}
securityContext:
privileged: false
readOnlyRootFilesystem: true
runAsUser: 1337
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts: - mountPath: /etc/istio/proxy
name: istio-envoy - mountPath: /etc/certs/
name: istio-certs
readOnly: true
dnsPolicy: ClusterFirst
imagePullSecrets: - name: juniperregistrykey
initContainers: - args:
- -p
- "15001"
- -u
- "1337"
image: docker.io/istio/proxy_init:0.2.6
imagePullPolicy: IfNotPresent
name: istio-init
resources: {}
securityContext:
capabilities:
add: - NET_ADMIN
privileged: true
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
nodeSelector:
node: mongodb
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: mongodb-serviceaccount
serviceAccountName: mongodb-serviceaccount
terminationGracePeriodSeconds: 10
volumes:
- emptyDir: {}
name: configdir - hostPath:
path: /var/log/mongodb
type: ""
name: logs - hostPath:
path: /data/mongodb/data/db
type: ""
name: mongodb - emptyDir:
medium: Memory
name: istio-envoy - name: istio-certs
secret:
defaultMode: 420
optional: true
secretName: istio.mongodb-serviceaccount
updateStrategy:
rollingUpdate:
partition: 0
type: RollingUpdate
status:
collisionCount: 0
currentReplicas: 3
currentRevision: mongodb-86559f6fd5
observedGeneration: 71
readyReplicas: 3
replicas: 3
updateRevision: mongodb-86559f6fd5