question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Socket.io Test Giving Error "an URL must be specified"

See original GitHub issue

Hey guys, I’ve been stuck on this for a couple days. I simplified it to match the example but it’s still not working. When I run the script, it’s neither registering on our Nginx access nor our error logs. Did I miss something obvious? Are you guys still supporting Socket.io?

Node 7.4.0 Artillery 1.5.0 Socket.io 1.7.2

test.yaml:

config:
  target: "https://sub.mydomain.com/api/socket"
  engine: "socketio"
  phases:
    - duration: 10
      arrivalRate: 1
scenarios:
  - name: "Connect"
    flow:
      - emit:
          channel: "room:join"
          data:
            room_id : "dsflj80c0311111"

Output:

Complete report @ 2017-02-05T04:25:43.980Z
  Scenarios launched:  10
  Scenarios completed: 0
  Requests completed:  0
  RPS sent: NaN
  Request latency:
    min: NaN
    max: NaN
    median: NaN
    p95: NaN
    p99: NaN
  Scenario duration:
    min: NaN
    max: NaN
    median: NaN
    p95: NaN
    p99: NaN
  Scenario counts:
    Connect: 10 (Infinity%)
  Errors:
    an URL must be specified: 10

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
dolphubcommented, Aug 10, 2018

@dmr07 I know this is older but were you able to get this working behind a reverse proxy? I’m using an ingress controller in kubernetes load balancing my socket server.

I have the webapp and the socket server served / scaled separately so I need to use a query path for the socket connection.

Report for the previous 10s @ 2018-08-10T20:43:59.859Z
  Scenarios launched:  8
  Scenarios completed: 0
  Requests completed:  0
  RPS sent: NaN
  Request latency:
    min: NaN
    max: NaN
    median: NaN
    p95: NaN
    p99: NaN
  Scenario duration:
    min: NaN
    max: NaN
    median: NaN
    p95: NaN
    p99: NaN
  Errors:
    xhr poll error: 8
config:
  target: "http://dev.server/"
  socketio:
    transports: ["websocket"]
    query:
      path: "/ws/socket.io"

My socket server is proxied through /ws

0reactions
hassycommented, Feb 11, 2017

Closing for now as unclear if it’s an issue in Artillery.

Read more comments on GitHub >

github_iconTop Results From Across the Web

socket io load test using artilary - Stack Overflow
I have resolved this issue using following code config: target: "http://192.168.2.161:5000" phases: - duration: 600 arrivalRate: 5 ...
Read more >
Troubleshooting connection issues | Socket.IO
Common errors: ... IO server is actually reachable at the given URL. You can test ... You can test it with rejectUnauthorized set...
Read more >
Troubleshooting connection issues | Socket.IO
IO server is actually reachable at the given URL. You can test it with: curl "<the server URL>/socket.io/?EIO=4&transport=polling"
Read more >
Client API - Socket.IO
Creates a new Manager for the given URL, and attempts to reuse an existing Manager for subsequent calls, unless the multiplex option is ......
Read more >
Client Initialization | Socket.IO
In case your front is not served from the same domain as your server, you have to pass the URL of your server....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found