Skip to content

Error when setting HTTPS #5

Open

Description

@nesjett

Node doesnt starts when setting scheme to 'https'

Activity

  1. lonalore commented on Oct 29, 2018

    @lonalore
    Owner

    That's very little information. Can you provide me more details? URL for your website, errors on console etc...

  2. nesjett commented on Oct 29, 2018

    @nesjett
    Author

    Sorry, I just wanted to know if it´s a known issue.

    Config:
    scheme: 'https', port: 8000, host: 'domain', resource: '/socket.io', serviceKey: '', backend: { port: 80, host: 'domain', scheme: 'https', basePath: '', // If your e107 is in a subfolder, use this syntax: /my_folder messagePath: '/e107_plugins/nodejs/nodejs.php' . . .

    Console error:
    `
    fs.js:667
    return binding.open(pathModule.toNamespacedPath(path),
    ^

    Error: ENOENT: no such file or directory, open ''
    at Object.fs.openSync (fs.js:667:18)
    at Object.fs.readFileSync (fs.js:572:33)
    at Object. (/var/www/vhosts/domain/httpdocs/e107_plugins/nodejs/server.js:1548:11)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)
    at Function.Module._load (module.js:493:3)
    at Function.Module.runMain (module.js:690:10)
    at startup (bootstrap_node.js:194:16)
    `

  3. lonalore commented on Oct 29, 2018

    @lonalore
    Owner

    You should also provide .key, .crt and .bundle files for your SSL, like:

    sslKeyPath: '/var/www/clients/client2/web2/ssl/e107hungary.org-le.key',
    sslCertPath: '/var/www/clients/client2/web2/ssl/e107hungary.org-le.crt',
    sslCAPath: '/var/www/clients/client2/web2/ssl/e107hungary.org-le.bundle',
    
  4. nesjett commented on Oct 29, 2018

    @nesjett
    Author

    Thank you, I missed this part, only forced redirection to https.

    Anyway I´m not confortable with certs at all, Ive copied the cert keys into files with the right extension and configured it, but its not working at all (works partially)

    Some things works, like node chatbox, but PM (that worked right in http mode) is not working now. I get some errors on login to, like:

    Error with authenticate client request: { Error: write EPROTO 140335337731904:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:

    at WriteWrap.afterWrite [as oncomplete] (net.js:844:14) errno: 'EPROTO', code: 'EPROTO', syscall: 'write' }
    

    getNodejsSessionIdsFromUid { uid: undefined,
    sessionIds:
    [ 'K_dlxHbuDh8giVJ_AAAA',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions