Search code examples
authenticationignitegridgainsqlline

Not able to login to SQL with a newly created username/password in Ignite


I've created a user with a given name/password via SQL connectivity in Ignite. When trying to connect it is failing with below error. I have reset the password twice but still not able to login.

Error: Authentication doesn't support by remote server[driverProtocolVer=ClientListenerProtocolVersion [major=2, minor=7, maintenance=0], remoteNodeProtocolVer=ClientListenerProtocolVersion [major=0, minor=0, maintenance=0], err=The user name or password is incorrect [userName=ignitetest], url=jdbc:ignite:thin://lvenignapp001u.enbduat.com:10800/PUBLIC] (state=08004,code=0)
java.sql.SQLException: Authentication doesn't support by remote server[driverProtocolVer=ClientListenerProtocolVersion [major=2, minor=7, maintenance=0], remoteNodeProtocolVer=ClientListenerProtocolVersion [major=0, minor=0, maintenance=0], err=The user name or password is incorrect [userName=ignitetest], url=jdbc:ignite:thin://lvenignapp001u.enbduat.com:10800/PUBLIC]
        at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.handshake(JdbcThinTcpIo.java:377)
        at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.start(JdbcThinTcpIo.java:224)
        at org.apache.ignite.internal.jdbc.thin.JdbcThinTcpIo.start(JdbcThinTcpIo.java:145)
        at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.ensureConnected(JdbcThinConnection.java:150)
        at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.<init>(JdbcThinConnection.java:137)
        at org.apache.ignite.IgniteJdbcThinDriver.connect(IgniteJdbcThinDriver.java:155)
        at sqlline.DatabaseConnection.connect(DatabaseConnection.java:156)
        at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:204)
        at sqlline.Commands.close(Commands.java:907)
        at sqlline.Commands.quit(Commands.java:871)
        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 sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)
        at sqlline.SqlLine.dispatch(SqlLine.java:791)
        at sqlline.SqlLine.begin(SqlLine.java:668)
        at sqlline.SqlLine.start(SqlLine.java:373)
        at sqlline.SqlLine.main(SqlLine.java:265)

Solution

  • You will have to enclose the username in quotes in the SQL query

    CREATE USER "test" WITH PASSWORD 'test'; -- user will be created as test

    CREATE USER test WITH PASSWORD 'test'; -- user will be created as TEST - all uppercase

    Please make sure you are using appropriate case in the username when you enter the credentials for connection.

    Credits to original answer here: http://apache-ignite-users.70518.x6.nabble.com/Ignite-user-create-modify-trouble-tp21861p21887.html