Closed hunterhuang8810 closed 3 years ago
seems when I install patroni like below, will get the issue:
pip download patroni[etcd] -d /root/patroni_pack/
[root@localhost patroni_pack]# ls click-7.1.2-py2.py3-none-any.whl prettytable-2.0.0-py3-none-any.whl python-etcd-0.4.5.tar.gz six-1.15.0-py2.py3-none-any.whl ydiff-1.2.tar.gz dnspython-2.1.0-py3-none-any.whl psutil-5.8.0-cp36-cp36m-manylinux2010_x86_64.whl PyYAML-5.3.1.tar.gz urllib3-1.26.2-py2.py3-none-any.whl patroni-2.0.1-py3-none-any.whl python_dateutil-2.8.1-py2.py3-none-any.whl setuptools-51.3.1-py3-none-any.whl wcwidth-0.2.5-py2.py3-none-any.whl [root@localhost patroni_pack]#
pip install patroni-2.0.1-py3-none-any.whl
so I uninstalled patroni, and re-install as :
pip install patroni[etcd]
the issue not happen.
so is there something wrong for install patroni offline( first download and then install whl) like below: pip download patroni[etcd] -d /root/patroni_pack/ pip install patroni-2.0.1-py3-none-any.whl
how should I install offline?
how should I install offline?
In addition to the Patroni you have to install python-etcd.
how should I install offline?
In addition to the Patroni you have to install python-etcd.
[root@localhost pip_pack]# ls click-7.1.2-py2.py3-none-any.whl patroni-2.0.1-py3-none-any.whl psutil-5.8.0-cp36-cp36m-manylinux2010_x86_64.whl python-etcd-0.4.5.tar.gz setuptools-51.3.3-py3-none-any.whl urllib3-1.26.2-py2.py3-none-any.whl ydiff-1.2.tar.gz dnspython-2.1.0-py3-none-any.whl prettytable-2.0.0-py3-none-any.whl python_dateutil-2.8.1-py2.py3-none-any.whl PyYAML-5.3.1.tar.gz six-1.15.0-py2.py3-none-any.whl wcwidth-0.2.5-py2.py3-none-any.whl [root@localhost pip_pack]#
if I install as : pip install *.whl
[root@localhost pip_pack]# pip install *.whl Processing ./click-7.1.2-py2.py3-none-any.whl Processing ./dnspython-2.1.0-py3-none-any.whl Processing ./patroni-2.0.1-py3-none-any.whl Processing ./prettytable-2.0.0-py3-none-any.whl Processing ./psutil-5.8.0-cp36-cp36m-manylinux2010_x86_64.whl Processing ./python_dateutil-2.8.1-py2.py3-none-any.whl Processing ./setuptools-51.3.3-py3-none-any.whl Processing ./six-1.15.0-py2.py3-none-any.whl Processing ./urllib3-1.26.2-py2.py3-none-any.whl Processing ./wcwidth-0.2.5-py2.py3-none-any.whl Collecting ydiff>=1.2.0 Using cached ydiff-1.2.tar.gz (42 kB) Collecting PyYAML Using cached PyYAML-5.3.1.tar.gz (269 kB) Building wheels for collected packages: ydiff, PyYAML Building wheel for ydiff (setup.py) ... done Created wheel for ydiff: filename=ydiff-1.2-py3-none-any.whl size=16631 sha256=ca3f3ce8f8de1d1bed29516736dae9ed00af8914d6e56de8eae006434a36017b Stored in directory: /root/.cache/pip/wheels/54/7a/ed/6c6e1b0eb08a1224067852e0039503bc1a4bb79720964ddf43 Building wheel for PyYAML (setup.py) ... done Created wheel for PyYAML: filename=PyYAML-5.3.1-cp36-cp36m-linux_x86_64.whl size=44621 sha256=76863cd628abe54182bf2d760a5c6fc200803f7c92c332256a53fb783e706615 Stored in directory: /root/.cache/pip/wheels/e5/9d/ad/2ee53cf262cba1ffd8afe1487eef788ea3f260b7e6232a80fc Successfully built ydiff PyYAML Installing collected packages: wcwidth, six, setuptools, ydiff, urllib3, PyYAML, python-dateutil, psutil, prettytable, click, patroni, dnspython Attempting uninstall: setuptools Found existing installation: setuptools 39.2.0 Uninstalling setuptools-39.2.0: Successfully uninstalled setuptools-39.2.0 Successfully installed PyYAML-5.3.1 click-7.1.2 dnspython-2.1.0 patroni-2.0.1 prettytable-2.0.0 psutil-5.8.0 python-dateutil-2.8.1 setuptools-51.3.3 six-1.15.0 urllib3-1.26.2 wcwidth-0.2.5 ydiff-1.2
can this will solve the problem? or I need to install the python-etcd-0.4.5.tar.gz seperately? is there command to install tegather or how to install python-etcd? thanks
like online install command : pip install patroni[etcd] could I install offline like : pip install patroni-2.0.1-py3-none-any.whl[etcd] or somethings others?
There are good reasons not to installed all possible dependencies at once, therefore we rely on the "extras_require" feature of pip. Someone who runs Patroni with zookeeper doesn't need (and doesn't always want) installing for example python-etcd or python-consul.
We recommend using either official PGDG packages (deb, rpm) or installing it with pip install patroni[$EXTRA]
. Anything else might work, but it becomes your responsibility (and problem).
There are good reasons not to installed all possible dependencies at once, therefore we rely on the "extras_require" feature of pip. Someone who runs Patroni with zookeeper doesn't need (and doesn't always want) installing for example python-etcd or python-consul.
We recommend using either official PGDG packages (deb, rpm) or installing it with
pip install patroni[$EXTRA]
. Anything else might work, but it becomes your responsibility (and problem).
thanks a lot for your reply
after I installed python-etcd, the problem solved python3 setup.py install
and I got the full dependencies of pip list for a successfull install: [postgres@localhost ~]$ pip list Package Version
click 7.1.2 dnspython 2.1.0 patroni 2.0.1 pip 20.3.3 prettytable 2.0.0 psutil 5.8.0 psycopg2-binary 2.8.6 python-dateutil 2.8.1 python-etcd 0.4.5 PyYAML 5.3.1 setuptools 51.3.3 six 1.15.0 urllib3 1.26.2 wcwidth 0.2.5 wheel 0.36.2 ydiff 1.2 [postgres@localhost ~]$
in some of our environment , we can't connect to internet, only inner net. so sometime I need to install offline.
anyway, the problem solved, thanks again for your reply, really appreciate!!!
@hunterhuang8810 I am trying to install patroni in an offline environent as well, can you please detail the steps for that? in my case, I am trying to install it with etcd and consul dependencies. I tried installing each package manually alone but seems not working, getting many errors starting the service
I have started ETCD on node 192.168.56.94,192.168.56.95,192.168.56.96, and the etcd worked well
[root@localhost data]# etcd --version etcd Version: 3.3.11 Git SHA: 2cf9e51 Go Version: go1.10.3 Go OS/Arch: linux/amd64 [root@localhost data]#
and in my patroni config yml file : etcd: host: 192.168.56.94:2379,192.168.56.95:2379,192.168.56.96:2379
but when I start patroni, it report can't find dcs , please help to check, thanks a lot!
[postgres@localhost ~]$ cat /home/postgres/patroni/patroni_node01.log 2021-01-17 21:46:31,611 INFO: Failed to import patroni.dcs.consul 2021-01-17 21:46:31,612 INFO: Failed to import patroni.dcs.etcd 2021-01-17 21:46:31,612 INFO: Failed to import patroni.dcs.etcd3 2021-01-17 21:46:31,613 INFO: Failed to import patroni.dcs.exhibitor 2021-01-17 21:46:31,614 INFO: Failed to import patroni.dcs.raft 2021-01-17 21:46:31,614 INFO: Failed to import patroni.dcs.zookeeper Traceback (most recent call last): File "/usr/local/bin/patroni", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/patroni/init.py", line 170, in main
return patroni_main()
File "/usr/local/lib/python3.6/site-packages/patroni/init.py", line 138, in patroni_main
abstract_main(Patroni, schema)
File "/usr/local/lib/python3.6/site-packages/patroni/daemon.py", line 98, in abstract_main
controller = cls(config)
File "/usr/local/lib/python3.6/site-packages/patroni/init.py", line 29, in init
self.dcs = get_dcs(self.config)
File "/usr/local/lib/python3.6/site-packages/patroni/dcs/init.py", line 106, in get_dcs
Available implementations: """ + ', '.join(sorted(set(available_implementations))))
patroni.exceptions.PatroniFatalException: 'Can not find suitable configuration of distributed configuration store\nAvailable implementations: kubernetes'
[postgres@localhost ~]$