When using the Gurobi Cluster Manager, you might receive the error "Unauthorized access". This error indicates that there is a problem with the method of authentication used to connect to the Cluster Manager.
Node registration
You may observe the following warning in the logs: warn : Manager registration failed, will retry...: Unauthorized access. This shows the Compute Server (CS) node is not able to authenticate to the Cluster Manager while registering. Please note this uses the cluster token, which is a property in the configulation file. All the CS nodes and Cluster Managers must have the same value. For more information, kindly refer to the section Connecting Nodes of our Reference Manual for Gurobi Remote Services.
Username/password authentication
When using a username and password to authenticate with the Cluster Manager, a temporary web token that is valid for eight hours is assigned to the user. After eight hours have elapsed, the Cluster Manager session will end and the solver could suddenly terminate with an Unauthorized access error.
API key authentication
For a more secure and reliable way to authenticate with the Cluster Manager, Gurobi highly recommends using an API key. With this authentication approach, an Unauthorized access error indicates that the API key is invalid.
Database not accessible
If you've confirmed that the username-password tuple or API key is valid, the next likely culprit is the database. The Cluster Manager relies on a database system to manage authentication and cluster state, and database connectivity issues will trigger downstream "Unauthorized Access" errors for client connections.
To troubleshoot this:
- Verify the database service is running on the Cluster Manager machine.
- Confirm the database is listening on the intended port.
- Check for disk space issues, as the database requires sufficient free space to operate.
- Review the database logs for errors, such as:
- Disk space errors: "No space left on device"
- Permission errors
- Crash information
- Port binding issues
- Restart the database service if it's stopped or in a failed state.
- Test the database connection manually to confirm accessibility.
- Restart the Cluster Manager once the database is confirmed to be running and accessible.
- Test the client connection again—the "Unauthorized Access" error should resolve if the credentials are valid and the database is operational.
Further information