Page MenuHomePhabricator

RCStream is not accessible from python client due to using socket-io 1.0 while only socket-io 0.9 is offered
Closed, DeclinedPublic

Description

INFO:urllib3.connectionpool:Starting new HTTP connection (1): stream.wikimedia.org
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388662485-0 HTTP/1.1" 404 13
WARNING:root:stream.wikimedia.org:80/socket.io [waiting for connection] unexpected status code (404)
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388663760-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388664889-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388666018-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388667145-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388668273-0 HTTP/1.1" 404 13
DEBUG:urllib3.connectionpool:"GET /socket.io/?transport=polling&EIO=3&t=1425388669399-0 HTTP/1.1" 404 13

neverending

Related Objects

StatusSubtypeAssignedTask
DeclinedXqt
DeclinedNone
DeclinedNone
ResolvedKrinkle
DeclinedKrinkle
ResolvedOttomata
Duplicate Pchelolo
Resolved Pchelolo
ResolvedOttomata
Resolved Nuria
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
DeclinedOttomata
DeclinedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedHalfak
ResolvedJAllemandou
DeclinedNone
ResolvedOttomata
OpenNone
ResolvedOttomata
Resolvedmforns
ResolvedOttomata
ResolvedXqt
DuplicateNone
Resolved Cmjohnson
ResolvedXqt
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
DeclinedOttomata
DeclinedOttomata
ResolvedOttomata

Event Timeline

Petrb raised the priority of this task from to Needs Triage.
Petrb updated the task description. (Show Details)
Petrb added a project: EventStreams.
Petrb subscribed.
Petrb set Security to None.
Sample code:

#!/usr/bin/python
import logging
import socketIO_client
import json

logging.basicConfig(level='DEBUG')

class WikiNamespace(socketIO_client.BaseNamespace):
    def on_reconnect(self, *args):
        self.emit('subscribe', '*')
    def on_connect(self):
        self.emit('subscribe', '*')


socketIO = socketIO_client.SocketIO('stream.wikimedia.org', 80)
socketIO.define(WikiNamespace, '/rc')

socketIO.wait()
This comment was removed by Petrb.
Petrb triaged this task as Unbreak Now! priority.Mar 3 2015, 1:27 PM

The 404 errors look like a client trying to communicate using the socket-io 1.0 protocol. RCStream (at the moment) uses the more widespread socket-io 0.9 protocol. See T68232. If using a popular library, you may have to install an older version of it. Or use an alternate built-in (e.g. one of the php libraries out there ships a Version1 and Version09 client class).

Aklapper renamed this task from RCStream is not accessible from python to RCStream is not accessible from python client due to using socket-io 1.0 while only socket-io 0.9 is offered.Mar 6 2015, 10:25 AM
Aklapper lowered the priority of this task from Unbreak Now! to Medium.
XZise subscribed.

I can confirm that. The entry on pypi mentions that the latest version (0.6.1 as of this comment) supports socket.io 1.0. I installed 0.5.5 and I don't get the 404 error.

jayvdb subscribed.

This is a pretty high risk for Python apps. v0.5.5 was released Feb 17 , and we're stuck on that version.
Since then there have been fixes , and we cant update the library to get those or future fixes.

Since we have whole server (that means 1 dedicated public IP) for this service, why not just running a newer version on a different port so that it still works with software that already use it?

This is a pretty high risk for Python apps. v0.5.5 was released Feb 17 , and we're stuck on that version.
Since then there have been fixes , and we cant update the library to get those or future fixes.

Case in point:
https://github.com/invisibleroads/socketIO-client/issues/95

I'm closing this task and T68232 since it's unlikely this will happen. Rather than upgrading RCSteam to Socket.IO v1.0 (which would be a breaking change for existing RCStream consumers), I'll instead help push forward T130651: EventStreams.