[Greenlock] HTTP exception logged for user-provided handler. #48

已关闭
由 Ghost 于 2020-04-11 04:13:26 +00:00 打开 · 2 评论

When I attempt to run Greenlock on our server (which is still using v3, haven't had time to upgrade my Angular Universal Node app to v4 yet) I get the following error rendered in my browser:

Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.

This is what the real meat of my greenlock.js file looks like:

var path = require('path');
var os = require('os')
var Greenlock = require('greenlock');
var GreenlockExpress = require('greenlock-express')

var greenlock = GreenlockExpress.create({
    version: 'draft-12',
    email: 'john.doe@yahoo.com',
    agreeTos: true,
    server: 'https://acme-v02.api.letsencrypt.org/directory',
    approveDomains: approveDomains,
    app: function (req, res) {
        console.log(req.url);
        var myapp = require("./server.ts");
        console.log(myapp.toString());
        myapp(req, res);
    },
    store: store,
    renewBy: 10 * 24 * 60 * 60 * 1000,
    renewWithin: 14 * 24 * 60 * 60 * 1000
});

I tried searching the code where the error is raised for hints and didn't come up with any ideas. Any thoughts?

https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/efd7693dcd9622bae768658066f55cff17bc2605/index.js

Also FWIW, the server.ts file does export an Express app: module.exports = app;

When I attempt to run Greenlock on our server (which is still using v3, haven't had time to upgrade my Angular Universal Node app to v4 yet) I get the following error rendered in my browser: ```Internal Server Error: [Greenlock] HTTP exception logged for user-provided handler.``` This is what the real meat of my `greenlock.js` file looks like: ``` var path = require('path'); var os = require('os') var Greenlock = require('greenlock'); var GreenlockExpress = require('greenlock-express') var greenlock = GreenlockExpress.create({ version: 'draft-12', email: 'john.doe@yahoo.com', agreeTos: true, server: 'https://acme-v02.api.letsencrypt.org/directory', approveDomains: approveDomains, app: function (req, res) { console.log(req.url); var myapp = require("./server.ts"); console.log(myapp.toString()); myapp(req, res); }, store: store, renewBy: 10 * 24 * 60 * 60 * 1000, renewWithin: 14 * 24 * 60 * 60 * 1000 }); ``` I tried searching the code where the error is raised for hints and didn't come up with any ideas. Any thoughts? [https://git.coolaj86.com/coolaj86/greenlock-express.js/src/commit/efd7693dcd9622bae768658066f55cff17bc2605/index.js](http://) Also FWIW, the `server.ts` file does export an Express app: `module.exports = app;`
管理员

Just seeing this.

You've probably already found a solution, but I'd say check out the Greenlock Express QuickStart in the README.

It'll take less than 5 minutes to go from what you've got there to the simpler setup with the new version.

Just seeing this. You've probably already found a solution, but I'd say check out the Greenlock Express QuickStart in the README. It'll take less than 5 minutes to go from what you've got there to the simpler setup with the new version.
管理员

Closing since this is old, but feel free to re-open if needed.

Closing since this is old, but feel free to re-open if needed.
coolaj862020-07-30 22:30:24 +00:00 关闭此工单
登录 并参与到对话中。
未选择标签
2 名参与者
通知
到期时间
未设置到期时间。
依赖工单

没有设置依赖项。

参考:coolaj86/greenlock.js-ARCHIVED#48
没有提供说明。