---
title: "JMX - JMX Authentication failed! Invalid username or password"
description: "JMX authentication errors occur when the username or password is invalid or misconfigured. The issue can be resolved by verifying login credentials, selecting the correct password type, and properly configuring JMX remote access and password files."
url: "https://docs.itrsgroup.com/docs/faq/geneos/26063408341405-geneos-jmx-jmx-authentication-failed-invalid-username-or-password/index.html"
---
## Problem

I am setting up JMX authentication but encountering an error in the Active Console:

```
FAIL - Could not connect to service:jmx:rmi:///jndi/rmi://192.168.56.105:5003/jmxrmi. Reason: Invalid username or password
```

![Geneos - JMX - JMX Authentication failed! Invalid username or password](https://docscdn.itrsgroup.com/faq/images/geneos/26063408341405-26063378027933-mceclip0.png)

When validating: [docs.itrsgroup.com/docs/geneos/current/collection/jmx-server/index.html#validating-environment-and-reachability-for-remote-application](https://docs.itrsgroup.com/docs/geneos/current/collection/jmx-server/index.html#validating-environment-and-reachability-for-remote-application)

```
java.lang.SecurityException: Authentication failed! Invalid username or password
at java.management/com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticationFailure(JMXPluggableAuthenticator.java:227)
at java.management/com.sun.jmx.remote.security.JMXPluggableAuthenticator.authenticate(JMXPluggableAuthenticator.java:204)
at jdk.management.agent/sun.management.jmxremote.ConnectorBootstrap$AccessFileCheckerAuthenticator.authenticate(ConnectorBootstrap.java:231)
at java.management.rmi/javax.management.remote.rmi.RMIServerImpl.doNewClient(RMIServerImpl.java:231)
at java.management.rmi/javax.management.remote.rmi.RMIServerImpl.newClient(RMIServerImpl.java:198)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:562)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:796)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:677)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:676)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
at java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:304)
at java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:280)
```

### Possible cause(s)

- **Root Cause 1:** The login credentials you entered (username or password) are incorrect.![Geneos - JMX - JMX Authentication failed! Invalid username or password](https://docscdn.itrsgroup.com/faq/images/geneos/26063408341405-26063408338461-mceclip2.png)

- **Root Cause 2:** The specified password type is incorrect.**![Geneos - JMX - JMX Authentication failed! Invalid username or password](https://docscdn.itrsgroup.com/faq/images/geneos/26063408341405-26063378028061-mceclip3.png)**

- **Root Cause 3:** The username and password are not configured in the JMX remote access and password files.

### Possible solution(s)

- **Solution Root Cause 1:** Ensure that the login details are correct. If you're unsure, verify with the user or team handling the JMX-enabled application.
- **Solution Root Cause 2:** Ensure that you have selected the correct password format. You can check this for more info: <https://docs.itrsgroup.com/docs/geneos/current/security/access-controls/gateway_secure_passwords/index.html>
- **Solution Root Cause 3:** If your JMX-enabled application requires password files and access files to, you must configure these credentials in the `jmxremote.access` and `jmxremote.password` files. For more info: <https://docs.itrsgroup.com/docs/geneos/current/collection/jmx-server/index.html>
  - Validating with correct username and password: Mbeans are displayed

```
user@admin:~/Documents/netprobe/jars$ java -jar geneos-plugins.jar jmx Generic rmi:///jndi/rmi 192.168.56.105 5003 4000 jmxrmi *:* username password
Found 25 managed beans
Dumping managed bean information to standard out... Please wait

Bean#1
ObjectName=java.lang:name=Metaspace,type=MemoryPool

Attributes:
Type=class java.lang.Boolean, Name=Valid, Value=true
Type=class java.lang.String, Name=Name, Value=Metaspace
Type=class java.lang.String, Name=Type, Value=NON_HEAP
Type=class javax.management.openmbean.CompositeDataSupport, Name=Usage, Value=javax.management.openmbean.CompositeDataSupport(compositeType=javax.management.openmbean.CompositeType(name=java.lang.management.MemoryUsage,items=((itemName=committed,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=init,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=max,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=used,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)))),contents={committed=10747904,init=0,max=-1,used=9762680})
Type=class javax.management.openmbean.CompositeDataSupport, Name=PeakUsage, Value=javax.management.openmbean.CompositeDataSupport(compositeType=javax.management.openmbean.CompositeType(name=java.lang.management.MemoryUsage,items=((itemName=committed,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=init,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=max,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)),(itemName=used,itemType=javax.management.openmbean.SimpleType(name=java.lang.Long)))),contents={committed=10747904,init=0,max=-1,used=9762680})
```

Output: Status Ok

![Geneos - JMX - JMX Authentication failed! Invalid username or password](https://docscdn.itrsgroup.com/faq/images/geneos/26063408341405-26063521983389-mceclip4.png)

## Related article(s)

- [https://docs.itrsgroup.com/docs/geneos/curent/collection/jmx-server/index.html](https://docs.itrsgroup.com/docs/geneos/current/collection/jmx-server/index.html)


