warning: No sites available. Did you add them? #21

Open
opened 2019-12-09 20:07:50 +00:00 by Ghost · 7 comments

Hello, i am getting a message:
warning: No sites available. Did you add them?
npx greenlock add --subject example.com --altnames example.com
invalid maintainer contact info: 'jon@example.com'

I am on windows localhost , using same steps as described in docs:

1.npx greenlock init --maintainer-email 'jon@example.com' --manager-config-file ./greenlock.json
/** creates 3 files **/

2.npx greenlock defaults --subscriber-email 'jon@example.com' --agree-to-terms

3.npx greenlock add --subject example.com --altnames example.com

then i start my node app and i get the error, how can i make it work? Thanks!

Update:
I also tried on my dedicated serve and i followed same steps but i changed the email to my domain email:

1.npx greenlock init --maintainer-email 'info@mydomain.com' --manager-config-file

2.npx greenlock defaults --subscriber-email 'info@mydomain.com' --agree-to-terms

3.npx greenlock add --subject mydomain.com --altnames mydomain.com

than i run: node app.js
and same error:
warning: No sites available. Did you add them?
npx greenlock add --subject example.com --altnames example.com
invalid maintainer contact info: 'info@mydomain.com'

Hello, i am getting a message: warning: No sites available. Did you add them? npx greenlock add --subject example.com --altnames example.com invalid maintainer contact info: 'jon@example.com' I am on windows localhost , using same steps as described in docs: 1.npx greenlock init --maintainer-email 'jon@example.com' --manager-config-file ./greenlock.json /** creates 3 files **/ 2.npx greenlock defaults --subscriber-email 'jon@example.com' --agree-to-terms 3.npx greenlock add --subject example.com --altnames example.com then i start my node app and i get the error, how can i make it work? Thanks! Update: I also tried on my dedicated serve and i followed same steps but i changed the email to my domain email: 1.npx greenlock init --maintainer-email 'info@mydomain.com' --manager-config-file 2.npx greenlock defaults --subscriber-email 'info@mydomain.com' --agree-to-terms 3.npx greenlock add --subject mydomain.com --altnames mydomain.com than i run: node app.js and same error: warning: No sites available. Did you add them? npx greenlock add --subject example.com --altnames example.com invalid maintainer contact info: 'info@mydomain.com'
Author

I found this discussion #9 and i tried to add a webiste in greenlock.json as you mentioned it there:
{
"defaults": {},
"sites": [{
"subject": "mydoamin.com",
"altnames": [ "mydoamin.com", "www.mydoamin.com"]
}]
}

and got a message:
Ready to Serve:
mydoamin.com www.mydoamin.com
invalid maintainer contact info: 'info@mydoamin.com'

So i guess it's working but how do i fix invalid maintainer contact info?
Thanks

I found this discussion https://git.rootprojects.org/root/greenlock-express.js/issues/9 and i tried to add a webiste in greenlock.json as you mentioned it there: { "defaults": {}, "sites": [{ "subject": "mydoamin.com", "altnames": [ "mydoamin.com", "www.mydoamin.com"] }] } and got a message: Ready to Serve: mydoamin.com www.mydoamin.com invalid maintainer contact info: 'info@mydoamin.com' So i guess it's working but how do i fix invalid maintainer contact info? Thanks
Author

Unfortunately after 5 hours i can't figure out how to fix invalid maintainer issue, i have tried everything from the scratch and same thing over and over!

here are my steps:

npx greenlock init --maintainer-email info@mydomain.com --manager-config-file ./greenlock.json
Creating C:\Users\Administrator\Desktop\mydomain\ .greenlockrc

Wrote C:\Users\Administrator\Desktop\mydomain\.greenlockrc

created 'greenlock.js'

created 'server.js'

created 'app.js'

(no greenlock.json were created)
npx greenlock defaults --subscriber-email info@mydomain.com --agree-to-terms

does nothing only open my editor with the file greenlock.js

npx greenlock add --subject mydomain.com --altnames mydomain.com,www.mydomain.com

does nothing only open my editor with the file greenlock.js

4.delete greenlock.js and run again:

npx greenlock defaults --subscriber-email info@mydomain.com --agree-to-terms

(create greenlock.json)

{
  "defaults": {
    "store": {
      "module": "greenlock-store-fs",
      "basePath": "./greenlock.d"
    },
    "challenges": {
      "http-01": {
        "module": "acme-http-01-standalone"
      }
    },
    "renewOffset": "-45d",
    "renewStagger": "3d",
    "accountKeyType": "EC-P256",
    "serverKeyType": "RSA-2048",
    "subscriberEmail": "info@mydomain.com",
    "agreeToTerms": true
  },
  "sites": []
}

5.run again npx greenlock add --subject mydoamin.com --altnames mydoamin.com,www.mydoamin.com

results:

subject: "mydomain.com"

altnames: ["mydomain.com","www.mydomain.com"]

renewAt: 1

defaults:

        store:{"module":"greenlock-store-fs","basePath":"./greenlock.d"}

        challenges:{"http-01":{"module":"acme-http-01-standalone"}}

6.run my app: node app.js

require("greenlock-express")
                  .init(function getConfig() {
                      return {
                          package: { name: "mydoamin", version: 1 },
                          maintainerEmail: "info@mydoamin.com",
                          cluster: false,
                          packageRoot: path.resolve(__dirname,'../')
                      };
                  })
                  .serve((glx) => {
                      var httpServer = glx.httpServer(function(req, res) {
                          res.statusCode = 301;
                          res.setHeader("Location", "https://" + req.headers.host + req.path);
                          res.end("Insecure connections are not allowed. Redirecting...");
                      });
    
                      httpServer.listen(443,'123.123.123.123' /* <= this is where i use my ip */, function() {
                          console.info("Listening on ", httpServer.address());
                      });
                  });

results:
Listening on { address: '123.123.123.123', family: 'IPv4', port: 443 }

Ready to Serve:
mydoamin.com www.mydoamin.com

invalid maintainer contact info: info@mydoamin.com

(by the way, i find https://git.rootprojects.org/ one of the worst gits i ever used!!! It's down every few hours and editor is a nightmare!)

Unfortunately after 5 hours i can't figure out how to fix invalid maintainer issue, i have tried everything from the scratch and same thing over and over! here are my steps: 1. ``` npx greenlock init --maintainer-email info@mydomain.com --manager-config-file ./greenlock.json ``` ``` Creating C:\Users\Administrator\Desktop\mydomain\ .greenlockrc Wrote C:\Users\Administrator\Desktop\mydomain\.greenlockrc created 'greenlock.js' created 'server.js' created 'app.js' (no greenlock.json were created) ``` 2. ``` npx greenlock defaults --subscriber-email info@mydomain.com --agree-to-terms ``` does nothing only open my editor with the file greenlock.js 3. ``` npx greenlock add --subject mydomain.com --altnames mydomain.com,www.mydomain.com ``` does nothing only open my editor with the file greenlock.js 4.delete greenlock.js and run again: ``` npx greenlock defaults --subscriber-email info@mydomain.com --agree-to-terms ``` (create greenlock.json) ``` { "defaults": { "store": { "module": "greenlock-store-fs", "basePath": "./greenlock.d" }, "challenges": { "http-01": { "module": "acme-http-01-standalone" } }, "renewOffset": "-45d", "renewStagger": "3d", "accountKeyType": "EC-P256", "serverKeyType": "RSA-2048", "subscriberEmail": "info@mydomain.com", "agreeToTerms": true }, "sites": [] } ``` 5.run again npx greenlock add --subject mydoamin.com --altnames mydoamin.com,www.mydoamin.com results: ``` subject: "mydomain.com" altnames: ["mydomain.com","www.mydomain.com"] renewAt: 1 defaults: store:{"module":"greenlock-store-fs","basePath":"./greenlock.d"} challenges:{"http-01":{"module":"acme-http-01-standalone"}} ``` 6.run my app: node app.js ``` require("greenlock-express") .init(function getConfig() { return { package: { name: "mydoamin", version: 1 }, maintainerEmail: "info@mydoamin.com", cluster: false, packageRoot: path.resolve(__dirname,'../') }; }) .serve((glx) => { var httpServer = glx.httpServer(function(req, res) { res.statusCode = 301; res.setHeader("Location", "https://" + req.headers.host + req.path); res.end("Insecure connections are not allowed. Redirecting..."); }); httpServer.listen(443,'123.123.123.123' /* <= this is where i use my ip */, function() { console.info("Listening on ", httpServer.address()); }); }); ``` results: Listening on { address: '123.123.123.123', family: 'IPv4', port: 443 } Ready to Serve: mydoamin.com www.mydoamin.com invalid maintainer contact info: info@mydoamin.com (by the way, i find https://git.rootprojects.org/ one of the worst gits i ever used!!! It's down every few hours and editor is a nightmare!)
Author

its because of the duplicate quotes: " ' someemail@someurl ' "
at least thets what the command generated for me.

its because of the duplicate quotes: " ' someemail@someurl ' " at least thets what the command generated for me.
Author

on windows second and third command did nothing (at least for me) but i ran it on a raspberrypi and copied the greenlock.json file

EDIT: the issue has been raised before and a quick fix has been described here: #17

on windows second and third command did nothing (at least for me) but i ran it on a raspberrypi and copied the greenlock.json file EDIT: the issue has been raised before and a quick fix has been described here: #17
Author

the config options also confuse me as well tho

the config options also confuse me as well tho
Owner

i can’t figure out how to fix invalid maintainer issue

You just have to use a valid email address. Fake email addresses (domains that don't have valid MX records) won't work.

> i can’t figure out how to fix invalid maintainer issue You just have to use a valid email address. Fake email addresses (domains that don't have valid MX records) won't work.
Owner

does nothing only open my editor with the file greenlock.js

Windows has a longstanding bug with node where you can't have a file in a directory with the same name as an npm command.

I published v4, which uses a config directory rather than a a greenlock.js or greenlock.json file, which causes the problem with windows.

My guess is that some of the issues you were having were windows specific, which I hadn't tested as well initially

editor is a nightmare!

This requires using Markdown, which is also supported by Github, Gitlab, and the others. I'd suggest learning markdown basics, like code blocks:

```js
// a javascript code block

function dostuff() { /* ... */ }
```

# This is a header

- this is
- a
- bulleted list
> does nothing only open my editor with the file greenlock.js Windows has a longstanding bug with node where you can't have a file in a directory with the same name as an npm command. I published v4, which uses a config directory rather than a a `greenlock.js` or `greenlock.json` file, which causes the problem with windows. My guess is that some of the issues you were having were windows specific, which I hadn't tested as well initially > editor is a nightmare! This requires using Markdown, which is also supported by Github, Gitlab, and the others. I'd suggest learning markdown basics, like code blocks: ~~~ ```js // a javascript code block function dostuff() { /* ... */ } ``` # This is a header - this is - a - bulleted list ~~~
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: root/greenlock-express.js#21
No description provided.