when I start the server I get this:

tls.js:1127
throw new Error('Missing PFX or certificate + private key.');
^
Error: Missing PFX or certificate + private key.
at Server (tls.js:1127:11)
at new Server (https.js:35:14)
at Object.exports.createServer (https.js:54:10)
at Object. (/server.js:1114:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)

sslKeyPath and sslCertPath are defined and were working previously.
I could not find tls.js and https.js on my local machine where I installed nodejs and the directory where I ran npm install.

I saw this online and thought it might help:
A person asks "Does Node.js use its own (bundled) version of OpenSSL instead of what's installed on the local machine?"
https://groups.google.com/forum/#!msg/nodejs/rdwNIA8HltY/kdWc7JCX950J

node.0.10.28

Here is my setup:
├─┬ express@3.10.2
│ ├── buffer-crc32@0.2.1
│ ├─┬ commander@1.3.2
│ │ └── keypress@0.1.0
│ ├─┬ connect@2.19.3
│ │ ├── basic-auth-connect@1.0.0
│ │ ├─┬ body-parser@1.3.0
│ │ │ └── raw-body@1.1.6
│ │ ├── bytes@1.0.0
│ │ ├─┬ compression@1.0.6
│ │ │ ├─┬ accepts@1.0.2
│ │ │ │ ├── mime@1.2.11
│ │ │ │ └── negotiator@0.4.5
│ │ │ └── compressible@1.0.1
│ │ ├── connect-timeout@1.1.0
│ │ ├── cookie-parser@1.1.0
│ │ ├─┬ csurf@1.2.0
│ │ │ ├── scmp@0.0.3
│ │ │ └── uid2@0.0.3
│ │ ├── errorhandler@1.0.1
│ │ ├─┬ express-session@1.2.1
│ │ │ ├── uid2@0.0.3
│ │ │ └── utils-merge@1.0.0
│ │ ├── method-override@2.0.1
│ │ ├── morgan@1.1.1
│ │ ├─┬ multiparty@3.2.8
│ │ │ ├─┬ readable-stream@1.1.13-1
│ │ │ │ ├── core-util-is@1.0.1
│ │ │ │ ├── inherits@2.0.1
│ │ │ │ ├── isarray@0.0.1
│ │ │ │ └── string_decoder@0.10.25-1
│ │ │ └── stream-counter@0.2.0
│ │ ├── on-headers@0.0.0
│ │ ├── pause@0.0.1
│ │ ├── qs@0.6.6
│ │ ├── response-time@2.0.0
│ │ ├── serve-favicon@2.0.0
│ │ ├─┬ serve-index@1.1.0
│ │ │ ├─┬ accepts@1.0.2
│ │ │ │ ├── mime@1.2.11
│ │ │ │ └── negotiator@0.4.5
│ │ │ └── batch@0.5.0
│ │ ├── serve-static@1.2.1
│ │ ├─┬ type-is@1.2.0
│ │ │ └── mime@1.2.11
│ │ └── vhost@1.0.0
│ ├── cookie@0.1.2
│ ├── cookie-signature@1.0.3
│ ├── debug@0.8.1
│ ├── escape-html@1.0.1
│ ├── fresh@0.2.2
│ ├── merge-descriptors@0.0.2
│ ├── methods@1.0.1
│ ├─┬ mkdirp@0.5.0
│ │ └── minimist@0.0.8
│ ├── parseurl@1.0.1
│ ├─┬ proxy-addr@1.0.1
│ │ └── ipaddr.js@0.1.2
│ ├── range-parser@1.0.0
│ └─┬ send@0.4.1
│ ├── finished@1.1.4
│ └── mime@1.2.11
├─┬ request@2.36.0
│ ├── aws-sign2@0.5.0
│ ├── forever-agent@0.5.2
│ ├─┬ form-data@0.1.3
│ │ ├── async@0.9.0
│ │ └─┬ combined-stream@0.0.4
│ │ └── delayed-stream@0.0.5
│ ├─┬ hawk@1.0.0
│ │ ├── boom@0.4.2
│ │ ├── cryptiles@0.2.2
│ │ ├── hoek@0.9.1
│ │ └── sntp@0.2.4
│ ├─┬ http-signature@0.10.0
│ │ ├── asn1@0.1.11
│ │ ├── assert-plus@0.1.2
│ │ └── ctype@0.5.2
│ ├── json-stringify-safe@5.0.0
│ ├── mime@1.2.11
│ ├── node-uuid@1.4.1
│ ├── oauth-sign@0.3.0
│ ├── qs@0.6.6
│ ├─┬ tough-cookie@0.12.1
│ │ └── punycode@1.2.4
│ └── tunnel-agent@0.4.0
└─┬ socket.io@1.0.4
├── debug@0.7.4
├─┬ engine.io@1.2.2
│ ├── base64id@0.1.0
│ ├── debug@0.6.0
│ ├─┬ engine.io-parser@1.0.6
│ │ ├── after@0.8.1
│ │ ├── arraybuffer.slice@0.0.6
│ │ ├── base64-arraybuffer@0.1.2
│ │ ├── blob@0.0.2
│ │ └── utf8@2.0.0
│ └─┬ ws@0.4.31
│ ├── commander@0.6.1
│ ├── nan@0.3.2
│ ├── options@0.0.5
│ └── tinycolor@0.0.1
├─┬ has-binary-data@0.1.1
│ └── isarray@0.0.1
├─┬ socket.io-adapter@0.2.0
│ └─┬ socket.io-parser@2.1.2
│ ├─┬ emitter@1.0.1
│ │ └── indexof@0.0.1
│ ├── isarray@0.0.1
│ └── json3@3.2.6
├─┬ socket.io-client@1.0.4
│ ├── bind@0.0.1
│ ├── emitter@1.0.1
│ ├─┬ engine.io-client@1.2.2
│ │ ├─┬ engine.io-parser@1.0.6
│ │ │ ├── after@0.8.1
│ │ │ ├── arraybuffer.slice@0.0.6
│ │ │ ├── base64-arraybuffer@0.1.2
│ │ │ ├── blob@0.0.2
│ │ │ └── utf8@2.0.0
│ │ ├─┬ has-cors@1.0.3
│ │ │ └── global@2.0.1
│ │ ├── inherits@2.0.1
│ │ ├─┬ parsejson@0.0.1
│ │ │ └─┬ better-assert@1.0.0
│ │ │ └── callsite@1.0.0
│ │ ├─┬ parseqs@0.0.2
│ │ │ └─┬ better-assert@1.0.0
│ │ │ └── callsite@1.0.0
│ │ ├─┬ ws@0.4.31
│ │ │ ├── commander@0.6.1
│ │ │ ├── nan@0.3.2
│ │ │ ├── options@0.0.5
│ │ │ └── tinycolor@0.0.1
│ │ └── xmlhttprequest@1.5.0
│ ├── indexof@0.0.1
│ ├── object-component@0.0.3
│ ├─┬ parseuri@0.0.2
│ │ └─┬ better-assert@1.0.0
│ │ └── callsite@1.0.0
│ └── to-array@0.1.3
└─┬ socket.io-parser@2.2.0
├─┬ emitter@1.0.1
│ └── indexof@0.0.1
├── isarray@0.0.1
└── json3@3.2.6

Comments

SocialNicheGuru’s picture

Status: Active » Closed (fixed)

instead of installing from the repository, I installed from source and everything is fine.

SocialNicheGuru’s picture

Status: Closed (fixed) » Active

this didn't fix it.

SocialNicheGuru’s picture

Hopefully this will help others.

I had to downgrade to the following in order to get the server to start in ssl mode.

; Information added by Drupal.org packaging script on 2014-03-25
version = "7.x-1.7+3-dev"
core = "7.x"

with package.json
{
"name": "Drupal-Node.js",
"description": "Push notifications from Drupal.",
"version": "1.0.2",
"homepage": "https://drupal.org/project/nodejs",
"engines": {
"node": "0.10.x"
},
"dependencies": {
"express": "~2.5",
"request": "2.20.x",
"socket.io": "~0.9.6"
}
}

I eventually downgraded to node 0.8.26 because some of the packages complained about not having it

  • Commit 4c4e8c5 on 7.x-1.x by beejeebus:
    #2280989: fix stupid bug in order of arguments to https.createServer,...
Anonymous’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Status: Active » Fixed

fixed with the above commit, thanks for the report.

SocialNicheGuru’s picture

OMG!!!! Yes that fixed it. Ahhh, computers. Sometimes they just don't cooperate!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.