David Lopez
David Lopez

Reputation: 83

I can't use salt-api

I'm trying to use salt-api but I can't connect to it. First, I installed salt-api in the master, then I added the following configuration to the master file:

external_auth:
  pam:
    david:
      - .*

rest_cherrypy:
  port: 8080
  debug: True

But when I tried to connect via curl, it didn't work:

curl -si localhost:8080/login -H "Accept: application/json" -d username='david' -d password='password' -d eauth='pam' > /tmp/cookies.txt

I got the following error message:

curl: (7) Failed to connect to localhost port 8080: Connection refused

Upvotes: 1

Views: 642

Answers (1)

number5
number5

Reputation: 16443

First you need to make sure salt-api service is running.

You can do by running it in the foreground for testing/debug like:

salt-api -l debug

Try this and update your question if still have issues

Upvotes: 3

Related Questions