oncesk / yii-node-socket

66 stars 46 forks source link

Connection refused #48

Open tolik505 opened 9 years ago

tolik505 commented 9 years ago

Hi! The extension works good in my virtual machine. But there's a problem on the product server. When I emit an event in js, it works good, but events, which are sent from controller cause an error: Error:

Exception

Failed to connect to hoo.dev.vintagedev.com.ua port 8081: Connection refused (/var/www/hoo/vendor/oncesk/yii-node-socket/lib/vendor/elephant.io/lib/ElephantIO/Client.php:372)

#0 /var/www/hoo/vendor/oncesk/yii-node-socket/lib/vendor/elephant.io/lib/ElephantIO/Client.php(66): ElephantIO\Client->handshake()
#1 /var/www/hoo/vendor/oncesk/yii-node-socket/lib/php/frames/AFrame.php(167): ElephantIO\Client->init()
#2 /var/www/hoo/vendor/oncesk/yii-node-socket/lib/php/frames/AFrame.php(76): YiiNodeSocket\Frames\AFrame->emit()
#3 /var/www/hoo/frontend/modules/user/controllers/PmController.php(134): YiiNodeSocket\Frames\AFrame->send()

Please, can you say what cause the error?            
oncesk commented 9 years ago

hi, can you show nodejs logs in runtime folder

tolik505 commented 9 years ago

yes, sure. I restarted node-socket, then typed several symbols, it emits typing event in js, and after that was sent ajax request to controller, where event 'massage' was created and sent. It cause the error, which I described before. There is logs: info: socket.io started Listening 46.101.160.165:8081 Set origin: hoo.dev.vintagedev.com.ua:* debug: client authorized info: handshake authorized okcd5EtHJKKEHpDxUP02 debug: client authorized info: handshake authorized 3aO3XE68Xi5EpUYoUP03 debug: setting request GET /socket.io/1/websocket/3aO3XE68Xi5EpUYoUP03 debug: set heartbeat interval for client 3aO3XE68Xi5EpUYoUP03 debug: client authorized for debug: websocket writing 1:: debug: setting request GET /socket.io/1/websocket/okcd5EtHJKKEHpDxUP02 debug: set heartbeat interval for client okcd5EtHJKKEHpDxUP02 debug: client authorized for debug: websocket writing 1:: debug: client authorized for /client debug: websocket writing 1::/client debug: client authorized for /client debug: websocket writing 1::/client debug: emitting heartbeat for client 3aO3XE68Xi5EpUYoUP03 debug: websocket writing 2:: debug: set heartbeat timeout for client 3aO3XE68Xi5EpUYoUP03 debug: emitting heartbeat for client okcd5EtHJKKEHpDxUP02 debug: websocket writing 2:: debug: set heartbeat timeout for client okcd5EtHJKKEHpDxUP02 debug: got heartbeat packet debug: cleared heartbeat timeout for client 3aO3XE68Xi5EpUYoUP03 debug: set heartbeat interval for client 3aO3XE68Xi5EpUYoUP03 debug: got heartbeat packet debug: cleared heartbeat timeout for client okcd5EtHJKKEHpDxUP02 debug: set heartbeat interval for client okcd5EtHJKKEHpDxUP02 debug: emitting heartbeat for client 3aO3XE68Xi5EpUYoUP03 debug: websocket writing 2:: debug: set heartbeat timeout for client 3aO3XE68Xi5EpUYoUP03 debug: emitting heartbeat for client okcd5EtHJKKEHpDxUP02 debug: websocket writing 2:: debug: set heartbeat timeout for client okcd5EtHJKKEHpDxUP02 debug: got heartbeat packet debug: cleared heartbeat timeout for client okcd5EtHJKKEHpDxUP02 debug: set heartbeat interval for client okcd5EtHJKKEHpDxUP02 debug: got heartbeat packet debug: cleared heartbeat timeout for client 3aO3XE68Xi5EpUYoUP03 debug: set heartbeat interval for client 3aO3XE68Xi5EpUYoUP03 debug: emitting heartbeat for client okcd5EtHJKKEHpDxUP02 debug: websocket writing 2:: debug: set heartbeat timeout for client okcd5EtHJKKEHpDxUP02 debug: emitting heartbeat for client 3aO3XE68Xi5EpUYoUP03 debug: websocket writing 2:: debug: set heartbeat timeout for client 3aO3XE68Xi5EpUYoUP03 debug: got heartbeat packet debug: cleared heartbeat timeout for client okcd5EtHJKKEHpDxUP02 debug: set heartbeat interval for client okcd5EtHJKKEHpDxUP02 debug: got heartbeat packet debug: cleared heartbeat timeout for client 3aO3XE68Xi5EpUYoUP03 debug: set heartbeat interval for client 3aO3XE68Xi5EpUYoUP03 info: transport end (undefined) debug: set close timeout for client 3aO3XE68Xi5EpUYoUP03 debug: cleared close timeout for client 3aO3XE68Xi5EpUYoUP03 debug: cleared heartbeat interval for client 3aO3XE68Xi5EpUYoUP03 debug: discarding transport debug: served static content /socket.io.js debug: client authorized info: handshake authorized 9QU_pKzq0084aINuUP04 debug: setting request GET /socket.io/1/websocket/9QU_pKzq0084aINuUP04 debug: set heartbeat interval for client 9QU_pKzq0084aINuUP04 debug: client authorized for debug: websocket writing 1:: debug: client authorized for /client debug: websocket writing 1::/client Tying connect socket to room Room 31-32 Socket connected debug: sending data ack packet debug: websocket writing 6::/client:1+[true,1] Tying connect socket to room Room 32 Socket connected debug: sending data ack packet debug: websocket writing 6::/client:2+[true,1] debug: websocket writing 5::/client:{"name":"room:31-32:seen_32","args":[{},true]} debug: websocket writing 5::/client:{"name":"room:31-32:typing_32","args":[{},true]} debug: websocket writing 5::/client:{"name":"room:31-32:typing_32","args":[{},true]} debug: websocket writing 5::/client:{"name":"room:31-32:typing_32","args":[{},true]} debug: websocket writing 5::/client:{"name":"room:31-32:typing_32","args":[{},true]} debug: websocket writing 5::/client:{"name":"room:31-32:typing_32","args":[{},true]} debug: websocket writing 5::/client:{"name":"room:31-32:typing_32","args":[{},true]}

oncesk commented 9 years ago

hi. i think you need to check you connection, dns, nodejs bind host or ip in your yii configuration... try connect with telnet using address and port

nodejs log file has not contains information about connection from server

you can show me you nodejs config file in json format or in yii configuration