-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't seem to connect to any websocket server #37
Comments
@Akhawais - I just created a new project using the simple example in the README and was able to connect to I am using php 7.0.5 with Pawl version 0.2.2. Could you post a gist of your code? |
I just pasted that code into my project (I changed the require path but that is it) and it worked fine for me. I am not sure what would cause that to fail unless you are behind a firewall or proxy of some sort. |
Not sure why it's failing either. Ratchet was working fine 2 days ago. I'm able to connect to WS via other clients on the same machine and even trying Ratchet on a different machine and internet connection doesn't work. |
Here is the output of my
|
|
What type of event loop is react using? You can find out like this: <?php
require_once __DIR__ . '/vendor/autoload.php';
use React\EventLoop\Factory;
echo get_class(Factory::create()) . "\n"; |
|
That is what mine is using and should work fine. I am not sure what to try next - if you would like to post a packet capture of the attempted connection, I would be willing to look at it - or maybe someone else knows what is going on. |
Okay. What's really weird is the HTTP response that it outputs, I have no idea what server it's getting that from. Anyway, I'll try a bunch of things - maybe reinstalling Ratchet or trying a third machine - and if it still doesn't work then I'll do what you suggested. Thanks for you help though. Appreciate it. |
Reinstalling Ratchet/3rd machine didn't work. Also tried a bare ratchet installation in a different directory which didn't work either. @mbonneau Could you direct me on how to do a packet capture? If it helps, I've posted what seems like the HTTP response which gets outputted. Thanks. |
If it helps, I'm using Google DNS and it still doesn't work. On close event, I get this: |
Just a follow up on this: I have setup a simple node.js websocket proxy on the same machine I am running Pawl with. Just relays the socket data between Pawl and the actual Ws server. For some reason, this allows Pawl to connect to any websocket server (e.g. echo.socketo.me:9000 or echo.websocket.org) but using Pawl directly with those servers fails with Any ideas? |
Very strange. Sounds like it could be some kind of firewall blocking? I ran your gist on a fresh install of Pawl and had no problems. |
I did try without any firewall running and that didn't work either. I tried today connecting directly to the websocket server and it did successfully connect after 5 minutes of leaving it running. I don't believe that's caused by an issue with the particular server because the same delay occurs for echo.websocket.org. The server in question (that I use Pawl mainly for) is I did notice that echo.socketo.me which is on port 9000 connects instantly however Twitch and websocket.org's echo are both on port 80. That being said, I can still use a different client on the same machine to connect to Twitch instantly which is why I think it's Pawl and not a firewall (although this does look like a firewall issue) I'll double check all my firewall rules and report back though. Thanks for your time. |
Hey there, I found out that there was a function that was hanging in the Although I don't understand why it hangs in the test setup that I did, which doesn't have any functions in the closure. Anyway, my issue is resolved with the main code. Thanks guys. |
Hey there, using latest version (v0.2.2) and can't seem to connect to any websocket server at all.
Tried using echo.socketo.me:9000 and echo.websocket.org (using the first example on the README.md of this repo).
Most of the times I've tried I've just got no output from the console although twice I did get this outputting on the console:
(Pretty sure that the server I connected with when that outputted does not run Apache at all which is confusing)
I've tried on another computer, using a different Internet connection and didn't work. Although I can connect to them using my browser's built-in client and also Python so I am sure the issue is with Pawl.
Using PHP7 - can provide extra info if required.
Thanks.
The text was updated successfully, but these errors were encountered: