Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx Configuration Warnings: Deprecated "listen ... http2" directive and #5764

Closed
kayiwa opened this issue Jan 18, 2025 · 1 comment
Closed
Assignees
Labels
Operations pulls issues into the Operations ZenHub board

Comments

@kayiwa
Copy link
Member

kayiwa commented Jan 18, 2025

This ticket documents multiple warnings encountered while running sudo nginx -t to test the Nginx configuration.

Warnings:

  • Deprecated "listen ... http2" directive: The warnings indicate that several configuration files are using the deprecated listen ... http2 directive. The recommended replacement is the http2 directive. This should be updated across all affected configurations.
    • List of affected files:
      • /etc/nginx/conf.d/figgy-prod.conf (line 27)
      • /etc/nginx/conf.d/figgy-staging.conf (line 25)
      • /etc/nginx/conf.d/fpul-prod.conf (line 23)
      • ... (list continues - please see full output for details)
  • Protocol options redefined: The warnings also mention multiple instances of redefined protocol options for 0.0.0.0:443. This could potentially lead to unexpected behavior. Further investigation is needed to identify the root cause and implement a proper fix.
    • List of affected files (where applicable):
      • /etc/nginx/conf.d/figgy-staging.conf (line 25)
      • ... (list continues - please see full output for details)
  • server_names_hash warnings: The configuration test mentions warnings related to server_names_hash. The output suggests that increasing either server_names_hash_max_size or server_names_hash_bucket_size might be necessary.
  • Conflicting server name: The test identified a conflicting server name "cdh-test-derrida.princeton.edu" on 0.0.0.0:443. This needs to be addressed to avoid potential issues.
    - Proposed Resolution:
  1. Update all occurrences of the deprecated listen ... http2 directive to the recommended http2 directive in the affected configuration files.
  2. Investigate the cause of redefined protocol options for 0.0.0.0:443 and implement a solution to ensure proper configuration.
  3. Increase server_names_hash_max_size or server_names_hash_bucket_size in the Nginx configuration based on the recommendation from the test output.
  4. Resolve the conflicting server name "cdh-test-derrida.princeton.edu" on 0.0.0.0:443.
  • Additional Notes:
  • swap out all configs that have listen 443 ssl http2; to have listen 443 ssl;
  • investigate server_hash problem

The complete output of sudo nginx -t

nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/figgy-prod.conf:27
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/figgy-staging.conf:25
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/figgy-staging.conf:25
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/fpul-prod.conf:23
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/geaccirc.conf:32
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/imagecat_staging.conf:25
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/imagecat_staging.conf:25
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/issuetracker.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/lae-staging.conf:33
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/lae-staging.conf:33
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/lib-jobs-prod.conf:32
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/lib-jobs-staging.conf:32
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/lib-jobs-staging.conf:32
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/lib-sc-prod.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/lib-sc-staging.conf:25
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/libimages.conf:33
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/lockers-and-study-spaces-staging.conf:32
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/lockers-and-study-spaces-staging.conf:32
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/lrp.conf:23
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/maps-prod.conf:25
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/maps-prod.conf:25
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/maps-staging.conf:23
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/oawaiver-prod.conf:33
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/oawaiver-staging.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/ojs-prod.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/ojs-staging.conf:24
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/orcid_prod.conf:35
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pdc-describe_prod.conf:30
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/pdc-describe_prod.conf:30
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pdc-describe_staging.conf:31
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pdc-discovery_prod.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pdc-discovery_staging.conf:25
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pudl_prod.conf:22
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pudl_prod.conf:34
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pulcheck_staging.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pulfa_old.conf:23
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/pulfalight-prod.conf:25
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pulfalight-qa.conf:23
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/pulfalight-qa.conf:23
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/pulfalight-staging.conf:32
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/pulmonitor_staging.conf:23
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/pulmonitor_staging.conf:23
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/rbsc-prod.conf:11
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/recap-prod.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/recap-prod.conf:46
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/recap-staging.conf:25
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/repec-prod.conf:32
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/repec-staging.conf:31
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/slavery-dev.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/slavery-prod.conf:31
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/slavery-staging.conf:31
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/static_prod.conf:60
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/svn-prod.conf:24
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/svn-prod.conf:24
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/svn-staging.conf:24
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/thesis_central.conf:13
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/towerdeploy_prod.conf:23
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/towerdeploy_prod.conf:23
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/veridian-sites.conf:62
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/veridian-sites.conf:84
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/veridian-sites.conf:106
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/conf.d/veridian-sites.conf:129
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/veridian-sites.conf:129
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/videoreserves_prod.conf:31
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64; ignoring server_names_hash_bucket_size
nginx: [warn] conflicting server name "cdh-test-derrida.princeton.edu" on 0.0.0.0:443, ignored
nginx: [warn] could not build optimal server_names_hash, you should increase either server_names_hash_max_size: 512 or server_names_hash_bucket_size: 64; ignoring server_names_hash_bucket_size
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
@kayiwa
Copy link
Member Author

kayiwa commented Jan 18, 2025

related to #4090

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Operations pulls issues into the Operations ZenHub board
Projects
None yet
Development

No branches or pull requests

3 participants