[ 
https://issues.apache.org/jira/browse/HADOOP-18585?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

YUBI LEE updated HADOOP-18585:
------------------------------
    Description: 
After HADOOP-16314, WebServlet.java was added. On WebServlet#doGet, it 
redirects '/' to '/index.html'. However, if a client connects to DataNode with 
https scheme, it fails to connect because it responds 302 with Location header 
which has http scheme.

(Hostname is modified.)

{code:java}
$ curl https://dn1.example.com:50475/ -v 2>&1 | grep Location
< Location: http://dn1.example.com:50475/index.html
{code}

I can't ensure that which solution is the best among:

- Use DefaultServlet instead of WebServlet. DataNode can answer with index.html 
when accessed in '/'.
- According to "dfs.http.policy" in hdfs-site.xml, run internal infoserver as 
https or http server each.
- Make redirection on URLDispatcher.java

  was:
After HADOOP-16314, WebServlet.java was added. On WebServlet#doGet, it 
redirects '/' to '/index.html'. However, if a client connects to DataNode with 
https scheme, it fails to connect because it responds 302 with Location header 
which has http scheme.

(Hostname is modified.)

{code:java}
$ curl https://dn1.example.com:50475/ -v 2>&1 | grep Location
< Location: http://dn1.example.com:50475/index.html
{code}

I can't ensure that which solution is the best between:

- Use DefaultServlet instead of WebServlet. DataNode can answer with index.html 
when accessed in '/'.
- According to "dfs.http.policy" in hdfs-site.xml, run internal infoserver as 
https or http server each.



> DataNode's internal infoserver redirects with http scheme, not https when 
> https enabled.
> ----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-18585
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18585
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.3.4
>            Reporter: YUBI LEE
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: HADOOP-18585.patch
>
>
> After HADOOP-16314, WebServlet.java was added. On WebServlet#doGet, it 
> redirects '/' to '/index.html'. However, if a client connects to DataNode 
> with https scheme, it fails to connect because it responds 302 with Location 
> header which has http scheme.
> (Hostname is modified.)
> {code:java}
> $ curl https://dn1.example.com:50475/ -v 2>&1 | grep Location
> < Location: http://dn1.example.com:50475/index.html
> {code}
> I can't ensure that which solution is the best among:
> - Use DefaultServlet instead of WebServlet. DataNode can answer with 
> index.html when accessed in '/'.
> - According to "dfs.http.policy" in hdfs-site.xml, run internal infoserver as 
> https or http server each.
> - Make redirection on URLDispatcher.java



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to