pgcli
pgcli copied to clipboard
pgcli was stuck until it timed out with dbus error
Description
pgcli
command just got stuck when executed but can still be aborted. Here is the traceback from when it timed out after 120 seconds:
Traceback (most recent call last):
File "/usr/bin/pgcli", line 33, in <module>
sys.exit(load_entry_point('pgcli==3.1.0', 'console_scripts', 'pgcli')())
File "/home/ccxex29/.local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/ccxex29/.local/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/ccxex29/.local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ccxex29/.local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.9/site-packages/pgcli/main.py", line 1313, in cli
pgcli.connect(database, host, user, port)
File "/usr/lib/python3.9/site-packages/pgcli/main.py", line 531, in connect
passwd = keyring.get_password("pgcli", key)
File "/usr/lib/python3.9/site-packages/keyring/core.py", line 55, in get_password
return get_keyring().get_password(service_name, username)
File "/usr/lib/python3.9/site-packages/keyring/backends/SecretService.py", line 78, in get_password
collection = self.get_preferred_collection()
File "/usr/lib/python3.9/site-packages/keyring/backends/SecretService.py", line 61, in get_preferred_collection
collection = secretstorage.get_default_collection(bus)
File "/usr/lib/python3.9/site-packages/secretstorage/collection.py", line 161, in get_default_collection
return Collection(connection)
File "/usr/lib/python3.9/site-packages/secretstorage/collection.py", line 44, in __init__
self._collection.get_property('Label')
File "/usr/lib/python3.9/site-packages/secretstorage/util.py", line 64, in get_property
(signature, value), = self.send_and_get_reply(msg)
File "/usr/lib/python3.9/site-packages/secretstorage/util.py", line 46, in send_and_get_reply
return self._connection.send_and_get_reply(msg, unwrap=True)
File "/usr/lib/python3.9/site-packages/jeepney/io/blocking.py", line 190, in send_and_get_reply
return unwrap_msg(msg_in)
File "/usr/lib/python3.9/site-packages/jeepney/wrappers.py", line 214, in unwrap_msg
raise DBusErrorResponse(msg)
jeepney.wrappers.DBusErrorResponse: [org.freedesktop.DBus.Error.TimedOut] ("Failed to activate service 'org.freedesktop.secrets': timed out (service_start_timeout=120000ms)",)
Your environment
- OS: Artix Linux runit. Linux 5.14.7-202-tkg-pds. PostgreSQL 13.3, Tried installing pgcli via AUR and pip.
- CLI version 3.1.0
-
pip freeze
absl-py==0.13.0
alabaster==0.7.12
apipkg==1.5
apparmor==3.0.3
appdirs==1.4.4
apsw==3.36.0.post1
arandr==0.1.10
argon2-cffi==20.1.0
asn1crypto==1.4.0
astor==0.8.1
astroid==2.8.0
astunparse==1.6.3
async-generator==1.10
attrs==21.2.0
Automat==20.2.0
av==8.0.3
Babel==2.9.1
backcall==0.2.0
backports.csv==1.0.7
bcrypt==3.2.0
Beaker==1.11.0
beautifulsoup4==4.9.3
bleach==4.1.0
blessed==1.18.1
boto3==1.18.34
botocore==1.21.34
btrfsutil==5.14.1
CacheControl==0.12.6
cachetools==4.2.2
cairocffi==1.2.0
CairoSVG==2.5.2
cffi==1.14.6
chardet==4.0.0
cli-helpers==2.2.0
click==8.0.1
colorama==0.4.4
configobj==5.1.0.dev0
constantly==15.1.0
construct==2.10.67
contextlib2==0.6.0.post1
croniter==1.0.15
cryptography==3.4.8
css-parser==1.0.6
cssselect==1.1.0
cssselect2==0.4.1
cycler==0.10.0
Cython==0.29.24
daemonize==2.5.0
debugpy==1.4.3
decorator==5.1.0
defusedxml==0.7.1
distlib==0.3.2
distro==1.6.0
dnspython==2.1.0
docopt==0.6.2
docutils==0.17.1
enlighten==1.6.0
entrypoints==0.3
enum-compat==0.0.3
evdev==1.4.0
fbpca==1.0
feedparser==5.2.1
file-magic==0.4.0
filelock==3.0.12
Flask==2.0.1
flatbuffers==2.0.0
frida==15.1.1
frida-tools==10.2.2
future==0.18.2
gast==0.3.3
gensim==4.1.2
glumpy==1.1.0
google-auth==1.33.1
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
greenlet==1.1.1
grpcio==1.39.1
guiscrcpy==4.10.0
h5py==3.2.1
html2text==2020.1.16
html5-parser==0.4.9
html5lib==1.1
humanize==3.1.0
hyperlink==21.0.0
idna==3.2
ifaddr==0.1.7
imageio==2.9.0
imagesize==1.2.0
importlib-metadata==4.8.1
incremental==21.3.0
iniconfig==1.1.1
iotop==0.6
ipykernel==6.0.3
ipython==7.27.0
ipython_genutils==0.2.0
ipywidgets==7.6.3
isc==2.0
isodate==0.6.0
isort==5.9.3
itsdangerous==2.0.1
jedi==0.18.0
jeepney==0.7.1
Jinja2==3.0.1
jmespath==0.10.0
joblib==1.0.1
jsonschema==3.2.0
jupyter-client==6.1.12
jupyter-console==6.4.0
jupyter-core==4.7.1
jupyterlab-pygments==0.1.2
keras @ file:///build/python-keras/src/keras-2.6.0-py2.py3-none-any.whl
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
keyring==23.0.1
keyutils==0.6
kiwisolver==1.3.2
lazy-object-proxy==1.6.0
lensfun==0.3.95
LibAppArmor==3.0.3
libfdt==1.6.1
libtorrent===1.2.14-build-libtorrent-rasterbar-src-libtorrent-rasterbar-1.2.14-bindings-python
libvirt-python==7.3.0
lit==12.0.1.dev0
louis==3.19.0
lutris==0.5.8.4
lxml==4.6.3
Mako==1.1.5
Markdown==3.3.4
MarkupSafe==2.0.1
matplotlib==3.4.3
matplotlib-inline==0.1.2
mccabe==0.6.1
mechanize==0.4.6
MemoizeDB==2017.3.30.23.38.49
mercurial==5.9.1
meson==0.59.1
MIDIUtil==1.2.1
Mimeo==2021.2.11.12.28.52
mistune==0.8.4
mock==3.0.5
more-itertools==8.10.0
msgpack==1.0.2
mycli==1.24.1
natsort==7.1.1
nbclient==0.5.3
nbconvert==6.1.0
nbformat==5.1.3
nest-asyncio==1.5.1
netifaces==0.11.0
networkx==2.6.3
nltk==3.6.2
notebook==6.4.3
notify2==0.3.1
nsz==4.0.0
numpy==1.21.2
oauthlib==3.1.1
OpenCC==1.1.2
openrazer==3.1.0
openrazer-daemon==3.1.0
opt-einsum==3.3.0
optimus-manager==1.4
ordered-set==4.0.2
packaging==20.9
pandas==1.3.3
pandocfilters==1.4.3
paramiko==2.7.2
parso==0.8.2
pbr==5.6.0
pendulum==2.1.2
pep517==0.11.0
pexpect==4.8.0
pgcli==3.1.0
pgspecial==1.13.0
pickleshare==0.7.5
pikaur==1.8
Pillow==8.3.2
platformdirs==2.0.2
plover==4.0.0.dev10+2.g0501aa3
pluggy==0.13.1
ply==3.11
pm2ml==2021.8.2.18.55.0
pooch==0+unknown
Powerpill==2020.12.15.4.30.26
progress==1.5
prometheus-client==0.11.0
prompt-toolkit==3.0.20
protobuf==3.17.3
protontricks==1.6.0
psutil==5.8.0
psycopg2==2.9.1
ptyprocess==0.7.0
py==1.10.0
py3nvml==0.2.6
py7zr==0.11.3
pyaes==1.6.1
pyalpm==0.10.6
pyasn1==0.4.8
pyasn1-modules==0.2.8
pybind11==2.7.1
pycairo==1.20.1
pychm==0.8.6
pycparser==2.20
pycryptodome==3.10.1
pycuda==2021.1
pydot==1.4.2
Pygments==2.10.0
PyGObject==3.40.1
pyliblo==0.10.0
pylint==2.11.1
PyMySQL==1.0.2
PyNaCl==1.4.0
pynput==1.7.3
pynvim==0.4.3
PyOpenGL==3.1.5
pyopengltk==0.0.3
pyOpenSSL==20.0.1
pyparsing==2.4.7
pyPEG2==2.15.2
pyperclip==1.7.0
PyQt5==5.15.4
PyQt5-sip==12.9.0
PyQtWebEngine==5.15.4
pyrsistent==0.18.0
PySastrawi==1.2.0
pyserial==3.5
pystache==0.5.4
pytest==6.2.5
python-dateutil==2.8.2
python-dotenv==0.19.0
python-magic==0.4.24
python-miio==0.5.8
python-xlib==0.31
pytools==2021.2.8
pytz==2021.1
pytzdata==2020.1
pyudev==0.22.0.dev20210718
PyWavelets==1.1.1
pyxdg==0.27
PyYAML==5.4.1
pyzmq==22.2.1
QtPy==1.9.0
qutebrowser==2.3.1
rdflib==5.0.0
regex==2021.8.28
requests==2.26.0
requests-oauthlib==1.3.0
resolvelib==0.5.5
retrying==1.3.3
rsa==4.7.2
s3transfer==0.5.0
sacremoses==0.0.43
scikit-image==0.18.3
scikit-learn==0.24.2
scipy==1.7.1
seaborn==0.11.2
SecretStorage==3.3.1
Send2Trash==1.8.0
service-identity==18.1.0
setproctitle==1.2.2
setuptools-lint==0.6.0
shiboken2==5.15.2
six==1.16.0
smart-open==5.2.1
snowballstemmer==2.1.0
soupsieve==2.2.1
speedtest-cli==2.1.3
Sphinx==4.2.0
sphinx-rtd-theme==1.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sqlparse==0.4.2
tabulate==0.8.9
tensorboard==2.6.0
tensorboard-data-server @ file:///tmp/tensorboard_data_server-0.7.0a0-py3-none-manylinux2010_x86_64.whl
tensorboard-plugin-wit @ file:///build/python-tensorboard_plugin_wit/src/tensorboard_plugin_wit-1.8.0/wit-pip/release/dist/tensorboard_plugin_wit-1.8.0-py3-none-any.whl
tensorflow-estimator @ file:///build/python-tensorflow-estimator/src/estimator_pip/tensorflow_estimator-2.6.0-py2.py3-none-any.whl
tensorflow-gpu @ file:///build/tensorflow/src/tmpcuda/tensorflow_gpu-2.6.0-cp39-cp39-linux_x86_64.whl
termcolor==1.1.0
terminado==0.11.1
terminaltables==3.1.0
testpath==0.4.4
texttable==1.6.4
threadpoolctl==2.2.0
tifffile==2021.8.30
tinycss2==1.1.0
tokenizers==0.9.4
toml==0.10.2
tomli==1.2.1
torch==1.7.1
tornado==6.1
tqdm==4.62.3
traitlets==5.1.0
transformers==4.2.2
trash-cli==0.21.7.24
triangle==20200424
Twisted==21.7.0
typing-extensions==3.10.0.2
udiskie==2.3.3
unrardll==0.1.4
urllib3==1.26.6
validate==5.1.0.dev0
vdf==3.4
wcwidth==0.2.5
webencodings==0.5.1
Werkzeug==2.0.1
widgetsnbextension==3.5.1
wrapt==1.12.1
xcffib==0.11.1
XCGF==2017.3.10.23.45.54
XCPF==2021.7.28.23.27.48
yeelight==0.5.4
youtube-dl==2021.6.6
zeroconf==0.29.0
zipp==3.5.0
zope.interface==5.4.0
zstandard==0.15.2
I have had encountered the same problem on Archlinux with DWM.
It was related to archlinux and the DBUS_SESSION_BUS_ADDRESS environment variable being setup incorrectly with something along the lines of unix:abstract=/tmp/dbus-randomchars,guid=aguidishere.
I also had no password keyring nor login password showing up in Seahorse, the GNOME application for managing encryption keys and passwords in the GNOME Keyring which is used by pgcli.
Following this post, I could solve my problem by exporting the following environnment variable in my .zshrc :
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
I have had encountered the same problem on Archlinux with DWM.
It was related to archlinux and the DBUS_SESSION_BUS_ADDRESS environment variable being setup incorrectly with something along the lines of unix:abstract=/tmp/dbus-randomchars,guid=aguidishere.
I also had no password keyring nor login password showing up in Seahorse, the GNOME application for managing encryption keys and passwords in the GNOME Keyring which is used by pgcli.
Following this post, I could solve my problem by exporting the following environnment variable in my .zshrc :
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Thanks! Having the same problem with manjaro/bspwm. One day I hope to figure out how dbus works.
Thanks for the detailed answer, @evoludigit. :heart: No response from the original reporter for 18 months, I'll suppose that they have applied your fix. I'm thus closing this issue.