Skip to content

Unable to connect networkQuality server from my client machine #33

@sfc-gh-bnadar

Description

@sfc-gh-bnadar

Hi Team,

  1. We have swift server installed and Network Quality service running on it
    ~/server/swift$ ./.build/release/networkQualityd --cert-file cert.pem --key-file key.pem --https-port 4043 --public-name x.x.x.x
    2025-01-23T10:43:41+0000 info com.example.networkqualityd.main : [networkQualityd] h2 Listening at [IPv4]127.0.0.1/127.0.0.1:4043
    2025-01-23T10:43:41+0000 info com.example.networkqualityd.main : [networkQualityd] http Listening at [IPv4]127.0.0.1/127.0.0.1:4040
    2025-01-23T10:43:41+0000 info com.example.networkqualityd.main : [networkQualityd] Network Quality URL: https://x.x.x.x:4043/config

  2. However, the server is resetting the connection while initiating a networkQuality command from the client machine
    bnadar@GJM7HFPFDJ Downloads % networkQuality -C https://x.x.x.x:4043/config
    ==== SUMMARY ====
    Error: Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={_kCFStreamErrorCodeKey=61, NSUnderlyingError=0x600000e2d380 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: utun4, ipv4, dns, _kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <1FF8C8CD-063A-418C-9813-33588D25B693>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <1FF8C8CD-063A-418C-9813-33588D25B693>.<1>"
    ), NSLocalizedDescription=Could not connect to the server., NSErrorFailingURLStringKey=https://x.x.x.x:4043/config, NSErrorFailingURLKey=https://x.x.x.x:4043/config, _kCFStreamErrorDomainKey=1}

  3. We could see the localhost is listening on port 4043
    :~$ sudo netstat -tuln | grep 4043
    tcp 0 0 127.0.0.1:4043 0.0.0.0:* LISTEN

  4. As per pcap, we could the ubuntu machine is refusing the connection
    $ sudo tcpdump -n port 4043
    tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
    listening on enX0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
    10:51:12.862246 IP 10.10.192.11.52695 > 10.10.9.105.4043: Flags [S], seq 1747948630, win 65535, options [mss 1320,nop,wscale 6,nop,nop,TS val 1453140777 ecr 0,sackOK,eol], length 0
    10:51:12.862284 IP 10.10.9.105.4043 > 10.10.192.11.52695: Flags [R.], seq 0, ack 1747948631, win 0, length 0
    10:51:16.870166 IP 10.10.192.11.52696 > 10.10.9.105.4043: Flags [S], seq 237598270, win 65535, options [mss 1320,nop,wscale 6,nop,nop,TS val 2391995564 ecr 0,sackOK,eol], length 0
    10:51:16.870205 IP 10.10.9.105.4043 > 10.10.192.11.52696: Flags [R.], seq 0, ack 237598271, win 0, length 0

  5. In addition, we have allowed port 4043 in SG of AWS as well. We tried to telnet the ubuntu machine on port 4043 but the connection is getting refused from my MAC.

6.We are unable to telnet the server IP from local server as well
$ telnet x.x.x.x 4043
Trying x.x.x.x...
telnet: Unable to connect to remote host: Connection refused

We suspect there could be communication issue from server IP address(x.x.x.x) on port 4043 with localhost 127.0.0.1. Could you let us know what are we missing in it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions