When using the Foglight command line interface "fglcmd" in Foglight 7.3 error "Unable to connect to remote server" is displayed when using HTTPS with username/password and "status code: 400" when enabling debug output.
fglcmd.sh -srv foglight.yourdomain.com -port 8443 -ssl -usr foglight -pwd -cmd agent:list -debug
Please enter your password:
Unable to connect to remote server
org.apache.hc.client5.http.HttpResponseException: status code: 400
at org.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler.handleResponse(AbstractHttpClientResponseHandler.java:68)
at org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler.handleResponse(BasicHttpClientResponseHandler.java:72)
at org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler.handleResponse(BasicHttpClientResponseHandler.java:55)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:247)
at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:213)
at com.quest.nitro.tools.cmdline.HttpProxyClientFactory.doLogin(HttpProxyClientFactory.java:206)
at com.quest.nitro.tools.cmdline.HttpProxyClientFactory.getHttpClient(HttpProxyClientFactory.java:96)
at com.quest.nitro.tools.cmdline.CommandLineTool.execute(CommandLineTool.java:355)
at com.quest.nitro.tools.cmdline.CommandLineTool.invoke(CommandLineTool.java:124)
at com.quest.nitro.tools.cmdline.CommandLineTool.main(CommandLineTool.java:112)
The CA certificates have been imported to the Java TrustStore and happens with both the fglcmd tool under $FMS_HOME/bin locally and the one included in $FMS_HOME/tools/fglcmd.zip from a remote machine.
The tool works when using non secure connections (HTTP).
WORKAROUND
Use an authentication token instead of username/password; for example:
fglcmd -srv <server name> -port <port> -ssl -authtoken <token> -cmd <command>
Note: The authentication token for a user can be configured by using the "Set Auth Token" option from the "Users Management" dashboard; for additional information refer to the "Users and Security" section of the Foglight Administration and Configuration Guide.
STATUS
This issues has been identified as defect Id. FOG-10170 and waiting for a fix in a future release of Foglight.
© ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center