Connecting to 2003 port issue
Have you read the documentation?
- [X] Yes, I've read the how to make a reproducable bug guide
- [X] Yes, I've read the how to debug my script guide
URL
https://www.sitespeed.io/
What are you trying to accomplish
I wanted to start with grafana dashboard, but stuck at error:
[2022-07-27 09:55:32] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
Did test from host, and stucks on this:
root@sitespeed:~# echo "foo2.bar 1 date +%s" | nc -v localhost 2003
Connection to localhost (::1) 2003 port [tcp/*] succeeded!
^C
And there is not TCP response from docker container, attached tcpdump log.
Also entered into container graphite and test command pass ok.
What is causing this missing TCP response from docker container?
What browser did you use?
Chrome
How to reproduce
Fresh Ubuntu 22.04 LTS 5.15.0-41-generic
curl -O https://raw.githubusercontent.com/sitespeedio/sitespeed.io/main/docker/docker-compose.yml
docker-compose up -d
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:25.5.1 --network=host --graphite.host localhost --graphite.port 2003 https://www.sitespeed.io/ --slug yourTestName --graphite.addSlugToKey true
Relevant log output
[2022-07-27 10:41:29] INFO: https://www.sitespeed.io/ 11 requests, TTFB: 130ms (σ52.00ms), firstPaint: 167ms (σ61.00ms), firstVisualChange: 200ms (σ82.00ms), FCP: 167ms (σ61.00ms), DOMContentLoaded: 179ms (σ59.00ms), LCP: 237ms (σ57.00ms), CLS: 0.0004 (σ0.00), TBT: 0ms (σ0.00ms), Load: 182ms (σ59.00ms), speedIndex: 220ms (σ80.00ms), visualComplete85: 266ms (σ72.00ms), lastVisualChange: 266ms (σ68.00ms) (3 runs)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
[2022-07-27 10:41:29] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
10:13:16.286525 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [S], seq 3733378098, win 65495, options [mss 65495,sackOK,TS val 3609583918 ecr 0,nop,wscale 7], length 0
10:13:16.286543 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [S.], seq 568745543, ack 3733378099, win 65483, options [mss 65495,sackOK,TS val 3609583918 ecr 3609583918,nop,wscale 7], length 0
10:13:16.286560 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609583918 ecr 3609583918], length 0
10:13:16.286812 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [P.], seq 1:23, ack 1, win 512, options [nop,nop,TS val 3609583919 ecr 3609583918], length 22
10:13:16.286874 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609583919 ecr 3609583919], length 0
10:13:31.305056 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609598937 ecr 3609583919], length 0
10:13:31.305079 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609598937 ecr 3609583919], length 0
10:13:46.409075 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609614041 ecr 3609598937], length 0
10:13:46.409122 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609614041 ecr 3609583919], length 0
10:14:01.513061 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609629145 ecr 3609614041], length 0
10:14:01.513086 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609629145 ecr 3609583919], length 0
10:14:16.617046 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609644249 ecr 3609629145], length 0
10:14:16.617073 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609644249 ecr 3609583919], length 0
10:14:31.721062 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609659353 ecr 3609644249], length 0
10:14:31.721084 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609659353 ecr 3609583919], length 0
10:14:46.825045 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609674457 ecr 3609659353], length 0
10:14:46.825147 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609674457 ecr 3609583919], length 0
10:15:01.929099 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609689561 ecr 3609674457], length 0
10:15:01.929150 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609689561 ecr 3609583919], length 0
10:15:17.033058 IP 127.0.0.1.2003 > 127.0.0.1.43162: Flags [.], ack 23, win 512, options [nop,nop,TS val 3609704665 ecr 3609689561], length 0
10:15:17.033082 IP 127.0.0.1.43162 > 127.0.0.1.2003: Flags [.], ack 1, win 512, options [nop,nop,TS val 3609704665 ecr 3609583919], length 0
Hi @Rexikon thanks for creating the issue. Not 100% sure, I never run graphite/grafana on the same host as sitespeed.io, but I think --network=host need to be before the container? So in your case try:
docker run --rm -v "$(pwd):/sitespeed.io" --network=host sitespeedio/sitespeed.io:25.5.1 --graphite.host localhost --graphite.port 2003 https://www.sitespeed.io/ --slug yourTestName --graphite.addSlugToKey true
Hi @Rexikon thanks for creating the issue. Not 100% sure, I never run graphite/grafana on the same host as sitespeed.io, but I think
--network=hostneed to be before the container? So in your case try:docker run --rm -v "$(pwd):/sitespeed.io" --network=host sitespeedio/sitespeed.io:25.5.1 --graphite.host localhost --graphite.port 2003 https://www.sitespeed.io/ --slug yourTestName --graphite.addSlugToKey true
It is same:
[2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) [2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) [2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) [2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) [2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) [2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) [2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16) [2022-08-10 20:23:09] ERROR: Error: connect ECONNREFUSED 127.0.0.1:2003 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)
Are you sure you put it in the right place? I created a new droplet at Digital Ocean on Ubuntu 20 with Docker pre installed just to make it easy:
curl -O https://raw.githubusercontent.com/sitespeedio/sitespeed.io/main/docker/docker-compose.yml
docker-compose up -d
docker run --rm -v "$(pwd):/sitespeed.io" --network=host sitespeedio/sitespeed.io:25.5.1 --graphite.host localhost --graphite.port 2003 https://www.sitespeed.io/ --slug yourTestName --graphite.addSlugToKey true -n 1
And then it just works. If I remove the --network=host I get the same error as you.
docker run --rm -v "$(pwd):/sitespeed.io" --network=host sitespeedio/sitespeed.io:25.5.1 --graphite.host localhost --graphite.port 2003 https://www.sitespeed.io/ --slug yourTestName --graphite.addSlugToKey true -n 1
Okay, done recreation of current containers (docker-compose up -d), then it works. Thank you for your time.