Start MySQL in Docker error: Failed to get D-bus connection

Source: Internet
Author: User
Tags mysql in unsupported docker run

Docker version:

[email protected] ~]# Docker versionclient:

version:1.10.3

API version:1.22

Package version:docker-common-1.10.3-46.el7.centos.10.x86_64

Go version:go1.6.3

Git commit:d381c64-unsupported

Built:thu 4 13:21:17 2016

Os/arch:linux/amd64


Server:

version:1.10.3

API version:1.22

Package version:docker-common-1.10.3-46.el7.centos.10.x86_64

Go version:go1.6.3

Git commit:d381c64-unsupported

Built:thu 4 13:21:17 2016

os/arch:linux/amd64123456789101112131415161718

Mirrored version


[[email protected]/]# cat/etc/redhat-releasecentos Linux release 7.2.1511 (Core) 12

When you start a service through Systemctl in Docker, you always report an error such as failed to get D-bus connection:operation not permitted.


[[email protected] ~]# systemctl start sshd

Failed to get D-bus connection:operation not permitted

The solution is to run/usr/sbin/init at Docker run. Like what:


[email protected]/]# Docker Run-tid--name hadoopbase centos/hadoopbase:v001/usr/sbin/init

In this way, container can use SYSTEMCTL to start the service, some people say in the CentOS7.2 to solve the problem through the Systemctl run error, but I still encounter such problems in the actual operation.

There is also a workaround, that is, when the image file generated through the Dockerfile, through the cmd to execute/usr/sbin/init this command, namely: cmd ["/usr/sbin/init"];


Start MySQL in Docker error: Failed to get D-bus connection

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.