W
W
WiNNeR_tig2017-09-19 19:45:26
Iron
WiNNeR_tig, 2017-09-19 19:45:26

Unable to open port for socket.io?

server.js
var app = require('express')();
var server = require('https').Server(app);
var io = require('socket.io')(server);
var mysql = require('mysql');

server.listen(3333);

node server.js
https:// site id:3333/ error ERR_CONNECTION_CLOSED
and
https:// site domain:3333/ error ERR_CONNECTION_REFUSED

Answer the question

In order to leave comments, you need to log in

7 answer(s)
A
Alfieros, 2019-06-04
@mrsexy

More like a GPU dump. Are you using the integrated graphics core for output or a graphics card? In any case, the problem lies there. If you are using a discrete, disable the video core in the BIOS. And check again. Or vice versa, turn off the discrete and connect through the motherboard.

T
TyzhSysAdmin, 2019-06-05
@POS_troi

Greetings.
This is not a software problem, the CPU is a replacement, or you can disable the integrated graphics in the BIOS and use a discrete PCI-E card (but not the fact that other problems with the CPU will not come out).

V
Vladimir Yurchenkov, 2019-06-04
@EPIDEMIASH

Elementary processor throttling. You can scalp percent.
The same situation was with the new i5-3450
SSD + HDD. I changed the
RAM, reinstalled Windows faces, and so on.
How old is the pro?

Y
Yar Rick, 2019-06-04
@Yar_Rick

To eliminate Windows from the list of possible culprits, boot from an Ubuntu Live CD and see if the computer behaves the same way. I had a computer on the Asus motherboard on the H61M chipset, it worked stably only in Linux, in Windows there were random reboots at the most unpleasant moment, BUT only if the system is installed on an SSD (everything is OK on an HDD even in Windows). Here is such a magic.

H
hOtRush, 2019-06-04
@hOtRush

I put my hat on the garbage

K
Karpion, 2019-06-08
@Karpion

The reasons are different:
* Swelling of capacitors on the motherboard, video card, in the power supply;
* dust;
* the software is broken.
Well, see for yourself where to start. The option to "replace the video card" is also suitable.

B
Boris Korobkov, 2017-09-19
@BorisKorobkov

For https, you need to have a certificate, at least a self-signed one. And give it away. For example:

if (fs.existsSync('ssl/cert.key') && fs.existsSync('ssl/cert.crt')) {
    options = {
      key: fs.readFileSync('ssl/cert.key'),
      cert: fs.readFileSync('ssl/cert.crt')
    };
    server = require('https').Server(options, express);
  } else {
    server = require('http').Server(express);
  }

  io = require('socket.io').listen(server);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question