"Docker" Docker hangs in file error: Container_linux.go:247......not a directory__linux

Source: Internet
Author: User
Tags docker cp docker run

Execute container Start command:

[Root@localhost conf]# Docker run--name iwsactivemq-p 61617:61616-p 8162:8161-p 1884:1883-v/home/iws/activmemq/c  Onf/activemq.xml:/opt/activemq/conf/activemq.xml  -V/HOME/IWS/IWS-LOGS/ACTIVEMQ/LOGS:/DATA/ACTIVEMQ-- restart=always-d IWS:ACTIVEMQ
3ecdf4cebd230f313358b9f4965b46585a2ca1570da26109c4e34302a2715b7e

Error:

Docker:error response from Daemon:invalid header field value "OCI Runtime error:container_linux.go:247:starting Contai NER process caused \ "Process_linux.go:359:container init caused \\\ rootfs_linux.go:53:mounting \\\\\\\"/home/iws/ activmemq/conf/activemq.xml\\\\\\\ "to Rootfs \\\\\\\"/var/lib/docker/devicemapper/mnt/ 1bac9274ba8dc64a778098609659f0a6b5a2873848c48a2cff8b301c8c7ff976/rootfs\\\\\\\ "at \\\\\\\"/var/lib/docker/ devicemapper/mnt/1bac9274ba8dc64a778098609659f0a6b5a2873848c48a2cff8b301c8c7ff976/rootfs/opt/activemq/conf/ activemq.xml\\\\\\\ "caused \\\\\\\" not a directory\\\\\\\ "\\\" \ \ n.

Solution:

1. Remove Activemq.xml mount and start

[Root@localhost conf]# Docker run--name iwsactivemq-p 61617:61616-p 8162:8161-p 1884:1883-v/home/iws/iws-logs/active MQ/LOGS:/DATA/ACTIVEMQ--restart=always-d iws:activemq
ce907efb8d4b7b7ce818aa6808ea3e10eb0ab2659021624f060000dfd5f07495

Start successful

2. Copy the activemq.xml in the container to the host Mount directory

[Root@localhost conf]# Docker CP ce907efb8d4b:/opt/activemq/conf/activemq.xml./

3, remove the first step of the container

4, reset the Mount file and start:

[Root@localhost conf]# Docker run--name iwsactivemq-p 61617:61616-p 8162:8161-p 1884:1883-v/home/iws/activmemq/c  Onf/activemq.xml:/opt/activemq/conf/activemq.xml  -V/HOME/IWS/IWS-LOGS/ACTIVEMQ/LOGS:/DATA/ACTIVEMQ-- restart=always-d IWS:ACTIVEMQ
1be2efcea9bdf460437b3ab798c5f0421550c13182d534227e26122d250b2d08

Started successfully.

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.