[ 
https://issues.apache.org/jira/browse/KNOX-2099?focusedWorklogId=341318&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-341318
 ]

ASF GitHub Bot logged work on KNOX-2099:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Nov/19 14:36
            Start Date: 11/Nov/19 14:36
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on pull request #189: KNOX-2099 - 
Using the default port of the protocol when no port is declared in the URL when 
building truststore.
URL: https://github.com/apache/knox/pull/189
 
 
   ## What changes were proposed in this pull request?
   
   Using the default port of the protocol when no port is declared in the URL 
when building truststore
   
   ## How was this patch tested?
   
   Added new unit test cases as well as tested manually:
   ```
   $ bin/knoxshell.sh buildTrustStore https://localhost
   Opening connection to localhost:443...
   org.apache.knox.gateway.shell.KnoxShellException: Error while building trust 
store
        at 
org.apache.knox.gateway.shell.KnoxSh$KnoxBuildTrustStore.execute(KnoxSh.java:194)
        at org.apache.knox.gateway.shell.KnoxSh.run(KnoxSh.java:85)
        at org.apache.knox.gateway.shell.KnoxSh.main(KnoxSh.java:393)
        at org.apache.knox.gateway.shell.Shell.main(Shell.java:70)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.apache.knox.gateway.launcher.Invoker.invokeMainMethod(Invoker.java:68)
        at org.apache.knox.gateway.launcher.Invoker.invoke(Invoker.java:39)
        at org.apache.knox.gateway.launcher.Command.run(Command.java:99)
        at org.apache.knox.gateway.launcher.Launcher.run(Launcher.java:75)
        at org.apache.knox.gateway.launcher.Launcher.main(Launcher.java:52)
   Caused by: java.net.ConnectException: Connection refused (Connection refused)
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 341318)
    Time Spent: 0.5h  (was: 20m)

> knoxshell buildTrustStore doesn't work on a url without a port
> --------------------------------------------------------------
>
>                 Key: KNOX-2099
>                 URL: https://issues.apache.org/jira/browse/KNOX-2099
>             Project: Apache Knox
>          Issue Type: Bug
>          Components: KnoxShell
>    Affects Versions: 1.3.0
>            Reporter: Kevin Risden
>            Assignee: Sandor Molnar
>            Priority: Major
>              Labels: beginner
>             Fix For: 1.4.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> knoxshell buildTrustStore doesn't work on a url without a port
> {code:java}
> ./bin/knoxshell.sh buildTrustStore https://knox_host
> Opening connection to knoxhost:-1...
> org.apache.knox.gateway.shell.KnoxShellException: Error while building trust 
> store
>       at 
> org.apache.knox.gateway.shell.KnoxSh$KnoxBuildTrustStore.execute(KnoxSh.java:194)
>       at org.apache.knox.gateway.shell.KnoxSh.run(KnoxSh.java:85)
>       at org.apache.knox.gateway.shell.KnoxSh.main(KnoxSh.java:392)
> Caused by: java.lang.IllegalArgumentException: port out of range:-1
>       at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
>       at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
>       at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:423)
>       at 
> sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
>       at 
> org.apache.knox.gateway.shell.KnoxSh$KnoxBuildTrustStore.fetchPublicCertsFromGatewayServer(KnoxSh.java:209)
>       at 
> org.apache.knox.gateway.shell.KnoxSh$KnoxBuildTrustStore.execute(KnoxSh.java:186)
>       ... 2 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to