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

Docker - 401 Unauthorized at 9088 port #84

Open
idanam-del opened this issue May 8, 2023 · 4 comments
Open

Docker - 401 Unauthorized at 9088 port #84

idanam-del opened this issue May 8, 2023 · 4 comments

Comments

@idanam-del
Copy link

idanam-del commented May 8, 2023

Hey, im using the docker from example directory as follows

proxy-config.js

var config = {
        debug: true,
        apiUrl: 'http://host-ip:9080',
        apiSess: 'http://host-ip:9080/api/v3/auth',
        apiAuthJWT: true,
        apiUser: 'admin',
        apiPass: 'pass',
        timeOut: 1800, // seconds
        proxyHost: '0.0.0.0',
        proxyPort: 8765
};

module.exports = config;

and default view-config.js as placed in example directory

const ENV = "DEV";
const DEBUGGING = true;

const configs = {
  DEV: {
    env: "DEV",
    debugging: DEBUGGING,
    serverUrl: "http://"+ window.location.hostname +":8765/api/v3/"
  },
  UI: {
    availableTabs: ["messages", "flow", "qos", "logs", "export"]
  }
};

export default configs;

First of all the opened ports are 8765 and 9088

8765 is working fine

9088 shows this
image
and in web console says 401 unauthorized and "login required"

@lmangani
Copy link
Member

lmangani commented May 8, 2023

You should look at the request the proxy posts to the actual HOMER API and investigate the real fault there.
The 401 would suggest no JWT token could be obtained with the provided authentication.

@idanam-del
Copy link
Author

You should look at the request the proxy posts to the actual HOMER API and investigate the real fault there. The 401 would suggest no JWT token could be obtained with the provided authentication.

How can i do that? When i access the proxy from 8765 its working fine, and when i access the viewer the logs i see from the docker-compose doesn't alert on any issues

@idanam-del
Copy link
Author

When i access from 8765 the port of the proxy its requires me to login and then shows me the home dashboard

When i access from 9088 the port of the viewer, from tcpdump i can see the viewer is not even using the proxy and try to access with itself to homer with port 9088

@idanam-del
Copy link
Author

idanam-del commented May 10, 2023

I think there is a configuration problem with my view-config.js

Is this a correct configuration?

const ENV = "DEV";
const DEBUGGING = true;

const configs = {
  DEV: {
    env: "DEV",
    debugging: DEBUGGING,
    serverUrl: "http://proxyhost-ip:8765/api/v3/"
  },
  UI: {
    availableTabs: ["messages", "flow", "qos", "logs", "export"]
  }
};

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