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

salt-api fails to start #24654

Closed
joshuacox opened this issue Jun 13, 2015 · 3 comments
Closed

salt-api fails to start #24654

joshuacox opened this issue Jun 13, 2015 · 3 comments
Labels
Question The issue is more of a question rather than a bug or a feature request Salt-API
Milestone

Comments

@joshuacox
Copy link

I'm attempting to get saltpad running inside a docker container here:
https://github.com/joshuacox/docker-salt

I'm getting this error though when trying to start the api:

# salt-api -l trace        
[DEBUG   ] Reading configuration from /etc/salt/master
[TRACE   ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG   ] Configuration file path: /etc/salt/master
[DEBUG   ] Created pidfile: /var/run/salt-api.pid
[ERROR   ] An un-handled exception was caught by salt's global exception handler:
AttributeError: 'module' object has no attribute '_create_loader'
Traceback (most recent call last):
  File "/usr/local/bin/salt-api", line 11, in <module>
    main()
  File "/usr/local/bin/salt-api", line 8, in main
    sapi.run()
  File "/usr/local/lib/python2.7/dist-packages/saltapi/cli.py", line 67, in run
    client.run()
  File "/usr/local/lib/python2.7/dist-packages/saltapi/client.py", line 23, in run
    netapi = saltapi.loader.netapi(self.opts)
  File "/usr/local/lib/python2.7/dist-packages/saltapi/loader.py", line 16, in netapi
    load = salt.loader._create_loader(
AttributeError: 'module' object has no attribute '_create_loader'
Traceback (most recent call last):
  File "/usr/local/bin/salt-api", line 11, in <module>
    main()
  File "/usr/local/bin/salt-api", line 8, in main
    sapi.run()
  File "/usr/local/lib/python2.7/dist-packages/saltapi/cli.py", line 67, in run
    client.run()
  File "/usr/local/lib/python2.7/dist-packages/saltapi/client.py", line 23, in run
    netapi = saltapi.loader.netapi(self.opts)
  File "/usr/local/lib/python2.7/dist-packages/saltapi/loader.py", line 16, in netapi
    load = salt.loader._create_loader(
AttributeError: 'module' object has no attribute '_create_loader'

All info necessary should be in the repo, for example the master salt config:
https://github.com/joshuacox/docker-salt/blob/master/salt/master

anyone should be able to replicate my results by runing ./build && ./run in the root of that repo (given you have docker installed).

@eversor1
Copy link

This is happening to me as well after an upgrade. No docker.

@whiteinge
Copy link
Contributor

That exception file path is for last stand-alone release of salt-api, from before the project was merged into mainline Salt. You may have both installed. How are you installing Salt?

If you're installing via Pip, there is no need to install salt-api in addition, it now ships with Salt. If you're installing via OS packages, what OS are you on? Some distros (CentOS, Ubuntu) have split packages which confuses things a tad.

If salt-api --version runs successfully the version should begin with "2014" or "2015". If it doesn't you have an old version installed.

@whiteinge whiteinge added Question The issue is more of a question rather than a bug or a feature request Salt-API labels Jun 15, 2015
@whiteinge whiteinge added this to the Blocked milestone Jun 15, 2015
@joshuacox
Copy link
Author

interesting, rebuilding today

root@d99dc580d653:~# salt-api --version
salt-api 2015.5.0
root@d99dc580d653:~# netstat -ntpl|grep 8000
tcp        0      0 127.0.0.1:8000          0.0.0.0:*               LISTEN      119/python 

I'm on the same commit as friday:

# git log -n1
commit e6bd112100bba0b617e522fc8f8e35b57ffc8344
Author: Josh Cox <josh@webhosting.coop>
Date:   Fri Jun 12 19:26:32 2015 -0500

    apt salt-api

and using the ppa repo for salt, which in answer to @whiteinge that commit is using the apt install of salt not pip. Also, the OS is trusty:

grep FROM Dockerfile 
FROM ubuntu:14.04

@eversor1 are you still experiencing the same issue? Feel free to re-open (or perhaps start a new issue as it does sound as if yours might be unrelated), if you do, but it appears my issue has gone away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question The issue is more of a question rather than a bug or a feature request Salt-API
Projects
None yet
Development

No branches or pull requests

3 participants