Coder Social home page Coder Social logo

chef-server's People

Contributors

c-buisson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

chef-server's Issues

Hostname Mismatch with SSL Cert

I'm trying to work my way through the Chef tutorials, using this docker image as a self-hosted server.

I ran the server using:
docker run --privileged -e CHEF_PORT=443 --name chef-server -d -v ~/chef-logs:/var/log -v ~/install-chef-out:/root -p 443:443 cbuisson/chef-server

and then fetched the SSL certs using:
knife ssl fetch
in my working directory on the same machine.

I then ran:
knife ssl check
per the instructions on the Chef site, which produced this error:

Connecting to host localhost:443
ERROR: The SSL cert is signed by a trusted authority but is not valid for the given hostname
ERROR: You are attempting to connect to:   'localhost'
ERROR: The server's certificate belongs to 'ebb63c73161d'

TO FIX THIS ERROR:

The solution for this issue depends on your networking configuration. If you
are able to connect to this server using the hostname ebb63c73161d
instead of localhost, then you can resolve this issue by updating chef_server_url
in your configuration file.

If you are not able to connect to the server using the hostname ebb63c73161d
you will have to update the certificate on the server to use the correct hostname.

It looks like the ssl certs are being generated using the docker-internal hostname. Is this a known issue? How do I get around it?

Unable to install chef-manage

Hi,

Thank you for this great Docker container.

I am trying to bring up the WebUI on this container however, when I try to install chef-manage I get this error:

` * apt_package[chef-manage] action install

================================================================================
Error executing action `install` on resource 'apt_package[chef-manage]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb ----
STDOUT: Selecting previously unselected package chef-manage.
(Reading database ... 75837 files and directories currently installed.)
Preparing to unpack .../chef-manage_2.5.4-1_amd64.deb ...
Unpacking chef-manage (2.5.4-1) ...
STDERR: dpkg: dependency problems prevent configuration of chef-manage:
 chef-manage depends on chef-server-core (>= 12.14.0); however:
  Version of chef-server-core on system is 12.13.0-1.

dpkg: error processing package chef-manage (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 chef-manage
---- End output of dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb ----
Ran dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb returned 1

Resource Declaration:
---------------------
# In /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb

 88:   package pkg do
 89:     provider value_for_platform_family(
 90:       ['debian']       => Chef::Provider::Package::Dpkg,
 91:       ['rhel', 'suse'] => Chef::Provider::Package::Rpm,
 92:     )
 93:     source lazy { pkg_file }
 94:     notifies :create, "ruby_block[addon_install_notification_#{pkg}]", :immediate
 95:   end
 96: end

Compiled Resource:
------------------
# Declared in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:88:in `block in from_file'

apt_package("chef-manage") do
  package_name "chef-manage"
  provider Chef::Provider::Package::Dpkg
  action [:install]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  declared_type :package
  cookbook_name "private-chef"
  recipe_name "add_ons_wrapper"
  source #<Chef::DelayedEvaluator:0x0000000740d948@/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:93>
end

Platform:
---------
x86_64-linux

Running handlers:

  • #Class:0x00000005e25428::AddonInstallHandler
    Running handlers complete
    Chef Client failed. 1 resources updated in 17 seconds
    [2017-08-22T09:44:40+00:00] FATAL: Stacktrace dumped to /var/opt/opscode/local-mode-cache/chef-stacktrace.out
    [2017-08-22T09:44:40+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
    [2017-08-22T09:44:40+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: apt_package[chef-manage] (private-chef::add_ons_wrapper line 88) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
    ---- Begin output of dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb ----
    STDOUT: Selecting previously unselected package chef-manage.
    (Reading database ... 75837 files and directories currently installed.)
    Preparing to unpack .../chef-manage_2.5.4-1_amd64.deb ...
    Unpacking chef-manage (2.5.4-1) ...
    STDERR: dpkg: dependency problems prevent configuration of chef-manage:
    chef-manage depends on chef-server-core (>= 12.14.0); however:
    Version of chef-server-core on system is 12.13.0-1.

dpkg: error processing package chef-manage (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
chef-manage
---- End output of dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb ----
Ran dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb returned 1`

Do you know what the problem / solution might be?

Thanks

400 The plain HTTP request was sent to HTTPS port

Error

root@0889284a91ff:~/chef-repo/.chef# knife client list
ERROR: The data in your request was invalid
Response: <html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx/1.4.4</center>
</body>
</html>

knife.rb content

current_dir = File.dirname(__FILE__)
node_name               'admin'
chef_server_url         'http://172.17.0.3:443' >> Docker container
validation_client_name  'chef-validator'
validation_key          "#{current_dir}/chef-validator.pem"
client_key              "#{current_dir}/admin.pem"

works great, once

docker stop, then docker start has container failing and exiting with (3).

404 Not Found when running knife node list

I have running your chef-server and another docker images with knife acting as a workstation. When I try to list the node, I'm getting 404 Not Found. I have followed the below tutorial to set my workstation and everything looks configured, however I'm not sure why I'm getting 404.

My workstation configuration is:

root@ec33ddcd4e34:~/chef-repo# chef -v
Chef Development Kit Version: 0.6.0
chef-client version: 12.3.0
berks version: 3.2.4
kitchen version: 1.4.0

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-chef-12-configuration-management-system-on-ubuntu-14-04-servers

Can you give me a hint where I can start checking the config?

Thanks,
Jorge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.