Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
2.6k views
by
edited

Hi there,

running "sudo site domain.com -ssl=on" results in an error-message, see below. DNS-entries are correct.

Output of "systemctl status nginx.service"

  • Nov 02 00:09:57 localhost systemd[1]: Starting A high performance web server and a reverse proxy server... Nov 02 00:10:03 v22017123818957639.luckysrv.de systemd[1]: Started A high performance web server and a reverse proxy server. Nov 02 00:11:29 v22017123818957639.luckysrv.de systemd[1]: Reloading A high performance web server and a reverse proxy server. Nov 02 00:11:29 v22017123818957639.luckysrv.de nginx[2099]: nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 32 Nov 02 00:11:29 v22017123818957639.luckysrv.de systemd[1]: nginx.service: Control process exited, code=exited status=1

Please have a look at this

Thanks in advance

Rüdiger

1 Answer

0 votes
by Expert

Hi Rüdiger,

  • The correct command is: -ssl-on, with "-" (hyphen) instead of "=" (equal). I'm planning to standarized this in the future.
  • I tried to visit your site www.rerdmann.eu and seems like is not online or your DNS is not pointing to your server. You can not request a cert for an inaccesible-offline site.
Regards.
by
I know, and it was not meant as criticism. I think Webinoly is still great, but actually it doesn't work for me.

Actually I'm giving oneinstack a try. Much more complicated, but that domain-thing (lets encrypt) seemed to work, however I'm using my custom certificates now.

Thanks

Rüdiger
by

Hi there, solution found. It's not a problem of domains and their dns, it's a problem with a Nginx-Setting: I've tried it on the old one of my two vps (old in terms of processor). It's about this (taken from Nginx-documentation), configured in nginx.conf, see below. After removing the # from the line  (server_names_hash_bucket_size) it works with value left at 32. Perhaps you could integrate this in Webinoly in any way?

Thanks

Rüdiger

If a large number of server names are defined, or unusually long server names are defined, tuning the server_names_hash_max_size and server_names_hash_bucket_size directives at the http level may become necessary. The default value of the server_names_hash_bucket_size directive may be equal to 32, or 64, or another value, depending on CPU cache line size. If the default value is 32 and server name is defined as “too.long.server.name.example.org” then nginx will fail to start and display the error message:

could not build the server_names_hash,
you should increase server_names_hash_bucket_size: 32

In this case, the directive value should be increased to the next power of two:

http {
    server_names_hash_bucket_size  64;
    ...

If a large number of server names are defined, another error message will appear:

could not build the server_names_hash,
you should increase either server_names_hash_max_size: 512
or server_names_hash_bucket_size: 32

In such a case, first try to set server_names_hash_max_size to a number close to the number of server names. Only if this does not help, or if nginx’s start time is unacceptably long, try to increaseserver_names_hash_bucket_size.

by

Hi there, solution found. It's not a problem of domains and their dns, it's a problem with a Nginx-Setting: I've tried it on the old one of my two vps (old in terms of processor).

It's about this (taken from Nginx-documentation), configured in nginx.conf, see below. 

After removing the # from the line (server_names_hash_max_size) it works with value left at 32. Perhaps you could integrate this in Webinoly in any way?

Thanks

Rüdiger

If a large number of server names are defined, or unusually long server names are defined, tuning the server_names_hash_max_size and server_names_hash_bucket_size directives at the http level may become necessary. The default value of the server_names_hash_bucket_size directive may be equal to 32, or 64, or another value, depending on CPU cache line size. If the default value is 32 and server name is defined as “too.long.server.name.example.org” then nginx will fail to start and display the error message:

could not build the server_names_hash,
you should increase server_names_hash_bucket_size: 32

In this case, the directive value should be increased to the next power of two:

http {
    server_names_hash_bucket_size  64;
    ...

If a large number of server names are defined, another error message will appear:

could not build the server_names_hash,
you should increase either server_names_hash_max_size: 512
or server_names_hash_bucket_size: 32

In such a case, first try to set server_names_hash_max_size to a number close to the number of server names. Only if this does not help, or if nginx’s start time is unacceptably long, try to increaseserver_names_hash_bucket_size.

by Expert
I'm glad that you have found a solution.

As I said before your site were not accesible and now you know it was due to an Nginx issue. I've seen this problem before and it's very erratic, I will put a high number in these "hash" variables to prevent this error.
by
great, thanks a lot :)

Regards, Rüdiger
Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...