plow icon indicating copy to clipboard operation
plow copied to clipboard

Not working for https://astro.build/ project

Open khanakia opened this issue 1 year ago • 4 comments

  • Install Astro.js
  • Run yarn dev
  • Run plow http://localhost:4321 -c 1

When i do get the page using the CURL command it works perfectly with the plow command it just throws the errors as below

Benchmarking http://localhost:4321 using 1 connection(s).
@ Real-time charts is listening on http://[::]:18888

Summary:
  Elapsed       6.3s
  Count       198140
  RPS      30973.209
  Reads    0.000MB/s
  Writes   0.000MB/s

Error:
  198140  "dial tcp4 127.0.0.1:4321: connect: connection refused"

Statistics    Min       Mean    StdDev    Max   
  Latency     19µs      31µs    170µs   33.864ms
  RPS       29891.75  30919.29  680.36  31722.55

Latency Percentile:
  P50   P75   P90   P95   P99   P99.9  P99.99
  29µs  32µs  35µs  38µs  56µs  149µs  1.33ms

Latency Histogram:
  28µs      149024  75.21%
  31µs       33426  16.87%
  36µs       12556   6.34%
  53µs        2758   1.39%
  138µs        336   0.17%
  1.983ms       34   0.02%
  21.177ms       4   0.00%
  33.323ms       2   0.00%

khanakia avatar Jun 18 '24 11:06 khanakia

The error message 'connection refused' usually indicates an issue with the service, not the tool. Please ensure the service is running and verify the IP address and port.

six-ddc avatar Jun 19 '24 01:06 six-ddc

I double that there is no issue with the service I just installed a fresh astro site (https://docs.astro.build/en/getting-started/) which runs over this URL http://localhost:4321 only plow is giving a connection refused issue

I can access the site using curl and in a web browser

curl http://localhost:4321 Screenshot 2024-06-19 at 11 43 56 AM Screenshot 2024-06-19 at 11 44 08 AM

khanakia avatar Jun 19 '24 06:06 khanakia

Fond the issue plow is resolving to the IP address instead of localhost

When I want to test http://localhost:4321 it tries to connect via IP 127.0.0.1:4321 but my site is running over localhost so you cannot access it over http://127.0.0.1:4321/

It should use localhost instead of using 127.0.0.1

khanakia avatar Jun 19 '24 06:06 khanakia

The reason might be that localhost is resolving to the address ::1, and it looks like Plow has some issues supporting IPv6.

six-ddc avatar Jun 23 '24 07:06 six-ddc