-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
https silently stopped working after upgrade to 1.4.1 #988
Comments
Could you try to reduce the test case to only use core modules? |
Reduced to the code below. Still not working. Verified to work with
|
Reduced even more. Not working.
|
@indutny any ideas? |
Testing |
Appears to be working on my side :( var https = require('https');
var options = {
key: "-----BEGIN RSA PRIVATE KEY-----\nMIICXQIBAAKBgQCw9x8LLd0Lm/LKGiYheUoRW7Kz8ndiNEXo+ZSLhlYls6sB9Pwp\n1oOybdU7uY6jrscG3lRDeDvF5fKhPUTbI6UA5k+o62iLGYQlLBaikHKbZkxxg7ai\n4bBQMTJgRxsuUQIEaw2KrxsSPjDcwMMVRwaQMkSAiObyIFaN7BN4HnrfQQIDAQAB\nAoGBAKgg+OD9n3Ouo7JIuq511h18weD9/VeTc1IfgPY4WLN0KgXvc/3p3PCSMhMO\nvcqcPGI1q9f4LM3dpLF1DOyoRlPp1KqAw7jybI2KwP3EAuVjbZA6DJRopvXM7yMo\nASYPOsqVW52Gf94Hw3jp16B5NoSzJ7aFjRYd27oCxarmljXLAkEAyI7Nn3UJHqZc\ncnvXy4wgsgnJR3uUR2R+U4a2aiXjgZe+nb1nUrY1ETHH3ZoNA7PwX9CILx32tCE6\nnBLy/TMRwwJBAOHitZN6V98afph55mmp4FdIhgzAgYc7UhCRJWYC7o0HCMsDCByN\nGuYlJi/tAEqcyjE95BR5pFf0JHMhQDwX1qsCQQCK+Ij7CTn8hwJgQfhSDxNIywcy\nBSvGHJh8gEg+XWq8Dc4Dt460/ZTgCUKZB3olKrZRbkove+/K+YuHQoolcRHJAkAx\nTSoUZj+HkmDPJswDg/BTHKElZ17eBTSEKSngegNXBJIGvUKn+KRGVxVeoHvPzSjU\nVo3RajtUdxT9i+RZOVrBAkAsuYxntIDznm2+f+MAQnG9i5vMCvGOq40Jz+2k7vl/\neb5JvCKXA8cncegAtYTyQZVMwsgcGnGTCYoXIIO/4+tY\n-----END RSA PRIVATE KEY-----",
cert: "-----BEGIN CERTIFICATE-----\nMIIBpTCCARCgAwIBAgIDAQABMAsGCSqGSIb3DQEBCzAPMQ0wCwYDVQQDFgRhYXNk\nMB4XDTcwMDEwMTAwMDAwMFoXDTI1MDIyNDE2MjAxNVowDzENMAsGA1UEAxYEYWFz\nZDCBnTALBgkqhkiG9w0BAQEDgY0AMIGJAoGBALD3Hwst3Qub8soaJiF5ShFbsrPy\nd2I0Rej5lIuGViWzqwH0/CnWg7Jt1Tu5jqOuxwbeVEN4O8Xl8qE9RNsjpQDmT6jr\naIsZhCUsFqKQcptmTHGDtqLhsFAxMmBHGy5RAgRrDYqvGxI+MNzAwxVHBpAyRICI\n5vIgVo3sE3geet9BAgMBAAGjFTATMBEGA1UdEQQKMAiCBiouYWFzZDALBgkqhkiG\n9w0BAQsDgYEAgMgeIsZx6SkQ9YweLhR1YCeiHI+1FRP4SH8D4Z8FN0ddKqi5CmN4\nPTUQgeWcTEb1cjIqxHg5U6DLbKcyq6V8YUcDe/hVgqXUh6rmYQP4oIcjaHVkdAqt\nreAfKuRNgtoQGkowqu2ia25BOKjs7U8ZzALl9Po9P6z8AiMRBeTdKQk=\n-----END CERTIFICATE-----"
};
https.createServer(options, function(req, res) {
res.writeHead(200);
res.end('hello world\n');
}).listen(8443, function() {
console.log('Listening at %j', this.address());
}); ~/Code/indutny/node $ ./iojs test.js &
[1] 84265
Listening at {"address":"::","family":"IPv6","port":8443}
~/Code/indutny/node $ curl -k https://127.0.0.1:8443/
hello world
~/Code/indutny/node $ ./iojs -v
v1.4.1 |
@kyrylkov does this code work for you? |
@indutny I've just replicated OP's code and I can't reproduce this on 1.4.1. Works just fine. Both with your code and his. Tested with: var bodyParser = require('body-parser'),
compression = require('compression'),
express = require('express'),
fs = require('fs'),
https = require('https');
var options = {
key: "-----BEGIN RSA PRIVATE K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3Qub8soaJiF5ShFbsrPy\nd2I0Rej5lIuGViWzqwH0/CnWg7Jt1Tu5jqOuxwbeVEN4O8Xl8qE9RNsjpQDmT6jr\naIsZhCUsFqKQcptmTHGDtqLhsFAxMmBHGy5RAgRrDYqvGxI+MNzAwxVHBpAyRICI\n5vIgVo3sE3geet9BAgMBAAGjFTATMBEGA1UdEQQKMAiCBiouYWFzZDALBgkqhkiG\n9w0BAQsDgYEAgMgeIsZx6SkQ9YweLhR1YCeiHI+1FRP4SH8D4Z8FN0ddKqi5CmN4\nPTUQgeWcTEb1cjIqxHg5U6DLbKcyq6V8YUcDe/hVgqXUh6rmYQP4oIcjaHVkdAqt\nreAfKuRNgtoQGkowqu2ia25BOKjs7U8ZzALl9Po9P6z8AiMRBeTdKQk=\n-----END CERTIFICATE-----"
};
var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(compression({
level: 9
}));
app.use(express.static('public'));
app.get("/", function(req, resp){
resp.json("Hello World");
resp.end();
});
https.createServer(options, app).listen(8443);
console.log('Listening on port 8443 ...'); |
Which OS are you using @kyrylkov? |
@rvagg Tested on Windows 10 Pro Build 9926 & Windows 8.1 Pro. Both 64-bit. |
We need an @iojs/windows team so we can summon help ... |
@rvagg I'll build io.js in Parallels in a bit. Still it is very surprising since most of https/tls test implies that basic server setup should be working. |
@rvagg oh, just realized that we have binaries! :) |
Hm... confirmed. |
@indutny that's a start |
@kyrylkov thank you :) I'll look into it. So far I could only tell that the connection is accepted and then closed for some reason. Not sure how it passed tests for us on CI. |
@indutny glad to know it's not my messy set-up |
I think |
Gosh, it return |
The problem does not manifest itself on unixes, because `uv_read_start()` always return 0 there. However on Windows on a second call `uv_read_start()` returns `UV__EALREADY` destroying all sockets on a read attempt. Set `.reading` property that is already handled by `net.js` code. Fix: nodejs#988
Fix #994 . |
@rvagg It does seem to be a CI problem as well, since we wasn't aware of test failures. There are clearly lots of failing tests (all https and most of tls) on Windows atm. |
probably related to the dramas I was having at release, will figure it out |
The problem does not manifest itself on unixes, because `uv_read_start()` always return 0 there. However on Windows on a second call `uv_read_start()` returns `UV__EALREADY` destroying all sockets on a read attempt. Set `.reading` property that is already handled by `net.js` code. Fix: #988 PR-URL: #994 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
https
silently stopped working after upgrade to 1.4.1Browsers and Postman cannot connect to https localhost as if io.js server is not running.
Downgrading to 1.3.0 solves the problem
The text was updated successfully, but these errors were encountered: