{"action":"created","issue":{"url":"https://api.github.com/repos/ripple/ripple-rest/issues/381","labels_url":"https://api.github.com/repos/ripple/ripple-rest/issues/381/labels{/name}","comments_url":"https://api.github.com/repos/ripple/ripple-rest/issues/381/comments","events_url":"https://api.github.com/repos/ripple/ripple-rest/issues/381/events","html_url":"https://github.com/ripple/ripple-rest/issues/381","id":93156798,"number":381,"title":"npm start error: uncaughtException: DEPTH_ZERO_SELF_SIGNED_CERT","user":{"login":"whotooktwarden","id":5444589,"avatar_url":"https://avatars.githubusercontent.com/u/5444589?v=3","gravatar_id":"","url":"https://api.github.com/users/whotooktwarden","html_url":"https://github.com/whotooktwarden","followers_url":"https://api.github.com/users/whotooktwarden/followers","following_url":"https://api.github.com/users/whotooktwarden/following{/other_user}","gists_url":"https://api.github.com/users/whotooktwarden/gists{/gist_id}","starred_url":"https://api.github.com/users/whotooktwarden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whotooktwarden/subscriptions","organizations_url":"https://api.github.com/users/whotooktwarden/orgs","repos_url":"https://api.github.com/users/whotooktwarden/repos","events_url":"https://api.github.com/users/whotooktwarden/events{/privacy}","received_events_url":"https://api.github.com/users/whotooktwarden/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-05T23:30:15Z","updated_at":"2015-07-07T00:00:01Z","closed_at":null,"body":"I have set-up ripple-REST using SSL.  I was able to access it earlier this day by using https://xagate.com:5990 but now I receive this error regarding my certificate.  This is not a self-signed certificate, it was signed by RapidSSL.  If you navigate to this address it will state that it is protected but the config.json file is set to SSL:false while the wss://xagate.com:443 address either won't bind, otherwise, REST is malfunctioning.  I thought it was just because this port is in use due to EADDRESSINUSE errors but even changing the port to 444 and rebooting the server the error persists/setting another port doesn't help.  This actually knocked apache2 out somehow. I had to use Webmin via the direct IP (domains wouldn't resolve of course) to restart the web-server.  \r\n\r\nThis is frustrating beyond belief.\r\n\r\nmanager@xagate:~/ripple-rest-1.6.0$ npm start\r\n \r\n> ripple-rest@1.6.0 start /home/manager/ripple-rest-1.6.0\r\n> node server/server.js\r\n\r\n2015-07-05T23:24:58.880Z - info: [RIPD] Attempting to connect to the Ripple network...\r\n2015-07-05T23:24:59.118Z - info: ripple-rest (v1.6.0)\r\n2015-07-05T23:24:59.129Z - info: server listening over HTTPS at port 5990\r\n2015-07-05T23:24:59.135Z - info: [DB] Initialized: /home/manager/ripple-rest-1.6.0/ripple-rest.db\r\n2015-07-05T23:24:59.144Z - error: uncaughtException: DEPTH_ZERO_SELF_SIGNED_CERT \r\n{ date: 'Sun Jul 05 2015 19:24:59 GMT-0400 (EDT)',\r\n  process: \r\n   { pid: 9167,\r\n     uid: 1002,\r\n     gid: 1002,\r\n     cwd: '/home/manager/ripple-rest-1.6.0',\r\n     execPath: '/usr/bin/nodejs',\r\n     version: 'v0.10.29',\r\n     argv: \r\n      [ 'node',\r\n        '/home/manager/ripple-rest-1.6.0/server/server.js' ],\r\n     memoryUsage: \r\n      { rss: 50933760,\r\n        heapTotal: 54096128,\r\n        heapUsed: 26089024 } },\r\n  os: \r\n   { loadavg: \r\n      [ 2.46337890625,\r\n        1.0615234375,\r\n        0.396484375 ],\r\n     uptime: 546429.285736408 },\r\n  trace: \r\n   [ { column: 32,\r\n       file: 'tls.js',\r\n       function: '',\r\n       line: 1365,\r\n       method: null,\r\n       native: false },\r\n     { column: 17,\r\n       file: 'events.js',\r\n       function: 'SecurePair.emit',\r\n       line: 92,\r\n       method: 'emit',\r\n       native: false },\r\n     { column: 10,\r\n       file: 'tls.js',\r\n       function: 'SecurePair.maybeInitFinished',\r\n       line: 977,\r\n       method: 'maybeInitFinished',\r\n       native: false },\r\n     { column: 13,\r\n       file: 'tls.js',\r\n       function: 'CleartextStream.read [as _read]',\r\n       line: 469,\r\n       method: 'read [as _read]',\r\n       native: false },\r\n     { column: 10,\r\n       file: '_stream_readable.js',\r\n       function: 'CleartextStream.Readable.read',\r\n       line: 323,\r\n       method: 'Readable.read',\r\n       native: false },\r\n     { column: 25,\r\n       file: 'tls.js',\r\n       function: 'EncryptedStream.write [as _write]',\r\n       line: 366,\r\n       method: 'write [as _write]',\r\n       native: false },\r\n     { column: 10,\r\n       file: '_stream_writable.js',\r\n       function: 'doWrite',\r\n       line: 226,\r\n       method: null,\r\n       native: false },\r\n     { column: 5,\r\n       file: '_stream_writable.js',\r\n       function: 'writeOrBuffer',\r\n       line: 216,\r\n       method: null,\r\n       native: false },\r\n     { column: 11,\r\n       file: '_stream_writable.js',\r\n       function: 'EncryptedStream.Writable.write',\r\n       line: 183,\r\n       method: 'Writable.write',\r\n       native: false },\r\n     { column: 24,\r\n       file: '_stream_readable.js',\r\n       function: 'write',\r\n       line: 585,\r\n       method: null,\r\n       native: false },\r\n     { column: 7,\r\n       file: '_stream_readable.js',\r\n       function: 'flow',\r\n       line: 594,\r\n       method: null,\r\n       native: false },\r\n     { column: 5,\r\n       file: '_stream_readable.js',\r\n       function: 'Socket.pipeOnReadable',\r\n       line: 626,\r\n       method: 'pipeOnReadable',\r\n       native: false },\r\n     { column: 17,\r\n       file: 'events.js',\r\n       function: 'Socket.emit',\r\n       line: 92,\r\n       method: 'emit',\r\n       native: false },\r\n     { column: 10,\r\n       file: '_stream_readable.js',\r\n       function: 'emitReadable_',\r\n       line: 410,\r\n       method: null,\r\n       native: false },\r\n     { column: 5,\r\n       file: '_stream_readable.js',\r\n       function: 'emitReadable',\r\n       line: 406,\r\n       method: null,\r\n       native: false },\r\n     { column: 9,\r\n       file: '_stream_readable.js',\r\n       function: 'readableAddChunk',\r\n       line: 168,\r\n       method: null,\r\n       native: false },\r\n     { column: 10,\r\n       file: '_stream_readable.js',\r\n       function: 'Socket.Readable.push',\r\n       line: 130,\r\n       method: 'Readable.push',\r\n       native: false },\r\n     { column: 21,\r\n       file: 'net.js',\r\n       function: 'TCP.onread',\r\n       line: 528,\r\n       method: 'onread',\r\n       native: false } ],\r\n  stack: \r\n   [ 'Error: DEPTH_ZERO_SELF_SIGNED_CERT',\r\n     '    at SecurePair.<anonymous> (tls.js:1365:32)',\r\n     '    at SecurePair.emit (events.js:92:17)',\r\n     '    at SecurePair.maybeInitFinished (tls.js:977:10)',\r\n     '    at CleartextStream.read [as _read] (tls.js:469:13)',\r\n     '    at CleartextStream.Readable.read (_stream_readable.js:323:10)',\r\n     '    at EncryptedStream.write [as _write] (tls.js:366:25)',\r\n     '    at doWrite (_stream_writable.js:226:10)',\r\n     '    at writeOrBuffer (_stream_writable.js:216:5)',\r\n     '    at EncryptedStream.Writable.write (_stream_writable.js:183:11)',\r\n     '    at write (_stream_readable.js:585:24)',\r\n     '    at flow (_stream_readable.js:594:7)',\r\n     '    at Socket.pipeOnReadable (_stream_readable.js:626:5)',\r\n     '    at Socket.emit (events.js:92:17)',\r\n     '    at emitReadable_ (_stream_readable.js:410:10)',\r\n     '    at emitReadable (_stream_readable.js:406:5)',\r\n     '    at readableAddChunk (_stream_readable.js:168:9)',\r\n     '    at Socket.Readable.push (_stream_readable.js:130:10)',\r\n     '    at TCP.onread (net.js:528:21)' ] }\r\n/\r\nnpm ERR! ripple-rest@1.6.0 start: `node server/server.js`\r\nnpm ERR! Exit status 1\r\nnpm ERR! \r\nnpm ERR! Failed at the ripple-rest@1.6.0 start script.\r\nnpm ERR! This is most likely a problem with the ripple-rest package,\r\nnpm ERR! not with npm itself.\r\nnpm ERR! Tell the author that this fails on your system:\r\nnpm ERR!     node server/server.js\r\nnpm ERR! You can get their info via:\r\nnpm ERR!     npm owner ls ripple-rest\r\nnpm ERR! There is likely additional logging output above.\r\nnpm ERR! System Linux 2.6.32-openvz-042stab108.5-amd64\r\nnpm ERR! command \"/usr/bin/node\" \"/usr/bin/npm\" \"start\"\r\nnpm ERR! cwd /home/manager/ripple-rest-1.6.0\r\nnpm ERR! node -v v0.10.29\r\nnpm ERR! npm -v 1.4.14\r\nnpm ERR! code ELIFECYCLE\r\nnpm ERR! \r\nnpm ERR! Additional logging details can be found in:\r\nnpm ERR!     /home/manager/ripple-rest-1.6.0/npm-debug.log\r\nnpm ERR! not ok code 0\r\nmanager@xagate:~/ripple-rest-1.6.0$ ps aux | grep npm    \r\nmanager  11164  0.0  0.0   8812   776 pts/7    S+   19:25   0:00 grep --color=auto npm\r\nmanager@xagate:~/ripple-rest-1.6.0$ ps aux | grep nodejs\r\nmanager  11526  0.0  0.0   8812   780 pts/7    S+   19:25   0:00 grep --color=auto nodejs\r\nmanager@xagate:~/ripple-rest-1.6.0$ cat npm-debug.log\r\n0 info it worked if it ends with ok\r\n1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]\r\n2 info using npm@1.4.14\r\n3 info using node@v0.10.29\r\n4 verbose node symlink /usr/bin/node\r\n5 verbose run-script [ 'prestart', 'start', 'poststart' ]\r\n6 info prestart ripple-rest@1.6.0\r\n7 info start ripple-rest@1.6.0\r\n8 verbose unsafe-perm in lifecycle true\r\n9 info ripple-rest@1.6.0 Failed to exec start script\r\n10 error ripple-rest@1.6.0 start: `node server/server.js`\r\n10 error Exit status 1\r\n11 error Failed at the ripple-rest@1.6.0 start script.\r\n11 error This is most likely a problem with the ripple-rest package,\r\n11 error not with npm itself.\r\n11 error Tell the author that this fails on your system:\r\n11 error     node server/server.js\r\n11 error You can get their info via:\r\n11 error     npm owner ls ripple-rest\r\n11 error There is likely additional logging output above.\r\n12 error System Linux 2.6.32-openvz-042stab108.5-amd64\r\n13 error command \"/usr/bin/node\" \"/usr/bin/npm\" \"start\"\r\n14 error cwd /home/manager/ripple-rest-1.6.0\r\n15 error node -v v0.10.29\r\n16 error npm -v 1.4.14\r\n17 error code ELIFECYCLE\r\n18 verbose exit [ 1, true ]\r\nmanager@xagate:~/ripple-rest-1.6.0$ cat config.json\r\n{\r\n  \"config_version\": \"2.0.3\",\r\n  \"debug\": false,\r\n  \"port\": 5990,\r\n  \"host\": \"185.82.201.85\",\r\n  \"ssl_enabled\": true,\r\n  \"ssl\": {\r\n    \"key_path\": \"xagate.com.key\",\r\n    \"cert_path\": \"xagate.com.crt\",\r\n    \"reject_unauthorized\": true\r\n  },\r\n  \"db_path\": \"./ripple-rest.db\",\r\n  \"max_transaction_fee\": 1000000,\r\n  \"rippled_servers\": [\r\n    \"wss://xagate.com:443\"\r\n  ]\r\n}\r\n\r\nThis is not a major problem with REST itself as I can run it with HTTPS disabled then access the ws socket via port 51233 but I still can't in good faith attempt to post update_account_settings to my Gateway wallet until the REST/rippled server function as expected (and was doing so an hour ago).\r\n\r\nmanager@xagate:~/ripple-rest-1.6.0$ npm start\r\n \r\n> ripple-rest@1.6.0 start /home/manager/ripple-rest-1.6.0\r\n> node server/server.js\r\n\r\n2015-07-05T23:54:26.794Z - info: [RIPD] Attempting to connect to the Ripple network...\r\n2015-07-05T23:54:27.037Z - info: ripple-rest (v1.6.0)\r\n2015-07-05T23:54:27.043Z - info: server listening over UNSECURED HTTP at port 5990\r\n2015-07-05T23:54:27.055Z - info: [DB] Initialized: /home/manager/ripple-rest-1.6.0/ripple-rest.db\r\n2015-07-05T23:54:27.060Z - info: [RIPD] Connected to rippled server: ws://xagate.com:51233 (n9J6CDQGuSrS8fQ691tQwNcXLaVEKE4FmpK6uSFiPpCJarUPCyaV)\r\n-015-07-05T23:54:27.516Z - info: [RIPD] Connection established  \r\n\r\nPlease check [this thread](https://forum.ripple.com/viewtopic.php?f=2&t=10627&p=64994#p64994) and [this one too](https://forum.ripple.com/viewtopic.php?f=2&t=10619) for more information to assist with troubleshooting this issue."},"comment":{"url":"https://api.github.com/repos/ripple/ripple-rest/issues/comments/119030984","html_url":"https://github.com/ripple/ripple-rest/issues/381#issuecomment-119030984","issue_url":"https://api.github.com/repos/ripple/ripple-rest/issues/381","id":119030984,"user":{"login":"clark800","id":1238722,"avatar_url":"https://avatars.githubusercontent.com/u/1238722?v=3","gravatar_id":"","url":"https://api.github.com/users/clark800","html_url":"https://github.com/clark800","followers_url":"https://api.github.com/users/clark800/followers","following_url":"https://api.github.com/users/clark800/following{/other_user}","gists_url":"https://api.github.com/users/clark800/gists{/gist_id}","starred_url":"https://api.github.com/users/clark800/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clark800/subscriptions","organizations_url":"https://api.github.com/users/clark800/orgs","repos_url":"https://api.github.com/users/clark800/repos","events_url":"https://api.github.com/users/clark800/events{/privacy}","received_events_url":"https://api.github.com/users/clark800/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T00:00:01Z","updated_at":"2015-07-07T00:00:01Z","body":"It looks like your system doesn't have the RapidSSL root certificate installed. See if this helps: http://serverfault.com/questions/391487/why-is-my-rapidssl-certificate-chain-is-not-trusted-on-ubuntu"}}