Updated on 2022-11-14 GMT+08:00

Incorrect Registry Center Address

Description

When Spring Cloud Huawei is used, the following error is displayed during microservice startup:
send request to https://192.168.10.1:30100/v4/default/registry/microservices failed and retry to https://192.168.10.1:30100/v4/default/registry/microservices once.
org.apache.http.conn.HttpHostConnectException: Connect to 192.168.10.1:30100 [/127.0.0.2] failed: Connection refused: connect
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.13.jar:4.5.13]

Analysis

The error is reported when the microservice registry center address is unavailable.

Solutions

  • Start the service and deploy it on the local host
    On the local host, run the curl https://IP address of the registry center:30100/health command to check the working status of the registry center. Check whether information similar to the following is displayed:
    curl: Failed to connect to xxx.xxx.xxx.xxx port 30100: Connection refused

    If yes, check whether the network is disconnected because the IP address or port number of the registry center is incorrect or the network is isolated.

  • Start service deployment on the microservice engine on the cloud

    The microservice is deployed on the microservice engine through ServiceStage. The registry center address can be automatically injected using environment variables. Check whether the address of the injected registry center is correct. If no, correct it and deploy the service again.