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

Patroni log errors when spinning up postgres-operator minimal cluster #348

Closed
davisford opened this issue Jul 17, 2019 · 1 comment
Closed

Comments

@davisford
Copy link

I have the zalando postgres-operator running and tried to spawn minimal-postgres-manifest.yaml

The acid cluster comes up:

$ kc get pods
NAME                                READY   STATUS    RESTARTS   AGE
acid-minimal-cluster-0              1/1     Running   0          35m
acid-minimal-cluster-1              1/1     Running   0          32m
postgres-operator-dc8b8b945-9js6f   1/1     Running   0          36m

But if I check logs of either cluster pod, there are all kinds of patroni errors. What am I missing?

$ kc logs acid-minimal-cluster-0
decompressing spilo image...
2019-07-17 18:20:08,182 - bootstrapping - INFO - Figuring out my environment (Google? AWS? Openstack? Local?)
2019-07-17 18:20:10,186 - bootstrapping - INFO - Could not connect to 169.254.169.254, assuming local Docker setup
2019-07-17 18:20:10,186 - bootstrapping - INFO - No meta-data available for this provider
2019-07-17 18:20:10,186 - bootstrapping - INFO - Looks like your running local
2019-07-17 18:20:10,199 - bootstrapping - WARNING - could not parse kubernetes labels as a JSON: Expecting value: line 1 column 1 (char 0), reverting to the default: {"application": "spilo"}
2019-07-17 18:20:10,264 - bootstrapping - INFO - Configuring crontab
2019-07-17 18:20:10,270 - bootstrapping - INFO - Configuring patronictl
2019-07-17 18:20:10,271 - bootstrapping - INFO - Configuring pam-oauth2
2019-07-17 18:20:10,271 - bootstrapping - INFO - Writing to file /etc/pam.d/postgresql
2019-07-17 18:20:10,271 - bootstrapping - INFO - Configuring patroni
2019-07-17 18:20:10,278 - bootstrapping - INFO - Writing to file /home/postgres/postgres.yml
2019-07-17 18:20:10,278 - bootstrapping - INFO - Configuring pgbouncer
2019-07-17 18:20:10,278 - bootstrapping - INFO - No PGBOUNCER_CONFIGURATION was specified, skipping
2019-07-17 18:20:10,278 - bootstrapping - INFO - Configuring wal-e
2019-07-17 18:20:10,278 - bootstrapping - INFO - Configuring bootstrap
2019-07-17 18:20:10,278 - bootstrapping - INFO - Configuring log
2019-07-17 18:20:10,278 - bootstrapping - INFO - Configuring standby-cluster
2019-07-17 18:20:10,278 - bootstrapping - INFO - Configuring certificate
2019-07-17 18:20:10,278 - bootstrapping - INFO - Generating ssl certificate
2019-07-17 18:20:10,407 - bootstrapping - INFO - Configuring renice
2019-07-17 18:20:10,658 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2019-07-17 18:20:10,658 INFO Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
2019-07-17 18:20:10,658 INFO Included extra file "/etc/supervisor/conf.d/patroni.conf" during parsing
2019-07-17 18:20:10,658 INFO Included extra file "/etc/supervisor/conf.d/pgq.conf" during parsing
2019-07-17 18:20:10,669 INFO RPC interface 'supervisor' initialized
2019-07-17 18:20:10,669 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2019-07-17 18:20:10,669 INFO supervisord started with pid 1
2019-07-17 18:20:11,676 INFO spawned: 'cron' with pid 34
2019-07-17 18:20:11,681 INFO spawned: 'patroni' with pid 35
2019-07-17 18:20:11,688 INFO spawned: 'pgq' with pid 36
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:12,456 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:13,458 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-07-17 18:20:13,461 INFO spawned: 'patroni' with pid 44
2019-07-17 18:20:13,461 INFO success: pgq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:13,854 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:15,858 INFO spawned: 'patroni' with pid 49
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:16,309 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:19,318 INFO spawned: 'patroni' with pid 54
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:20,728 INFO success: patroni entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-07-17 18:20:20,728 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:21,733 INFO spawned: 'patroni' with pid 59
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:22,124 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:23,128 INFO spawned: 'patroni' with pid 64
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:24,565 INFO success: patroni entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-07-17 18:20:24,566 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:25,569 INFO spawned: 'patroni' with pid 69
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:27,031 INFO success: patroni entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-07-17 18:20:27,031 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:28,034 INFO spawned: 'patroni' with pid 74
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:29,430 INFO success: patroni entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-07-17 18:20:29,430 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:30,434 INFO spawned: 'patroni' with pid 79
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:30,841 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:31,846 INFO spawned: 'patroni' with pid 84
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:32,248 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:34,255 INFO spawned: 'patroni' with pid 89
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:34,648 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:37,655 INFO spawned: 'patroni' with pid 94
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 88, in __init__
    k8s_config.load_incluster_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 91, in load_incluster_config
    cert_filename=SERVICE_CERT_FILENAME).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
    self._load_config()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/incluster_config.py", line 62, in _load_config
    raise ConfigException("Service token file does not exists.")
kubernetes.config.config_exception.ConfigException: Service token file does not exists.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/patroni", line 11, in <module>
    load_entry_point('patroni==1.5.6', 'console_scripts', 'patroni')()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 196, in main
    return patroni_main()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 158, in patroni_main
    patroni = Patroni()
  File "/usr/local/lib/python3.6/dist-packages/patroni/__init__.py", line 28, in __init__
    self.dcs = get_dcs(self.config)
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/__init__.py", line 90, in get_dcs
    return item(config[name])
  File "/usr/local/lib/python3.6/dist-packages/patroni/dcs/kubernetes.py", line 90, in __init__
    k8s_config.load_kube_config(context=config.get('context', 'local'))
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 361, in load_kube_config
    config_persister=config_persister).load_and_set()
  File "/usr/local/lib/python3.6/dist-packages/kubernetes/config/kube_config.py", line 317, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/postgres/.kube/config'
2019-07-17 18:20:38,054 INFO exited: patroni (exit status 1; not expected)
2019-07-17 18:20:39,056 INFO gave up: patroni entered FATAL state, too many start retries too quickly
@davisford
Copy link
Author

Closing as I was able to resolve

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

1 participant