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 #166

Open
meagon opened this issue May 20, 2016 · 6 comments
Open

Network Error issue when login saltpad #166

meagon opened this issue May 20, 2016 · 6 comments

Comments

@meagon
Copy link

meagon commented May 20, 2016

I got Network Error when Login Salt-pad

@seamus-45
Copy link

seamus-45 commented May 20, 2016

I suspect that you should install git version of salt with CORS support, and configure salt api as documented:

rest_tornado:
  port: 5417
  host: 127.0.0.1
  disable_ssl: true
  websockets: True
  cors_origin: '*'

@Lothiraldan
Copy link
Owner

Hi @meagon are you sure the salt-api is accessible from the computer your browser is running on?
Could you follow the debug instructions here https://github.com/Lothiraldan/saltpad/blob/master/docs/debug.md to see if its helps?
If it still fails, could you please give us the version of saltpad, salt-master and salt-api + salt-api configuration, it will help us debug your problem.

@meagon
Copy link
Author

meagon commented May 22, 2016

my Salt_API --version

salt-api --version
salt-api 2016.3.0-572-g9f42882 (Boron)

AND salt-master configuration

rest_cherrypy:
  debug: True
  disable_ssl: True
  port: 8000
  host: 0.0.0.0
  cors_origin: '*'
  static: /code/static
  static_path: /static
  app: /code/index.html
  app_path: /saltpad
  websockets: True


rest_tornado:
  debug: True
  disable_ssl: True
  port: 5417
  host: 0.0.0.0
  websockets: True
  cors_origin: '*'
  webhook_disable_auth: False

it all debug ok with command line curl ...

when i login in use firefox:
it shows me Network Error

firefox Login
Uploading Screenshot from 2016-05-22 10:06:14.png…

@meagon meagon closed this as completed May 22, 2016
@meagon meagon reopened this May 22, 2016
@Lothiraldan
Copy link
Owner

@meagon Could you check your browser console for any error which could gives me more information about the error?

@thejlyons
Copy link

@Lothiraldan I have the same error. Looking at the console it shows "Failed to load resource: net::ERR_CONNECTION_REFUSED" because it's trying to connect to http://localhost:5417/login instead of the domain I have open in the browser. I'm not sure if that is the same issue that @meagon is having, though, since the screenshot shows the browser opened to 127.0.0.1:3334

@thejlyons
Copy link

I changed the API_URL in settings.json and now it gives me this error:
XMLHttpRequest cannot load http://127.0.0.1:5417/login. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1' is therefore not allowed access. The response had HTTP status code 405.

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

4 participants