[ https://issues.apache.org/jira/browse/IGNITE-23459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Polozhaev updated IGNITE-23459: ------------------------------------- Description: When you try to connect with ./controll.sh and if --user argument presented there is a triple connection with logging WARNING before requesting a password {code:java} WARNING: Failed to shutdown socket java.nio.channels.ClosedChannelException at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:195) at java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:1113) at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:399) at org.apache.ignite.internal.util.IgniteUtils.close(IgniteUtils.java:4372) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.closeKey(GridNioServer.java:2802) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2853) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2812) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2158) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1910) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) at java.base/java.lang.Thread.run(Thread.java:840) Oct 16, 2024 1:35:29 AM org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection close INFO: Client TCP connection closed: /127.0.0.1:11211 Oct 16, 2024 1:35:30 AM org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection close INFO: Client TCP connection closed: /127.0.0.1:11211 Oct 16, 2024 1:35:31 AM org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection close INFO: Client TCP connection closed: /127.0.0.1:11211 This cluster requires authentication. password: {code} It's better to request password before trying to connect to the server The problem was that the password was interactively requested only when neither the username nor the password arguments were provided, and if only the password argument was missing, a connection to the server without a password would occur three times, with corresponding WARNING entries being logged. A _sensitive_ trigger has been added to the _@Argument_ annotation for {_}CLIArgument{_}, which interactively requests sensitive data. Now, when entering a command such as _./control.sh_ with an argument but without specifying its value, and this argument is marked as sensitive, a console prompt is immediately executed before attempting to connect to the server. was: When you try to connect with ./controll.sh and if --user argument presented there is a triple connection with logging WARNING before requesting a password {code:java} WARNING: Failed to shutdown socket java.nio.channels.ClosedChannelException at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:195) at java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:1113) at java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:399) at org.apache.ignite.internal.util.IgniteUtils.close(IgniteUtils.java:4372) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.closeKey(GridNioServer.java:2802) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2853) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2812) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2158) at org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1910) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) at java.base/java.lang.Thread.run(Thread.java:840) Oct 16, 2024 1:35:29 AM org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection close INFO: Client TCP connection closed: /127.0.0.1:11211 Oct 16, 2024 1:35:30 AM org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection close INFO: Client TCP connection closed: /127.0.0.1:11211 Oct 16, 2024 1:35:31 AM org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection close INFO: Client TCP connection closed: /127.0.0.1:11211 This cluster requires authentication. password: {code} It's better to request password before trying to connect to the server > Unnecessary connections before requesting a password when using ./control.sh > ---------------------------------------------------------------------------- > > Key: IGNITE-23459 > URL: https://issues.apache.org/jira/browse/IGNITE-23459 > Project: Ignite > Issue Type: Task > Reporter: Denis Polozhaev > Assignee: Denis Polozhaev > Priority: Minor > Labels: ise > Fix For: 2.18 > > Time Spent: 2h 20m > Remaining Estimate: 0h > > When you try to connect with ./controll.sh and if --user argument presented > there is a triple connection with logging WARNING before requesting a password > {code:java} > WARNING: Failed to shutdown socket > java.nio.channels.ClosedChannelException > at > java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:195) > at > java.base/sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:1113) > at > java.base/sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:399) > at > org.apache.ignite.internal.util.IgniteUtils.close(IgniteUtils.java:4372) > at > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.closeKey(GridNioServer.java:2802) > at > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2853) > at > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.close(GridNioServer.java:2812) > at > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.bodyInternal(GridNioServer.java:2158) > at > org.apache.ignite.internal.util.nio.GridNioServer$AbstractNioClientWorker.body(GridNioServer.java:1910) > at > org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) > at java.base/java.lang.Thread.run(Thread.java:840) > Oct 16, 2024 1:35:29 AM > org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection > close > INFO: Client TCP connection closed: /127.0.0.1:11211 > Oct 16, 2024 1:35:30 AM > org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection > close > INFO: Client TCP connection closed: /127.0.0.1:11211 > Oct 16, 2024 1:35:31 AM > org.apache.ignite.internal.client.impl.connection.GridClientNioTcpConnection > close > INFO: Client TCP connection closed: /127.0.0.1:11211 > This cluster requires authentication. > password: > {code} > It's better to request password before trying to connect to the server > > The problem was that the password was interactively requested only when > neither the username nor the password arguments were provided, and if only > the password argument was missing, a connection to the server without a > password would occur three times, with corresponding WARNING entries being > logged. > A _sensitive_ trigger has been added to the _@Argument_ annotation for > {_}CLIArgument{_}, which interactively requests sensitive data. Now, when > entering a command such as _./control.sh_ with an argument but without > specifying its value, and this argument is marked as sensitive, a console > prompt is immediately executed before attempting to connect to the server. -- This message was sent by Atlassian Jira (v8.20.10#820010)