[
https://issues.apache.org/jira/browse/DERBY-4786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905597#action_12905597
]
Mamta A. Satoor commented on DERBY-4786:
----------------------------------------
It appears that the sole pupose of protocol mismatch error thrown by the server
is for logging purposed on it's end. That exception never makes it to the
client. What client gets is the generic exception as follows
Invalid reply header from network server: Invalid string Plaintext connection
attempt to an SSL enabled server?
Note that there is no error code associated with the exception that I could see
in my debugging.
So with the current approach for this jira, we were thinking of sending the
shutdown with protocol level 2 and if there is protcol mismatch exception, then
try it again with protocol level 1. Since there is no way to know that the
exception received is for protocol mismatch and no error code either, I was
thinking of doing a string search of "Plaintext connection attempt to an SSL
enabled server" into exception's message. I do not like this string searching
but I wonder what alternative way can we use to know that the protocol level 2
failed and hence tried 1. Another possible thing could be to try shutdown with
level 2 and catch the exception and don't worry about what kind of exception it
is, just go ahead and try protocol level 1. If there is exception with that
too, we will just let the existing code take care of it the way it does today.
Also, another outstanding issue was what if user has provided user name and
password and protocol level 2 fails, then should we still try protocol level 1
with no user password and password?
Would appreciate any feedback.
> Shutdown command without username and password should work with mixed client
> and network server releases.
> ---------------------------------------------------------------------------------------------------------
>
> Key: DERBY-4786
> URL: https://issues.apache.org/jira/browse/DERBY-4786
> Project: Derby
> Issue Type: Bug
> Components: Network Client, Network Server
> Affects Versions: 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.6.1.0
> Reporter: Mamta A. Satoor
> Assignee: Mamta A. Satoor
> Attachments: DERBY4786_patch1_diff.txt
>
>
> DERBY-2109 introduced optional parameters username and password to the
> shutdown command. But with this fix, the existing shutdown command which does
> not use username and password stopped working from client with DERBY-2109
> changes against a network server without DERBY-2109 changes.
> This jira is to ensure that existing shutdown command without user name and
> password still works fine between different releases of client and network
> server(with or without DERBY-2109). The new shutdown command introduced by
> DERBY-2109 will work obviosuly only on client and server with DERBY-2109
> changes. For client/server not with DERBY-2109 changes attempting to user use
> name and password will get an error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.