Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

suddenly can't establish connection with server #215

Open
hugoalexmartins opened this issue Oct 4, 2021 · 4 comments
Open

suddenly can't establish connection with server #215

hugoalexmartins opened this issue Oct 4, 2021 · 4 comments

Comments

@hugoalexmartins
Copy link

hugoalexmartins commented Oct 4, 2021

hi all,

i use elephant to emit to events messages to a AWS EC2 server, everything was working fine until now, suddenly this stopped working properly.
for some reason that I can't explain the connection to the server is being refused. here is the error I've been receiving.
curiosity, the connection through client and the socket.io server is still working...

this is been super block on a live project, let me know what I can do.


object(ElephantIO\Exception\ServerConnectionFailureException)#21 (8) {
  ["errorMessage":"ElephantIO\Exception\ServerConnectionFailureException":private]=>
  NULL
  ["message":protected]=>
  string(70) "An error occurred while trying to establish a connection to the server"
  ["string":"Exception":private]=>
  string(0) ""
  ["code":protected]=>
  int(0)
  ["file":protected]=>
  string(78) "/var/app/current/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php"
  ["line":protected]=>
  int(187)
  ["trace":"Exception":private]=>
  array(3) {
    [0]=>
    array(6) {
      ["file"]=>
      string(78) "/var/app/current/vendor/wisembly/elephant.io/src/Engine/SocketIO/Version1X.php"
      ["line"]=>
      int(48)
      ["function"]=>
      string(9) "handshake"
      ["class"]=>
      string(36) "ElephantIO\Engine\SocketIO\Version1X"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
    [1]=>
    array(6) {
      ["file"]=>
      string(59) "/var/app/current/vendor/wisembly/elephant.io/src/Client.php"
      ["line"]=>
      int(60)
      ["function"]=>
      string(7) "connect"
      ["class"]=>
      string(36) "ElephantIO\Engine\SocketIO\Version1X"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
    [2]=>
    array(6) {
      ["file"]=>
      string(29) "/var/app/current/web/hugo.php"
      ["line"]=>
      int(28)
      ["function"]=>
      string(10) "initialize"
      ["class"]=>
      string(17) "ElephantIO\Client"
      ["type"]=>
      string(2) "->"
      ["args"]=>
      array(0) {
      }
    }
  }
  ["previous":"Exception":private]=>
  NULL
}
NULL

@hugoalexmartins hugoalexmartins changed the title suddenly can't establish connection with suddenly can't establish connection with server Oct 4, 2021
@guillaumepotier
Copy link
Member

guillaumepotier commented Oct 4, 2021 via email

@andyfink
Copy link

andyfink commented Oct 4, 2021 via email

@hugoalexmartins
Copy link
Author

@guillaumepotier yes its connected to a secure websocket server and with "lets encrypt" as well.
seems that the following settings are useful at least for a temporary workaround:

'context' => [ 'ssl' => [ 'verify_peer' => false, 'verify_peer_name' => false ] ]

@nickolanack
Copy link

nickolanack commented Oct 11, 2021

fixed for me by updating server. ie: yum update

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants