Ich verwende Ubuntu-16.04 Bild mit Docker zu testen, mein Kochbuch in lokalen. Während ich kitchen converge
mache, erhalte ich den folgenden Fehler. Ich habe herausgefunden, systemctl
funktioniert nicht richtig. Kann mir bitte jemand helfen, dieses Problem zu beheben ODER eine andere Möglichkeit, das gleiche zu erreichen?systemctl Fehler in Docker ‚Fehler beim Bus verbinden: Keine solche Datei oder das Verzeichnis‘
[2017-11-30T15:22:30+00:00] INFO: Running queued delayed notifications before re-raising exception
Running handlers:
[2017-11-30T15:22:30+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-11-30T15:22:30+00:00] ERROR: Exception handlers complete
Chef Client failed. 9 resources updated in 06 seconds
[2017-11-30T15:22:30+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
[2017-11-30T15:22:30+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-11-30T15:22:30+00:00] ERROR: envoy_auth_apps_setup[default-service] (envoy_auth_apps::_default line 1) had an error: Chef::Exceptions::MultipleFailures: Multiple failures occurred:
* Mixlib::ShellOut::ShellCommandFailed occurred in chef run: execute[systemctl daemon-reload] (/tmp/kitchen/cache/cookbooks/envoy_auth_apps/resources/setup.rb line 133) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of systemctl daemon-reload ----
STDOUT:
STDERR: Failed to connect to bus: No such file or directory
---- End output of systemctl daemon-reload ----
Ran systemctl daemon-reload returned 1
* Mixlib::ShellOut::ShellCommandFailed occurred in delayed notification: service[envoy] (/tmp/kitchen/cache/cookbooks/envoy_auth_apps/resources/setup.rb line 194) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /bin/systemctl --system restart envoy ----
STDOUT:
STDERR: Failed to connect to bus: No such file or directory
---- End output of /bin/systemctl --system restart envoy ----
Ran /bin/systemctl --system restart envoy returned 1
[2017-11-30T15:22:30+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Converge failed on instance <default-ubuntu>. Please see .kitchen/logs/default-ubuntu.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration
Das ist mein .kitchen.yml
---
driver:
name: docker
binary: /usr/local/bin/docker
use_sudo: false
network:
- ["public_network", "bridge: 'en0: Wi-Fi (AirPort)'"]
provisioner:
name: chef_zero
require_chef_omnibus: "12.21.14"
environments_path: test/integration/environments
nodes_path: test/integration/nodes
data_bags_path: test/integration/data_bags
client_rb:
environment: development
verifier:
name: inspec
platforms:
- name: ubuntu
driver_config:
image: ubuntu:xenial
platform: ubuntu
# provision_command:
# - apt-get -y install dbus
suites:
- name: default
run_list:
# - recipe[base_app]
- recipe[envoy_auth_apps::_default]
verifier:
inspec_tests:
- test/integration/default
attributes:
nameserver:
domain_name: 'kitchen.xyz.io'
envoy_auth_apps:
consul_client_enabled: false
systemctl funktioniert nur, wenn Sie Systemd ausführen, und die Verwendung von Systemd in einem Andock-Container ist keine besonders gute Idee - der Docker Way soll den einzelnen Dienst, den Container ausführen soll, direkt aufrufen, anstatt eine Init zu haben System in jedem Container. –