Failed to get D-Bus connection: Operation not permitted
用傳統的 bash 建立 docker 容器,啟動容器服務時,報錯“Failed to get D-Bus connection: Operation not permitted”
解決方案:
① 建立容器時指定命令為:/usr/sbin/init
② 建立容器時需要加上引數:--privileged=true
③ 建立容器時需要加上引數:-u root
④ 進入容器後需要建立目錄: /run/systemd/system
例如:
docker run -itd -h pxcn4 --name=pxcn4 \
--net=mhalhr --ip 192.168.68.5 \
-p 9004:3306 \
-v PXC-V4:/var/lib/mysql \
--privileged=true -u root \
-e MYSQL_ROOT_PASSWORD=123456 -e TZ=Asia/Shanghai -e CLUSTER_NAME=pxc-cluster01 -e XTRABACKUP_PASSWORD=123456 -e CLUSTER_JOIN=pxcn3 \
pxc:5.7 init
About Me
........................................................................................................................ ● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除 ● 本文在個人微 信公眾號( DB寶)上有同步更新 ● QQ群號: 230161599 、618766405,微信群私聊 ● 個人QQ號(646634621),微 訊號(db_bao),註明新增緣由 ● 於 2020年6月 在西安完成 ● 最新修改時間:2020年6月 ● 版權所有,歡迎分享本文,轉載請保留出處 ........................................................................................................................ ● 小麥苗的微店: ● 小麥苗出版的資料庫類叢書: http://blog.itpub.net/26736162/viewspace-2142121/ ● 小麥苗OCP、OCM、高可用、DBA學習班: http://blog.itpub.net/26736162/viewspace-2148098/ ● 資料庫筆試面試題庫及解答: http://blog.itpub.net/26736162/viewspace-2134706/ ........................................................................................................................ 請掃描下面的二維碼來關注小麥苗的微 信公眾號( DB寶)及QQ群(230161599、618766405)、新增小麥苗微 信(db_bao), 學習最實用的資料庫技術。
........................................................................................................................ |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2700952/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- docker安裝matlab mount failed: Operation not permitted.DockerMatlabAIMIT
- macOS: sudo : Operation not permittedMacMIT
- NFS mount results in "vmount: operation not permitted" errorNFSMITError
- [20210222]gdb ptrace Operation not permitted.txtMIT
- 執行systemctl status ssh返回“Failed to get properties: Connection timed out”AI
- chown: /usr/local: Operation not permitted問題解決MIT
- ulimit: core file size: cannot modify limit: Operation not permittedMIT
- Mac 配置Maven遇到的zsh:operation not permitted:mvnMacMavenMIT
- ionic3 ,win7下 npm install 報operation not permittedWin7NPMMIT
- root使用者操作檔案提示 changing permissions of '***': Operation not permittedMIT
- 在Docker內部使用gdb偵錯程式報錯-Operation not permittedDockerMIT
- ascp: Failed to open TCP connection for SSH, exiting. Session Stop (Error: Failed to open TCP connection for SSH)AITCPSessionError
- OGG Director報錯 Connection FAILEDAI
- yarn install 遇到的錯誤訊息 - Error EPERM operation not permitted, open .yarnrcYarnErrorMIT
- SQLServer映象報錯Connection handshake failedSQLServerAI
- Error: Connection activation failed: Device not managed by NetworkManagerErrorAIdev
- ORA-27300: OS system dependent operation:fork failed with statusAI
- go get報錯connect: connection refusedGo
- npm 或 yarn安裝依賴報錯 EPERM: operation not permitted, unlink 解決方法NPMYarnMIT
- flutter packages get - pub get failed (1)解決方案FlutterPackageAI
- ORA-27300: OS system dependent operation:fork failed with status: 12AI
- sudo apt-get update | grep "Failed"apt-getAI
- 解決 Android studio Connect to 127.0.0.1:[/127.0.0.1] failed: Connection refusedAndroid127.0.0.1AI
- 【故障處理】ORA-28547: connection to server failed, probableServerAI
- SQLServer搭建域控下映象報錯Connection handshake failedSQLServerAI
- PHP報錯getimagesize(): SSL operation failed with code 1問題解決方案PHPAI
- org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection 解決辦法SpringFrameworkJDBCOTGExceptionAI
- dbca建立資料庫時報錯ORA-13516: AWR Operation failed: CATPROC not valid資料庫AI
- MySQL建立使用者報錯 ERROR 1396 (HY000): Operation CREATE USER failed for 'afei'@'%'MySqlErrorAI
- [Javascript] ++operationJavaScript
- 報錯-only final is permittedMIT
- Laravel 安裝 sail時ubuntu軟體源很慢或者connection failed 解決辦法LaravelAIUbuntu
- pa_simple_new() failed: Connection refused ubuntu 開啟root使用者的聲音AIUbuntu
- tidb Error: Operation aborted by user answer '' (cliutil.operation_aborted)TiDBError
- nacos Connection refused (Connection refused)
- Springboot jar 部署IllegalStateException: Failed to get nested archive for entry BOOT-INF/lib/byte-budSpring BootJARExceptionAIHive
- [Javascript] Encapsulate chunk operationJavaScript
- Connection