{"action":"opened","issue":{"url":"https://api.github.com/repos/chef-cookbooks/chef-server/issues/108","labels_url":"https://api.github.com/repos/chef-cookbooks/chef-server/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/chef-server/issues/108/comments","events_url":"https://api.github.com/repos/chef-cookbooks/chef-server/issues/108/events","html_url":"https://github.com/chef-cookbooks/chef-server/issues/108","id":105859520,"number":108,"title":"private-chef cookbook crashing with common-name attribute","user":{"login":"dfduarte","id":12836366,"avatar_url":"https://avatars.githubusercontent.com/u/12836366?v=3","gravatar_id":"","url":"https://api.github.com/users/dfduarte","html_url":"https://github.com/dfduarte","followers_url":"https://api.github.com/users/dfduarte/followers","following_url":"https://api.github.com/users/dfduarte/following{/other_user}","gists_url":"https://api.github.com/users/dfduarte/gists{/gist_id}","starred_url":"https://api.github.com/users/dfduarte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfduarte/subscriptions","organizations_url":"https://api.github.com/users/dfduarte/orgs","repos_url":"https://api.github.com/users/dfduarte/repos","events_url":"https://api.github.com/users/dfduarte/events{/privacy}","received_events_url":"https://api.github.com/users/dfduarte/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-10T17:36:19Z","updated_at":"2015-09-10T17:36:19Z","closed_at":null,"body":"Good afternoon,\r\n\r\nI'm trying to run the chef-server cookbook using chef-provisioning, and it returning the following error:\r\n\r\n                      ================================================================================\r\n                              Recipe Compile Error in /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb\r\n                              ================================================================================\r\n                              \r\n                              Chef::Exceptions::ValidationFailed\r\n                              ----------------------------------\r\n                              common_name is required\r\n                              \r\n                              Cookbook Trace:\r\n                              ---------------\r\n                                /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/nginx.rb:58:in `block in from_file'\r\n                                /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/nginx.rb:57:in `from_file'\r\n                                /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb:208:in `block in from_file'\r\n                                /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb:191:in `each'\r\n                                /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/default.rb:191:in `from_file'\r\n                              \r\n                              Relevant File Content:\r\n                              ----------------------\r\n                              /opt/opscode/embedded/cookbooks/cache/cookbooks/private-chef/recipes/nginx.rb:\r\n                              \r\n                               51:  \r\n                               52:  ssl_keyfile = File.join(nginx_ca_dir, \"#{node['private_chef']['nginx']['server_name']}.key\")\r\n                               53:  ssl_crtfile = File.join(nginx_ca_dir, \"#{node['private_chef']['nginx']['server_name']}.crt\")\r\n                               54:  ssl_dhparam = File.join(nginx_ca_dir, 'dhparams.pem')\r\n                               55:  \r\n                               56:  # Generate self-signed SSL certificate\r\n                               57:  openssl_x509 ssl_crtfile do\r\n                               58>>   common_name node['private_chef']['nginx']['server_name']\r\n                               59:    org node['private_chef']['nginx']['ssl_company_name']\r\n                               60:    org_unit node['private_chef']['nginx']['ssl_organizational_unit_name']\r\n                               61:    country node['private_chef']['nginx']['ssl_country_name']\r\n                               62:    key_length node['private_chef']['nginx']['ssl_key_length']\r\n                               63:    expire node['private_chef']['nginx']['ssl_duration']\r\n                               64:    owner 'root'\r\n                               65:    group 'root'\r\n                               66:    mode '0644'\r\n                               67:  end\r\n                              \r\n                              [2015-09-10T17:10:11+00:00] ERROR: Running exception handlers\r\n                              [2015-09-10T17:10:11+00:00] ERROR: Exception handlers complete\r\n                              [2015-09-10T17:10:11+00:00] FATAL: Stacktrace dumped to /opt/opscode/embedded/cookbooks/cache/chef-stacktrace.out\r\n                              [2015-09-10T17:10:13+00:00] FATAL: Chef::Exceptions::ValidationFailed: common_name is required\r\n                              STDERR: sudo: unable to resolve host ip-10-0-0-151\r\n                              sudo: unable to resolve host ip-10-0-0-151\r\n                              sudo: unable to resolve host ip-10-0-0-151\r\n                              ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist\r\n                              sudo: unable to resolve host ip-10-0-0-151\r\n                              ERROR: CONFIGURATION ERROR:Specified config file /etc/opscode/pivotal.rb does not exist\r\n                              ---- End output of \"bash\"  \"/tmp/chef-script20150910-3220-19gpj5q\" ----\r\n                              Ran \"bash\"  \"/tmp/chef-script20150910-3220-19gpj5q\" returned 1\r\n                              \r\n                              Resource Declaration:\r\n                              ---------------------\r\n                              # In /var/chef/cache/cookbooks/ac-chef-server/recipes/default.rb\r\n                              \r\n                               35: bash 'InstallUsers' do\r\n                               36:   user 'root'\r\n                               37:   cwd '/tmp'\r\n                               38:   ignore_failure true\r\n                               39:   code <<-EOH\r\n                               40:   #!/bin/bash\r\n                               41:   sudo chef-server-ctl reconfigure\r\n                               42:   sudo chef-server-ctl restart\r\n                               43:   sleep 10\r\n                               44:   sudo chef-server-ctl user-create #{node[\"ac-chef-server\"][\"create-user-webui\"][\"default-login\"]} #{node[\"ac-chef-server\"][\"create-user-webui\"][\"default-first-name\"]} #{node[\"ac-chef-server\"][\"create-user-webui\"][\"default-last-name\"]} #{node[\"ac-chef-server\"][\"create-user-webui\"][\"default-email\"]} #{node[\"ac-chef-server\"][\"create-user-webui\"][\"default-password\"]}\r\n                               45:   sudo chef-server-ctl org-create #{node[\"ac-chef-server\"][\"create-organization-webui\"][\"short-org-name\"]} #{node[\"ac-chef-server\"][\"create-organization-webui\"][\"full-org-name\"]}\r\n                               46: \r\n                               47: \r\n                               48:   EOH\r\n                               49: end\r\n                               50: \r\n                              \r\n                              Compiled Resource:\r\n                              ------------------\r\n                              # Declared in /var/chef/cache/cookbooks/ac-chef-server/recipes/default.rb:35:in `from_file'\r\n                              \r\n                              bash(\"InstallUsers\") do\r\n                                action [:run]\r\n                                ignore_failure true\r\n                                retries 0\r\n                                retry_delay 2\r\n                                default_guard_interpreter :default\r\n                                command \"InstallUsers\"\r\n                                backup 5\r\n                                cwd \"/tmp\"\r\n                                returns 0\r\n                                user \"root\"\r\n                                code \"  #!/bin/bash\\n  sudo chef-server-ctl reconfigure\\n  sudo chef-server-ctl restart\\n  sleep 10\\n  sudo chef-server-ctl user-create avenuecode Avenue Code dduarte@avenuecode.com ac4success\\n  sudo chef-server-ctl org-create ac AvenueCode\\n\\n\\n\"\r\n                                interpreter \"bash\"\r\n                                declared_type :bash\r\n                                cookbook_name \"ac-chef-server\"\r\n                                recipe_name \"default\"\r\n                              end\r\n                              \r\n                            * execute[Block1_install_files] action run[2015-09-10T17:10:29+00:00] INFO: Processing execute[Block1_install_files] action run (ac-chef-server::default line 52)\r\n^C[2015-09-10T14:10:54-03:00] FATAL: SIGINT received, stopping\r\n[2015-09-10T14:10:54-03:00] FATAL: SIGINT received, stopping\r\n\r\nThis errors started suddenly, and the chef-client cannot run the recipe due this. Note: I've used the wrapper that manages this cookbook (chef-server) before, without problems\r\n\r\nThe only one attribute passed by wrapper, is:\r\n\r\nnode.override['chef-server']['api-fqdn'] = node['ipaddress']\r\n\r\n"}}