chef / chef/chef-server

sudo chef-server-ctl reindex reports error if using a non default port for nginx

Open
#594 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Consider for next release Status: To be prioritized Triage: Try Reproducing Type: Bug
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

$ grep nginx /etc/opscode/chef-server.rb
nginx['ssl_port'] = 9443

This workaround fixed the issue for me.

sed -i 's|https://127.0.0.1|https://127.0.0.1:9443|g' /opt/opscode/embedded/service/opscode-erchef/bin/reindex-opc-organization

https://github.com/chef/chef-server/blob/6183e7c49919f2a699ceb0bfcef9cddbe61fc106/src/oc_erchef/priv/reindex-opc-organization should be able to read the nginx port from Chef configuration or Chef Server like this:

$ sudo chef-server-ctl show-config | grep ssl_port
"ssl_port": 9443,
"non_ssl_port": 9080,

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/oc_erchef/priv/reindex-opc-organization and compare its endpoint with the Chef Server configuration shown by chef-server-ctl show-config. Reproduce the failure using nginx['ssl_port'] = 9443, then verify that sudo chef-server-ctl reindex works with the configured non-default port without the sed workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang, nginx
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.