You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sh...@apache.org on 2018/05/10 05:21:27 UTC
ignite git commit: IGNITE-8439: user-specified IGNITE_JETTY_HOST
doesn't work. - Fixes #3948.
Repository: ignite
Updated Branches:
refs/heads/master 0270e5d3d -> ecc18537f
IGNITE-8439: user-specified IGNITE_JETTY_HOST doesn't work. - Fixes #3948.
Signed-off-by: shroman <rs...@yahoo.com>
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/ecc18537
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/ecc18537
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/ecc18537
Branch: refs/heads/master
Commit: ecc18537f50ef40847c6e42a1648a2c21204eccd
Parents: 0270e5d
Author: shroman <rs...@yahoo.com>
Authored: Thu May 10 14:20:41 2018 +0900
Committer: shroman <rs...@yahoo.com>
Committed: Thu May 10 14:20:41 2018 +0900
----------------------------------------------------------------------
.../rest/protocols/http/jetty/GridJettyRestProtocol.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/ecc18537/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
----------------------------------------------------------------------
diff --git a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
index 9caadf4..11c0eb6 100644
--- a/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
+++ b/modules/rest-http/src/main/java/org/apache/ignite/internal/processors/rest/protocols/http/jetty/GridJettyRestProtocol.java
@@ -120,17 +120,15 @@ public class GridJettyRestProtocol extends GridRestProtocolAdapter {
@Override public void start(GridRestProtocolHandler hnd) throws IgniteCheckedException {
assert ctx.config().getConnectorConfiguration() != null;
- InetAddress locHost;
+ String jettyHost = System.getProperty(IGNITE_JETTY_HOST, ctx.config().getLocalHost());
try {
- locHost = U.resolveLocalHost(ctx.config().getLocalHost());
+ System.setProperty(IGNITE_JETTY_HOST, U.resolveLocalHost(jettyHost).getHostAddress());
}
catch (IOException e) {
- throw new IgniteCheckedException("Failed to resolve local host to bind address: " + ctx.config().getLocalHost(), e);
+ throw new IgniteCheckedException("Failed to resolve host to bind address: " + jettyHost, e);
}
- System.setProperty(IGNITE_JETTY_HOST, locHost.getHostAddress());
-
jettyHnd = new GridJettyRestHandler(hnd, new C1<String, Boolean>() {
@Override public Boolean apply(String tok) {
return F.isEmpty(secretKey) || authenticate(tok);