Cloud Connect - 401 & 403 Errors
-
Hello,
I currently have 4 clients connected to server and showing in the connected client page (/ui/administration/cloud-connect-clients). Launching the web interface from this page points to http://GUID.subdomain.domain:8080, where I receive a Proxy error 401 Not authenticated.
Proxy enabled on the server and configured with these options checked: Require authentication, Inject authentication token, and Sync user from server to client.
When disabling Require authentication I receive a Proxy error 403 Not authenticated when launching.
Should Fixed Authentication Token be used? Are changes to the env.properties file required? Thank you
-
@wingnut2-0 said in Cloud Connect - 401 & 403 Errors:
Should Fixed Authentication Token be used? Are changes to the env.properties file required? Thank you
Yes, you need to set these, Note the dot in front of the domain, it is important.
sessionCookie.useGuid=true sessionCookie.domain=.subdomain.domain
@wingnut2-0 said in Cloud Connect - 401 & 403 Errors:
Should Fixed Authentication Token be used?
Generally no. When you have "Inject authentication token" checked the cloud connect module will automatically obtain an authentication token for the current user (logged into the server) and inject that in the HTTP headers.
-
Thank you, Jared.
When I add this with appropriate domain to the env.properties file of either the client or server and restart mango, I am no longer able to login to the mango instance as I normally would via HTTP://IPaddress:8080.
-
This should be added to the server's env,properties. No changes are needed on the server.
@wingnut2-0 said in Cloud Connect - 401 & 403 Errors:
I am no longer able to login to the mango instance as I normally would via HTTP://IPaddress:8080.
Correct. You should access Mango via your subdomain.domain domain after making this change.
-
Now I am getting the 401 when accessing via subdomain.domain.
-
After resolving some DNS issues, I am now able to connect back to 3 of the 4 clients. When attempting to connect to the 4th I receive a 502 Bad Gateway error. The only difference between the clients is that the 4th is a MangoES.
Are there any ES specific settings required?
Thank you.
-
@Wingnut2-0 Has anyone advised you on how this module works or how to set it up? There is not really any documentation provided for it yet (it was released in 3.5.0 as a last minute decision).
If this is set on the server
sessionCookie.domain=.subdomain.domain
Then you should be able to access mango via
http://subdomain.domain:8080/
without a problem provided subdomain.domain resovles to your Mango instance's IP address. -
@wingnut2-0 said in Cloud Connect - 401 & 403 Errors:
After resolving some DNS issues, I am now able to connect back to 3 of the 4 clients. When attempting to connect to the 4th I receive a 502 Bad Gateway error. The only difference between the clients is that the 4th is a MangoES.
Are there any ES specific settings required?Ah ok great. No, there are no specific settings required for a MangoES. Is the connection flaky at all?
-
I'd suggest checking your logs on the client and the server if you still can't get it to work. As well as checking your browser console and network requests.
If there's nothing in your ma.log file, copy the log4j2.xml file from classes into /overrides/classes/log4j2.xml and add these lines under
<Loggers>
<AsyncLogger includeLocation="true" name="com.infiniteautomation.mango.cloudConnect" level="debug"/> <AsyncLogger includeLocation="true" name="org.eclipse.jetty.proxy" level="debug"/>
-
Thank you, Jared. This has been resolved.
The issue was wrong port numbers on the Cloud connect -> Client settings.
For the MangoES the ports need to be changed to match the defaults or whatever you may have changed them to.- Web forward port
- SSH forward port
-
By default the client should forward port 22 for SSH which you will need to change to 2222 for a MangoES yes.
The web port should default to forwarding the non-SSL web port from the env.properties file however.