Could not start Jetty server on port 8,106:cannot assign requested Address__docker

Source: Internet
Author: User
Tags docker stop container docker ps docker run

The first contact Docker deployment encountered many problems, such as the famous IP port mapping problem.


The reality is that you need to package the Web app as a mirror, and pass the configuration parameters (database, IP, port, etc.) through the shell script to the mirror, to achieve a build, running everywhere. However, the IP mapping problem was encountered during the parameter transfer. The Docker container is probably similar to the "virtual machine" mechanism, which contains a separate system and therefore has its own IP and port, and the IP and port of the IP and the primary system (server) need to be connected to generate communication (presumably). Then the IP passed to the container can not be the IP of the desired host, for example, we try to set the IP of the mirror service to 192.168.6.29, because this is the IP of the host, the result is to start the error, prompt as shown above. Check for a long time, just a blog is right, is the mapping problem. Of course, there may be a Hosts file error, try to troubleshoot. In fact, here only need to set IP as: 0.0.0.0, the IP is representative of all the local IP, good for example 127.0.0.1 represents the local IP.

And then stick to the Docker command you've just learned, and maybe use it:

View the Docker:docker ps|grep xxxx in operation

See all Docker:docker ps-a|grep xxxx

Stop Docker run: Docker stop container ID

Run the Docker:docker run container ID

entering container: Docker exec-it container ID bash (you need to see the ID of the container first using Docker PS)

Exit Container: exit

manual start Mirror: Docker run-d-P Port: Port mirroring Address startup file. SH

manually view the Docker log (if the container fails to start): Docker logs-f container ID


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.