Connection timeout on production...
I saw tons of posts about the problem, I believe that is something on my environment, because under development everything works fine. The first problem on test under production (centOS7) was the protocol, I need to move from ws to wss.

My push-server.php
```
<?php
    require __DIR__ . '/vendor/autoload.php';
    require __DIR__ . '/Logger.php';
    require __DIR__ . '/Pusher.php';
    cli_set_process_title('push-server-ivdk');
    Logger::write('*** Inicializando pusher ***');
    $loop   = React\EventLoop\Factory::create();
    $pusher = new Pusher;
    $context = new React\ZMQ\Context($loop);
    $pull = $context->getSocket(ZMQ::SOCKET_PULL);
    $pull->bind('tcp://127.0.0.1:5555'); 
    $pull->on('message', array($pusher, 'onEntry'));
    $webSock = new React\Socket\Server('0.0.0.0:8080', $loop); 
    $webServer = new Ratchet\Server\IoServer(new Ratchet\Http\HttpServer(new Ratchet\WebSocket\WsServer(new Ratchet\Wamp\WampServer($pusher))), $webSock);
    $loop->run();
?>
```
I did changes on Pusher.php to get the maximum information about the life cycle, but only constructor of class really write something on my PID file (as a log).
```
<?php
use Ratchet\ConnectionInterface;
use Ratchet\Wamp\WampServerInterface;

class Pusher implements WampServerInterface 
{
    protected $subscribedTopics = array();
    
    function __construct()
    {
        $this->writePid('Inicializado');
    }
    
    public function onUnSubscribe(ConnectionInterface $conn, $topic) 
    {
        $this->writePid(__FUNCTION__ . ':' .  print_r($topic,true) . ',' . print_r($conn, true));
    }
    
    public function onOpen(ConnectionInterface $conn) 
    {
        $this->writePid(__FUNCTION__ . ':' . print_r($conn, true));
    }

continue....

```

I started the push-server.php , but in fact I cannot see 8080 port able to LISTEN:

```
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:nfs             0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:zabbix-agent    0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:60296           0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:sunrpc          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:webcache        0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:mountd          0.0.0.0:*               LISTEN
tcp        0      0 localhos:personal-agent 0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:42005           0.0.0.0:*               LISTEN
tcp        0      0 localhost:smtp          0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:31199           0.0.0.0:*               LISTEN
tcp6       0      0 [::]:nfs                [::]:*                  LISTEN
tcp6       0      0 [::]:zabbix-agent       [::]:*                  LISTEN
tcp6       0      0 [::]:41230              [::]:*                  LISTEN
tcp6       0      0 [::]:sunrpc             [::]:*                  LISTEN
tcp6       0      0 [::]:mountd             [::]:*                  LISTEN
tcp6       0      0 [::]:http               [::]:*                  LISTEN
tcp6       0      0 [::]:https              [::]:*                  LISTEN
tcp6       0      0 [::]:47422              [::]:*                  LISTEN
tcp6       0      0 [::]:31199              [::]:*                  LISTEN
udp        0      0 0.0.0.0:43563           0.0.0.0:*
udp        0      0 0.0.0.0:sunrpc          0.0.0.0:*
udp        0      0 0.0.0.0:793             0.0.0.0:*
udp        0      0 localhost:795           0.0.0.0:*
udp        0      0 0.0.0.0:nfs             0.0.0.0:*
udp        0      0 0.0.0.0:mountd          0.0.0.0:*
udp        0      0 0.0.0.0:37111           0.0.0.0:*
udp6       0      0 [::]:39569              [::]:*
udp6       0      0 [::]:57398              [::]:*
udp6       0      0 [::]:sunrpc             [::]:*
udp6       0      0 [::]:793                [::]:*
udp6       0      0 [::]:nfs                [::]:*
udp6       0      0 [::]:mountd             [::]:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node   Path
unix  2      [ ACC ]     STREAM     LISTENING     2832250562 /var/lib/gssproxy/default.sock
unix  2      [ ACC ]     STREAM     LISTENING     2832291649 /var/run/rpcbind.sock
unix  2      [ ACC ]     SEQPACKET  LISTENING     2832311620 /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING     2832291653 /run/dbus/system_bus_socket
unix  2      [ ACC ]     STREAM     LISTENING     2832284354 /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     2832250563 /run/gssproxy.sock
unix  2      [ ACC ]     STREAM     LISTENING     2832284384 /run/systemd/journal/stdout
unix  2      [ ACC ]     STREAM     LISTENING     2832314598 /run/saslauthd/mux

```
And my javascript caller:
```
function iniciarSocket()
{
	var hash = document.querySelector('meta[name="pusher"]').getAttribute('content');
	if (hash == undefined || hash == '') 
	{
		console.err('Hash invalido para iniciar pusher');
		return;
	}
	
	var protocol = location.hostname == 'localhost' ? 'ws://' : 'wss://';
	var host = location.hostname;
	var port = '8080';
	var url = protocol + host + ':' + port ;
	console.log('Iniciando websocket em ' + url);
	var conn = new ab.Session(url,
            function() {
    			var hash = document.querySelector('meta[name="pusher"]').getAttribute('content');
        		console.log('Inscrevendo-se com hash ' + hash + ' em ' + url);
                conn.subscribe(hash, function(topic, data) {
                    console.log(data);
					}
                });
            },
            function() {
                console.warn('Conexao fechada em ' + new Date().toUTCString());
            },
            {'skipSubprotocolCheck': true}
        );    
}
```

In fact, if I cannot see the port opened / listen on server, probably I had some problem, but actually I cannot see what it is, remember that I put libevents and zeromq under the server , and php_zmq on server (everything was installled).


Someone can help me ?
