[fix](FQDN)fix Checkpoint error (#19678)
Must use Env.getServingEnv() instead of getCurrentEnv(),because here we need to obtain selfNode through the official service catalog.
This commit is contained in:
@ -31,7 +31,9 @@ public class HttpURLUtil {
|
||||
public static HttpURLConnection getConnectionWithNodeIdent(String request) throws IOException {
|
||||
URL url = new URL(request);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
HostInfo selfNode = Env.getCurrentEnv().getSelfNode();
|
||||
// Must use Env.getServingEnv() instead of getCurrentEnv(),
|
||||
// because here we need to obtain selfNode through the official service catalog.
|
||||
HostInfo selfNode = Env.getServingEnv().getSelfNode();
|
||||
conn.setRequestProperty(Env.CLIENT_NODE_HOST_KEY, selfNode.getHost());
|
||||
conn.setRequestProperty(Env.CLIENT_NODE_PORT_KEY, selfNode.getPort() + "");
|
||||
return conn;
|
||||
|
||||
@ -71,7 +71,7 @@ public class MetaService extends RestBaseController {
|
||||
|
||||
Frontend fe = Env.getCurrentEnv().checkFeExist(clientHost, clientPort);
|
||||
if (fe == null) {
|
||||
LOG.warn("request is not from valid FE. client: {}", clientHost);
|
||||
LOG.warn("request is not from valid FE. client: {}, {}", clientHost, clientPortStr);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user