Skip to content

Troubleshooting / Unable to Access This System from the External Network

The system itself is running normally,but it cannot be accessed externally. In most cases,this is caused by network issues.

The specific symptoms are as follows:

  1. Running curl -i http://127.0.0.1:8088 on the deployment server itself returns 302 redirect information:
HTTP
1
2
3
4
5
6
7
8
9
HTTP/1.1 302 Found
Location: /client-app
Vary: Accept
Content-Type: text/plain; charset=utf-8
Content-Length: 33
Date: Wed, 25 Aug 2021 14:23:02 GMT
Connection: keep-alive

Found. Redirecting to /client-app
  1. Running curl http://127.0.0.1:8088/api/v1/do/ping on the deployment server itself returns 200 with normal data:
HTTP
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
HTTP/1.1 200 OK
Vary: Origin, Accept-Encoding
Access-Control-Allow-Credentials: true
X-Trace-Id: TRACE-D2B2A855-3C28-4566-8EC5-5A2EDD85856C
X-Request-Time: 2021-08-25T14:24:00.239Z
X-Response-Time: 2021-08-25T14:24:00.241Z
X-Request-Cost: 2
Content-Type: application/json; charset=utf-8
Content-Length: 192
ETag: W/"c0-Wb2YFtp16lA4mB7Xh7SpYumGNog"
Date: Wed, 25 Aug 2021 14:24:00 GMT
Connection: keep-alive

{"ok":true,"error":200,"message":"","data":"pong","traceId":"TRACE-D2B2A855-3C28-4566-8EC5-5A2EDD85856C","reqTime":"2021-08-25T14:24:00.239Z","respTime":"2021-08-25T14:24:00.241Z","reqCost":2}
  1. Running curl -i http://{server address}:8088 on other devices returns no response or directly returns a connection refusal

Most issues of this type are caused by network problems and are unrelated to DataFlux Func itself.

The following content only records some possible solutions.

1. Incorrect IP / Domain Name Resolution

Try to ping the server where DataFlux Func is located from other devices to confirm whether the IP address and domain name are correct.

This issue can be resolved by modifying the DNS or the /etc/hosts configuration. The specific method depends on the actual network conditions.

1. Incorrect Firewall or Security Configuration

This includes,but is not limited to:

  1. Incorrect firewall configuration
  2. Incorrect Alibaba Cloud ECS security group configuration
  3. Incorrect reverse proxy server or Alibaba Cloud SLB configuration

First,check the ports currently opened for the deployment:

Bash
1
grep '8088' {installation directory}/docker-stack.yaml

The returned content is:

Text Only
1
- "{open port}:8088"

{open port} defaults to 8088

Check and modify the network environment to allow external access to the server port.

1. Conflict Between the Local Network and the Automatically Created Ingress Subnet

You can use the following command to check:

Bash
1
sudo docker network inspect ingress

Check whether the IPAM.Config.Subnet value is the same as the local network:

JSON
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
[
    {
        "Name": "ingress",
        "Id": "adinmn5ww9q3vqo0wbse2jn1s",
        "Created": "2021-08-21T07:46:47.534343555Z",
        "Scope": "swarm",
        "Driver": "overlay",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "10.0.0.0/16",
                    "Gateway": "10.0.0.1"
                }
            ]
        }
    }
]

If they overlap,you can modify the configuration as follows:

  1. Stop DataFlux Func
  2. Delete the existing network: sudo docker network rm ingress
  3. Recreate the network: docker network create --driver overlay --ingress --subnet 10.255.0.0/16 --gateway 10.255.0.1 ingress
  4. Start DataFlux Func

  5. Reference document: Docker Swarm default address pools

  6. Reference document: Custom Docker ingress network configuration

1. Missing Kernel Forwarding Configuration

This issue has been found on CentOS systems,but it has not occurred in most cases.

You can confirm the forwarding configuration as follows:

Bash
1
cat /proc/sys/net/ipv4/ip_forward
  1. If the preceding command returns 1,forwarding is already enabled
  2. Otherwise,you can enable forwarding as follows:
Bash
1
echo 1 > /proc/sys/net/ipv4/ip_forward