Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Network Error issue when login saltpad #182

Open
clemyp opened this issue Aug 24, 2016 · 2 comments
Open

Network Error issue when login saltpad #182

clemyp opened this issue Aug 24, 2016 · 2 comments

Comments

@clemyp
Copy link

clemyp commented Aug 24, 2016

when using saltpad from a browser i get network error.

in salt master:

rest_cherrypy:
  port: 8000
  host: 127.0.0.1
  disable_ssl: true

in settings.json:

{
    "API_URL": "127.0.0.1:8000",
    "SECURE_HTTP": false,
    "templates": {
        "basic": {
            "description": "Basic template",
            "matcher": "glob",
            "target": "*",
            "moduleFunction": "test.fib",
            "arguments": {
                "num": 10
            }
        },

        "version": {
            "description": "Basic version",
            "matcher": "glob",
            "target": "Celeste",
            "moduleFunction": "test.version",
            "arguments": {}
        }
    },
    "EAUTH": "pam",
    "FLAVOUR": "rest_cherrypy",
    "PATH_PREFIX": "/"
}

also when testing using curl on the server where saltpad is installed, i cannot use the dns name to check, it has to be 127.0.0.1 (curl -i -H accept=application/json -d username=username -d password=password -d eauth=pam http://127.0.0.1:8000/login)

this is even when I change below to be the same as the dns name

@clemyp
Copy link
Author

clemyp commented Aug 25, 2016

salt-api --version
salt-api 2016.3.1 (Boron)

salt-master --version
salt-master 2016.3.1 (Boron)

@Lothiraldan
Copy link
Owner

Hi @clemyp,

when configuring your salt-api to listen on 127.0.0.1, it will effectively only listen on local connection only (same host, your laptop, desktop or server). You may want to put a nginx or apache in front of salt-api, then you will be able to use the configured dns to speak with the salt-api. Don't forget to change the API_URL value too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants