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

Running cactus serve for the first time - Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 #228

Open
crmpicco opened this issue Jan 8, 2016 · 1 comment

Comments

@crmpicco
Copy link

crmpicco commented Jan 8, 2016

I have installed Cactus for the first time and have created a Cactus project, however when I run cactus serve I get the error below.
Created the project...

cactus create ~/www.crmpicco.co.uk
New project generated at /home/vagrant/www.crmpicco.co.uk
cd ~/www.crmpicco.co.uk/

Tried running cactus serve from the project folder

[vagrant@crmpicco ~/www.crmpicco.co.uk]# cactus serve
Traceback (most recent call last):
  File "/usr/bin/cactus", line 9, in <module>
    load_entry_point('Cactus==3.3.2', 'console_scripts', 'cactus')()
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/cli.py", line 150, in cli_entrypoint
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/cli.py", line 146, in main
    ns.target(**kwargs)
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/cli.py", line 64, in serve
    site = self.Site(path, config)
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/site.py", line 89, in __init__
    DeploymentEngineClass = get_deployment_engine_class(hosting_provider)
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/deployment/__init__.py", line 32, in get_deployment_engine_class
    _mod = __import__(module, fromlist=[engine])
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/deployment/s3/engine.py", line 10, in <module>
    from cactus.deployment.s3.auth import AWSCredentialsManager
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/deployment/s3/auth.py", line 2, in <module>
    from cactus.deployment.auth import BaseKeyringCredentialsManager
  File "/usr/lib/python2.7/site-packages/Cactus-3.3.2-py2.7.egg/cactus/deployment/auth.py", line 4, in <module>
    import keyring
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/__init__.py", line 12, in <module>
    from .core import (set_keyring, get_keyring, set_password, get_password,
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/core.py", line 158, in <module>
    init_backend()
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/core.py", line 58, in init_backend
    set_keyring(load_config() or _get_best_keyring())
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/core.py", line 66, in _get_best_keyring
    keyrings = backend.get_all_keyring()
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/util/__init__.py", line 20, in wrapper
    func.always_returns = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/backend.py", line 180, in get_all_keyring
    exceptions=TypeError))
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/util/__init__.py", line 29, in suppress_exceptions
    for callable in callables:
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/backend.py", line 172, in is_class_viable
    keyring_cls.priority
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/util/properties.py", line 22, in __get__
    return self.fget.__get__(None, owner)()
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/util/XDG.py", line 18, in wrapper
    return func(*args, **kwargs) * self.multiplier
  File "/usr/lib/python2.7/site-packages/keyring-6.1-py2.7.egg/keyring/backends/kwallet.py", line 134, in priority
    bus = dbus.SessionBus()
  File "/usr/lib64/python2.7/site-packages/dbus/_dbus.py", line 211, in __new__
    mainloop=mainloop)
  File "/usr/lib64/python2.7/site-packages/dbus/_dbus.py", line 100, in __new__
    bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
  File "/usr/lib64/python2.7/site-packages/dbus/bus.py", line 122, in __new__
    bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

FWIW, i'm on CentOS 7

[vagrant@crmpicco ~/www.crmpicco.co.uk]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
@krallin
Copy link
Collaborator

krallin commented Jan 8, 2016

Looks like an issue with the underlying keyring library. I think using the workaround provided in jaraco/keyring#162 might solve your problem as well.

Basically, follow the instructions here, and set up a custom keyring path.

The keyring will be used if you attempt to deploy this site to store your provider credentials.

Let me know if this helps,

Cheers,


This might be something Cactus should perhaps account for (at least by not throwing an error if you weren't going to use the keyring anyway, which is your case). Might be a case of importing keyring inside the functions that use it. I'll have a look.

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