Содержание
- UltraVNC
- Error try running Ultravnc Viewer (Listen Mode)
- Error try running Ultravnc Viewer (Listen Mode)
- Re: Error try running Ultravnc Viewer (Listen Mode)
- Re: Error try running Ultravnc Viewer (Listen Mode)
- Re: Error try running Ultravnc Viewer (Listen Mode)
- Re: Error try running Ultravnc Viewer (Listen Mode)
- Error Creating Listening Daemon Error Binding Daemon Socket
- UltraVNC • View topic — Error Creating Listening Daemon
- c++ — daemon socket listening in background for request .
- Solved: sendmail error “daemon MTA: cannot bind .
- daemon: socket() failed errno=97 ,daemon: bind(6) failed .
- [FIX] Cannot Connect to the Docker Daemon at ‘unix:///var .
- Client-Server(Daemon) Example — NXP Community
- Configure and troubleshoot the Docker daemon Docker .
- atls/daemon_server.c at master · mrpre/atls · GitHub
- microhttpd-init (The GNU libmicrohttpd Reference Manual)
- docker: Error response from daemon: Ports are not .
- Error Creating Listening Daemon Error Binding Daemon Socket Fixes & Solutions
- UltraVNC
- Error Creating Listening Daemon
- Error Creating Listening Daemon
- Re: Error Creating Listening Daemon
- Re: Error Creating Listening Daemon
- Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded #2533
- Comments
- Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded #4567
- Comments
- Footer
UltraVNC
Error try running Ultravnc Viewer (Listen Mode)
Error try running Ultravnc Viewer (Listen Mode)
Post by jamiguel77 » 2007-01-11 07:39
hi, when i try run ultravnc viewer (listen mode) i get these error:
Error Creating listening daemon:
(Error binding Daemon Socket)
Perhaps another VNCviewer is already running?
i checked, if running another vnc, uninstalled ultravnc, and try again, continue the same error, when i try run vncviewer listen mode.
any advice how fix it?
Re: Error try running Ultravnc Viewer (Listen Mode)
Post by Backspace » 2007-01-17 02:30
Re: Error try running Ultravnc Viewer (Listen Mode)
Post by jamiguel77 » 2007-01-17 02:56
i checked any vnc servers running, no vnc’s servers running, and checked too if in services.msc started any vnc server, no not started, too..
Re: Error try running Ultravnc Viewer (Listen Mode)
Post by redge » 2007-01-17 19:08
you have another application use the same port of your vncviewer you want listening
use another port than 5500 or close other application.
vncviewer listening by default on port 5500 except if you indicate another port.
vncviewer.exe -listen 5500
Re: Error try running Ultravnc Viewer (Listen Mode)
Post by jamiguel77 » 2007-01-17 23:37
C:Program FilesMySQLMySQL Server 4.1bin>netstat | find 5500
FIND: Parameter format not correct
^C
C:Program FilesMySQLMySQL Server 4.1bin>netstat | find «5500»
TCP MiguelEnriquezLaptop:3016 MiguelEnriquezLaptop:5500 TIME_WAIT
TCP MiguelEnriquezLaptop:3130 MiguelEnriquezLaptop:5500 TIME_WAIT
TCP MiguelEnriquezLaptop:3244 MiguelEnriquezLaptop:5500 TIME_WAIT
TCP MiguelEnriquezLaptop:4844 MiguelEnriquezLaptop:5500 TIME_WAIT
C:Program FilesMySQLMySQL Server 4.1bin>
Источник
Error Creating Listening Daemon Error Binding Daemon Socket

We have collected for you the most relevant information on Error Creating Listening Daemon Error Binding Daemon Socket, as well as possible solutions to this problem. Take a look at the links provided and find the solution that works. Other people have encountered Error Creating Listening Daemon Error Binding Daemon Socket before you, so use the ready-made solutions.
UltraVNC • View topic — Error Creating Listening Daemon
- http://forum.ultravnc.info/viewtopic.php?t=29257
- Error Creating Listening Daemon: (Error binding Daemon socket) Perhaps another VNCViewer is already running? This is correct, the icon is in my systray, listening on port 5500 (it says on hover), thus the «already running».
c++ — daemon socket listening in background for request .
- https://stackoverflow.com/questions/18961663/daemon-socket-listening-in-background-for-request
- daemonis listening on 1104and client sending request on the same. Error binding to socket, make sure nothing else is listening on this port 22n Means it running in the back ground but not responding on …
Solved: sendmail error “daemon MTA: cannot bind .
- https://mikeberggren.com/post/145614275186/sendmail-address
- Mar 11 11:11:11 foobox sendmail[12345]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA: cannot bind: Address already in use Mar 11 11:11:11 foobox sendmail[12345]: daemon MTA: problem creating SMTP socket
daemon: socket() failed errno=97 ,daemon: bind(6) failed .
- https://www.openldap.org/lists/openldap-software/200205/msg00176.html
- May 13, 2002 · Dear All Can you tell me how to configure LDAP step by step . I am facing problem with configuring ldap on linux 7.2 , here i am sending the slapd.conf file at the Bottom.
[FIX] Cannot Connect to the Docker Daemon at ‘unix:///var .
- https://appuals.com/cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock/
- Nov 04, 2020 · Such situations will mask the docker.service and docker .socket files. Docker.socket is a file located at †/var/run/docker.sock’ and is used to communicate with the Docker daemon. We will need to unmask the two-unit files – docker .service and docker.daemon before proceeding to start docker.
- https://community.nxp.com/t5/MQX-Software-Solutions-Knowledge/Client-Server-Daemon-Example/ta-p/1111286
- Hello All, I want to share a client-server project. In this example the server can accept more than one client (Daemon server implementation). This example was created and tested using MQX4.2, CodeWarrior 10.6 and FRDM-K64F boards. In general, the client-server model is …
Configure and troubleshoot the Docker daemon Docker .
- https://docs.docker.com/config/daemon/
- If that happens, the Docker daemon won’t start and prints an error message. To configure the Docker daemon using a JSON file, create a file at /etc/docker/daemon.json on Linux systems, or C:ProgramDatadockerconfigdaemon.json on Windows. On MacOS go to the whale in the taskbar > Preferences > Daemon > Advanced.
atls/daemon_server.c at master · mrpre/atls · GitHub
- https://github.com/mrpre/atls/blob/master/daemon/daemon_server.c
- A light TLS implementation used for learning: TLS 1.0 TLS 1.1 TLS 1.2 TLS 1.3 GMSSL 1.1(е›ЅеЇ†SSL) based on libcrypto.so. — mrpre/atls
microhttpd-init (The GNU libmicrohttpd Reference Manual)
- https://www.gnu.org/software/libmicrohttpd/manual/html_node/microhttpd_002dinit.html
- Return NULL on error, handle to daemon on success. Function: MHD_socket MHD_quiesce_daemon (struct MHD_Daemon *daemon) Stop accepting connections from the listening socket. Allows clients to continue processing, but stops accepting new connections.
docker: Error response from daemon: Ports are not .
- https://github.com/docker/for-win/issues/9272
- I have tried with the latest version of my channel (Stable or Edge) I have uploaded Diagnostics Diagnostics ID: Expected behavior Actual behavior Information Windows Version: Docker Desktop Version: Are you running inside a virtualized W.
Error Creating Listening Daemon Error Binding Daemon Socket Fixes & Solutions
We are confident that the above descriptions of Error Creating Listening Daemon Error Binding Daemon Socket and how to fix it will be useful to you. If you have another solution to Error Creating Listening Daemon Error Binding Daemon Socket or some notes on the existing ways to solve it, then please drop us an email.
Источник
UltraVNC
Error Creating Listening Daemon
Error Creating Listening Daemon
Post by Y.U.NO » 2012-02-01 21:27
Hello,
I use a 3rd party utility, which launches VNC from my machine in a loopback mode.
After the first session is launched, all subsequent connection attempts pop this error:
Error Creating Listening Daemon:
(Error binding Daemon socket)
Perhaps another VNCViewer is already running?
This is correct, the icon is in my systray, listening on port 5500 (it says on hover), thus the «already running».
I am not a programmer, but the programmers of this 3rd party piece say they have no idea how to suppress that error, and are incapable.
They have been saying this for many years, and I believe they have researched it, or so they say.
Could they be telling the truth? Is this a annoyance we are forced to live with? That’s all it is, an annoyance. If I manually close the icon after each session, which is ridiculous, then I can trade one annoyance for another.
I don’t believe that this is impossible to fix.
What say you, forum?
(Thanks in advance!)
Re: Error Creating Listening Daemon
Post by Rudi De Vos » 2012-02-01 21:47
A single port can only have one listener.
Trying to start a second listener on the same port give this error.
Suppose you have several severs that require different viewers ( let say the use another encryption),
then you need to use multiple ports. You can have viewerA waiting on port 5500 and viewer B on 5501.
Re: Error Creating Listening Daemon
Post by B » 2012-02-02 18:18
Источник
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded #2533
It looks ok to create a machine in AWS without a swarm agent, but it fails with one using consul discovery. This is the command to try to create a machine in AWS.
Running pre-create checks.
Creating machine.
(swarm-master) Launching instance.
Waiting for machine to be running, this may take a few minutes.
Machine is running, waiting for SSH to be available.
Detecting operating system of created instance.
Detecting the provisioner.
Provisioning with ubuntu(upstart).
Installing Docker.
Copying certs to the local machine directory.
Copying certs to the remote machine.
Setting Docker configuration on the remote daemon.
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (5) exceeded
The text was updated successfully, but these errors were encountered:
Is it Machine 0.5.2?
Maybe related to #2530?
We should dump the daemon logs automatically when this type of error occurs.
I don’t know if you’re already aware of this, but when this happened, I ssh’ed into that machine and checked if the docker was running, but it was not. So I tried to start it, but it didn’t seem to be starting at all.
Any update on this?
@AlexOugh Can you please print the output of the Docker daemon logs on the failing system? Most likely sudo journalctl —no-pager -u docker
I have the same issue using AWS driver, token discovery and docker-machine version 0.5.3, build 4d39a66 on ubuntu 15.10 (it was working previously, i provisioned a new machine and now i’m getting the same error.
@nathanleclaire
docker-machine version 0.5.4, build 6643d0e, AWS driver (without swarm options)
sudo journalctl —no-pager -u docker :
I successfully created another EC2 instance with the same command a few weeks back and it is running Docker version 1.9.1, build a34a1d5.
Thanks — Try with Machine 0.6.0 and see if it fares any better
Worked with 0.6.0, thanks!
Cool thanks @jbwinters. Going to close this ticket all, please file a new one with information if the issues persist with 0.6.0
Facing similar problem. (machine driver is amazonec2 )
and I found this issue, checked
then tried again, but got the same result.
It is certain the docker API daemon on host is up and listening, because I could get host machine’s log below
Is this because this machine is —driver amazonec2 ? or can I do anything?
What worked for me was adding a —amazonec2-ami param and setting it to
aws’s Ubuntu 14.04 LTS image: ami-fce3c696 instead of the 15.10 (which
apparently is now default now).
On Thu, Mar 10, 2016 at 3:23 AM OCHIAI Hiromu notifications@github.com
wrote:
Facing similar problem. (machine driver is amazonec2)
% docker-machine regenerate-certs my-machine
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available.
Detecting the provisioner.
Installing Docker.
Copying certs to the local machine directory.
Copying certs to the remote machine.
Setting Docker configuration on the remote daemon.
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
%
and I found this issue, checked
% docker-machine —version
docker-machine version 0.5.6, build 61388e9
% docker-machine —version
docker-machine version 0.6.0, build e27fb87
then tried again, but got the same result.
It is certain the docker API daemon on host is up and listening, because I
could get host machine’s log below
% docker-machine ssh my-machine
ubuntu@my-machine:
$ sudo docker daemon -D# . many logs
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2# . many logs
INFO[0000] API listen on /var/run/docker.sock
DEBU[0018] Calling GET /v1.22/version
DEBU[0018] GET /v1.22/version# these two logs were outputted on regenerate-certs
Is this because this machine is —driver amazonec2? or can I do anything?
—
Reply to this email directly or view it on GitHub
#2533 (comment).
Источник
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded #4567
I’m trying to provision a machine on DO:
The service file looks like this:
Take note of the double ‘-H’ option in ‘ExecStart’. This results to:
I’ll leave this here in case the project gets back to track.
The text was updated successfully, but these errors were encountered:
Same issue here
I have solved the issue in the following manner:
1- Re-install VB. Download a new version if needed
2- Reboot the system.
4- Start Docker by opening Docker Quickstart Terminal
3- The following error was still appearing:
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
4- In my git bash I have used the following command to solve it :
I hope this can help you.
@MadeoIT is right on point!
How to change that default value of 10 retries to 20?
Looks like with Parallels Desktop it is always not enough.
This is still happening in 2021. What, why and how do we fix this?
Yup, same!
Running into it running this command
docker-machine create —driver digitalocean —digitalocean-size s-1vcpu-1gb —digitalocean-access-token YOUR_TOKEN_HERE tinyboxes-alert
@MadeoIT Are your instructions to fix for a virtualbox driver? OP was posting an error about a digital-ocean driver.
I have tried this on @digitalocean machines 16.04, 18.04, and 20.04, same error
@ansiwen thanks, this solves the issue (as a temporary workaround)
I think, DigitalOcean driver should just use the Docker app from DigitalOCean marketplace instead of installing it on an empty machine.
I have tried running the docker-machine tool on Windows and Linux. It still doesn’t work with DigitalOcean, generic, VirtualBox driver, or maybe the others. The result is always the same.
I have tried running the docker-machine tool on Windows and Linux. It still doesn’t work with DigitalOcean, generic, VirtualBox driver, or maybe the others. The result is always the same.
Oh, the answer from @ansiwen was right. The link contains a snippet that includes —engine-install-url «https://releases.rancher.com/install-docker/19.03.9.sh» parameter on docker-machine create command.
After lots of tinkering and research on this, it’s quite apparent that Docker Machine is, for better or for worse, abandonware now. Unlikely that this will ever get fixed, except for by accident. Solution suggested by @ansiwen does work. about 1 times out of 3 🙂 One way is to just restart the script several times.
What ended up working for me, was to use doctl to deploy a Docker-ready droplet, and then manually set the DOCKER_HOST env variable. This is what Docker Machine was doing under the hood anyway.
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
@nathanleclaire
💭 sorry for containing my trial-and-errors
% docker-machine ssh my-machine
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-18-generic x86_64)
* Documentation: https://help.ubuntu.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
89 packages can be updated.
53 updates are security updates.
*** System restart required ***
Last login: Thu Mar 10 07:43:49 2016 from 124.219.169.171
ubuntu@my-machine:~$ sudo journalctl -u docker
-- Logs begin at Thu 2016-03-10 07:38:24 UTC, end at Fri 2016-03-11 03:21:26 UTC. --
Mar 10 07:41:55 my-machine systemd[1]: Starting Docker Application Container Engine...
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.100877328Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.111232190Z" level=info msg="Firewalld running: false"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.252275662Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.398230144Z" level=warning msg="Your kernel does not support swap memory limit."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454126098Z" level=info msg="Loading containers: start."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454542482Z" level=info msg="Loading containers: done."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454809619Z" level=info msg="Daemon has completed initialization"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.455064837Z" level=info msg="Docker daemon" commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2
Mar 10 07:41:55 my-machine systemd[1]: Started Docker Application Container Engine.
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.465182083Z" level=info msg="API listen on /var/run/docker.sock"
Mar 10 07:41:57 my-machine systemd[1]: Stopping Docker Application Container Engine...
Mar 10 07:41:57 my-machine systemd[1]: Stopped Docker Application Container Engine.
Mar 10 07:41:57 my-machine docker[20968]: time="2016-03-10T07:41:57.781410041Z" level=info msg="Processing signal 'terminated'"
Mar 10 07:42:00 my-machine systemd[1]: Started docker.service.
Mar 10 07:42:00 my-machine docker[21618]: flag provided but not defined: -d
Mar 10 07:42:00 my-machine docker[21618]: See '/usr/bin/docker --help'.
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:07 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:07 my-machine docker[22326]: flag provided but not defined: -d
Mar 10 07:45:07 my-machine docker[22326]: See '/usr/bin/docker --help'.
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22344]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22344]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22348]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22348]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22354]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22354]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22361]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22361]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Start request repeated too quickly.
Mar 10 07:45:14 my-machine systemd[1]: Failed to start docker.service.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'start-limit'.
Mar 10 07:45:21 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:51:51 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:51:57 my-machine systemd[1]: Started docker.service.
Mar 10 07:51:57 my-machine docker[23374]: flag provided but not defined: -d
Mar 10 07:51:57 my-machine docker[23374]: See '/usr/bin/docker --help'.
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:53:40 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:53:43 my-machine systemd[1]: Started docker.service.
Mar 10 07:53:43 my-machine docker[24577]: flag provided but not defined: -d
Mar 10 07:53:43 my-machine docker[24577]: See '/usr/bin/docker --help'.
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:58:28 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:58:31 my-machine systemd[1]: Started docker.service.
Mar 10 07:58:31 my-machine docker[25869]: time="2016-03-10T07:58:31.075805960Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:02:47 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:02:50 my-machine systemd[1]: Started docker.service.
Mar 10 08:02:50 my-machine docker[28046]: time="2016-03-10T08:02:50.136510145Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:09:17 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:09:23 my-machine systemd[1]: Started docker.service.
Mar 10 08:09:23 my-machine docker[29349]: time="2016-03-10T08:09:23.381718212Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:10:27 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:10:33 my-machine systemd[1]: Started docker.service.
Mar 10 08:10:33 my-machine docker[30717]: time="2016-03-10T08:10:33.578601333Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:11:15 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:11:19 my-machine systemd[1]: Started docker.service.
Mar 10 08:11:19 my-machine docker[31858]: time="2016-03-10T08:11:19.667703053Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
I was also using Docker’s Getting Started tutorial, ran
docker run -d -p 80:80 docker/getting-started, and got the same error.
I thought that Internet Information Services (IIS) might be using port 80 already. I verified this hunch by going to
Start > IIS > computer name > Sites > Default Web Site > highlight Default Web Site
In the right pane, I saw
Browse *.80 (http)
Yep, port 80 was already in use!
Note: To verify if any process is using port 80, run the command
Get-Process -Id (Get-NetTCPConnection -LocalPort 80).OwningProcess
and look for something like
NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName
------ ----- ----- ------ -- -- -----------
0 0.20 2.96 0.00 4 0 System
per @Tim Dunphy’s answer.
Solution #1
Stop the Default Web site.
- Either go to IIS per above > right pane > Manage Website > Stop or
- Use the
net stop httpcommand, and stop services using the port.
Solution #2
You may not want to stop IIS or any other service running on port 80, so just change the local port! For example,
docker run -d -p 81:80 docker/getting-started
will likely do the trick, as long as you don’t have services using port 81.
docker-machine version 0.5.2 ( 0456b9f )
We should dump the daemon logs automatically when this type of error occurs.
I don’t know if you’re already aware of this, but when this happened, I ssh’ed into that machine and checked if the docker was running, but it was not. So I tried to start it, but it didn’t seem to be starting at all.
@AlexOugh Can you please print the output of the Docker daemon logs on the failing system? Most likely sudo journalctl --no-pager -u docker
I have the same issue using AWS driver, token discovery and docker-machine version 0.5.3, build 4d39a66 on ubuntu 15.10 (it was working previously, i provisioned a new machine and now i’m getting the same error.
....
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
@nathanleclaire
docker-machine version 0.5.4, build 6643d0e, AWS driver (without swarm options)
sudo journalctl --no-pager -u docker:
-- Logs begin at Wed 2016-02-17 19:15:33 UTC, end at Wed 2016-02-17 19:24:28 UTC. --
Feb 17 19:18:40 myenv systemd[1]: Starting Docker Application Container Engine...
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.461744964Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.471206567Z" level=info msg="Firewalld running: false"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.564058457Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.644613154Z" level=warning msg="Your kernel does not support swap memory limit."
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.704391001Z" level=info msg="Loading containers: start."
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.704916743Z" level=info msg="Loading containers: done."
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.705157812Z" level=info msg="Daemon has completed initialization"
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.705420949Z" level=info msg="Docker daemon" commit=9e83765 execdriver=native-0.2 graphdriver=aufs version=1.10.1
Feb 17 19:18:40 myenv systemd[1]: Started Docker Application Container Engine.
Feb 17 19:18:40 myenv docker[20964]: time="2016-02-17T19:18:40.715152635Z" level=info msg="API listen on /var/run/docker.sock"
Feb 17 19:18:44 myenv systemd[1]: Stopping Docker Application Container Engine...
Feb 17 19:18:44 myenv systemd[1]: Stopped Docker Application Container Engine.
Feb 17 19:18:44 myenv docker[20964]: time="2016-02-17T19:18:44.649633528Z" level=info msg="Processing signal 'terminated'"
Feb 17 19:18:53 myenv systemd[1]: Started docker.service.
Feb 17 19:18:53 myenv docker[21611]: flag provided but not defined: -d
Feb 17 19:18:53 myenv docker[21611]: See '/usr/bin/docker --help'.
Feb 17 19:18:53 myenv systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Feb 17 19:18:53 myenv systemd[1]: docker.service: Unit entered failed state.
Feb 17 19:18:53 myenv systemd[1]: docker.service: Failed with result 'exit-code'.
ubuntu@myenv:~$ sudo systemctl status docker.service
● docker.service
Loaded: loaded (/etc/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2016-02-17 19:41:40 UTC; 2min 38s ago
Process: 23219 ExecStart=/usr/bin/docker -d -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --storage-driver aufs --tlsverify --tlscacert /etc/docker/ca.pem --tlscert /etc/docker/server.pem --tlskey /etc/docker/server-key.pem --label provider=amazonec2 (code=exited, status=125)
Main PID: 23219 (code=exited, status=125)
Feb 17 19:41:40 myenv systemd[1]: Stopped docker.service.
Feb 17 19:41:40 myenv systemd[1]: Started docker.service.
Feb 17 19:41:40 myenv docker[23219]: flag provided but not defined: -d
Feb 17 19:41:40 myenv docker[23219]: See '/usr/bin/docker --help'.
Feb 17 19:41:40 myenv systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Feb 17 19:41:40 myenv systemd[1]: docker.service: Unit entered failed state.
Feb 17 19:41:40 myenv systemd[1]: docker.service: Failed with result 'exit-code'.
ubuntu@myenv:~$ docker -v
Docker version 1.10.1, build 9e83765
I successfully created another EC2 instance with the same command a few weeks back and it is running Docker version 1.9.1, build a34a1d5.
Thanks — Try with Machine 0.6.0 and see if it fares any better
Worked with 0.6.0, thanks!
Cool thanks @jbwinters. Going to close this ticket all, please file a new one with information if the issues persist with 0.6.0
Facing similar problem. (machine driver is amazonec2)
% docker-machine regenerate-certs my-machine
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
%
and I found this issue, checked
% docker-machine --version
docker-machine version 0.5.6, build 61388e9
so updated to
% docker-machine --version
docker-machine version 0.6.0, build e27fb87
then tried again, but got the same result.
It is certain the docker API daemon on host is up and listening, because I could get host machine’s log below
% docker-machine ssh my-machine
[email protected]:~$ sudo docker daemon -D
# ... many logs
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2
# ... many logs
INFO[0000] API listen on /var/run/docker.sock
DEBU[0018] Calling GET /v1.22/version
DEBU[0018] GET /v1.22/version
# these two logs were outputted on regenerate-certs
Is this because this machine is --driver amazonec2? or can I do anything?
What worked for me was adding a —amazonec2-ami param and setting it to
aws’s Ubuntu 14.04 LTS image: ami-fce3c696 instead of the 15.10 (which
apparently is now default now).
On Thu, Mar 10, 2016 at 3:23 AM OCHIAI Hiromu [email protected]
wrote:
Facing similar problem. (machine driver is amazonec2)
% docker-machine regenerate-certs my-machine
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available…
Detecting the provisioner…
Installing Docker…
Copying certs to the local machine directory…
Copying certs to the remote machine…
Setting Docker configuration on the remote daemon…
Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded
%and I found this issue, checked
% docker-machine —version
docker-machine version 0.5.6, build 61388e9so updated to
% docker-machine —version
docker-machine version 0.6.0, build e27fb87then tried again, but got the same result.
It is certain the docker API daemon on host is up and listening, because I
could get host machine’s log below% docker-machine ssh my-machine
[email protected]:~$ sudo docker daemon -D# … many logs
INFO[0000] Daemon has completed initialization
INFO[0000] Docker daemon commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2# … many logs
INFO[0000] API listen on /var/run/docker.sockDEBU[0018] Calling GET /v1.22/version
DEBU[0018] GET /v1.22/version# these two logs were outputted on regenerate-certsIs this because this machine is —driver amazonec2? or can I do anything?
—
Reply to this email directly or view it on GitHub
https://github.com/docker/machine/issues/2533#issuecomment-194728625.
@otiai10 What’s the actual output of sudo journalctl -u docker when SSHed into that instance?
@nathanleclaire
:thought_balloon: sorry for containing my trial-and-errors
% docker-machine ssh my-machine
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-18-generic x86_64)
* Documentation: https://help.ubuntu.com/
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
89 packages can be updated.
53 updates are security updates.
*** System restart required ***
Last login: Thu Mar 10 07:43:49 2016 from 124.219.169.171
[email protected]:~$ sudo journalctl -u docker
-- Logs begin at Thu 2016-03-10 07:38:24 UTC, end at Fri 2016-03-11 03:21:26 UTC. --
Mar 10 07:41:55 my-machine systemd[1]: Starting Docker Application Container Engine...
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.100877328Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.111232190Z" level=info msg="Firewalld running: false"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.252275662Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.398230144Z" level=warning msg="Your kernel does not support swap memory limit."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454126098Z" level=info msg="Loading containers: start."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454542482Z" level=info msg="Loading containers: done."
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.454809619Z" level=info msg="Daemon has completed initialization"
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.455064837Z" level=info msg="Docker daemon" commit=c3959b1 execdriver=native-0.2 graphdriver=aufs version=1.10.2
Mar 10 07:41:55 my-machine systemd[1]: Started Docker Application Container Engine.
Mar 10 07:41:55 my-machine docker[20968]: time="2016-03-10T07:41:55.465182083Z" level=info msg="API listen on /var/run/docker.sock"
Mar 10 07:41:57 my-machine systemd[1]: Stopping Docker Application Container Engine...
Mar 10 07:41:57 my-machine systemd[1]: Stopped Docker Application Container Engine.
Mar 10 07:41:57 my-machine docker[20968]: time="2016-03-10T07:41:57.781410041Z" level=info msg="Processing signal 'terminated'"
Mar 10 07:42:00 my-machine systemd[1]: Started docker.service.
Mar 10 07:42:00 my-machine docker[21618]: flag provided but not defined: -d
Mar 10 07:42:00 my-machine docker[21618]: See '/usr/bin/docker --help'.
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:42:00 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:07 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:07 my-machine docker[22326]: flag provided but not defined: -d
Mar 10 07:45:07 my-machine docker[22326]: See '/usr/bin/docker --help'.
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:07 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22344]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22344]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22348]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22348]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22354]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22354]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: Started docker.service.
Mar 10 07:45:14 my-machine docker[22361]: flag provided but not defined: -d
Mar 10 07:45:14 my-machine docker[22361]: See '/usr/bin/docker --help'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Start request repeated too quickly.
Mar 10 07:45:14 my-machine systemd[1]: Failed to start docker.service.
Mar 10 07:45:14 my-machine systemd[1]: docker.service: Failed with result 'start-limit'.
Mar 10 07:45:21 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:51:51 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:51:57 my-machine systemd[1]: Started docker.service.
Mar 10 07:51:57 my-machine docker[23374]: flag provided but not defined: -d
Mar 10 07:51:57 my-machine docker[23374]: See '/usr/bin/docker --help'.
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:51:57 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:53:40 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:53:43 my-machine systemd[1]: Started docker.service.
Mar 10 07:53:43 my-machine docker[24577]: flag provided but not defined: -d
Mar 10 07:53:43 my-machine docker[24577]: See '/usr/bin/docker --help'.
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=125/n/a
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:53:43 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 07:58:28 my-machine systemd[1]: Stopped docker.service.
Mar 10 07:58:31 my-machine systemd[1]: Started docker.service.
Mar 10 07:58:31 my-machine docker[25869]: time="2016-03-10T07:58:31.075805960Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 07:58:31 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:02:47 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:02:50 my-machine systemd[1]: Started docker.service.
Mar 10 08:02:50 my-machine docker[28046]: time="2016-03-10T08:02:50.136510145Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:02:50 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:09:17 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:09:23 my-machine systemd[1]: Started docker.service.
Mar 10 08:09:23 my-machine docker[29349]: time="2016-03-10T08:09:23.381718212Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:09:23 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:10:27 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:10:33 my-machine systemd[1]: Started docker.service.
Mar 10 08:10:33 my-machine docker[30717]: time="2016-03-10T08:10:33.578601333Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:10:33 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 08:11:15 my-machine systemd[1]: Stopped docker.service.
Mar 10 08:11:19 my-machine systemd[1]: Started docker.service.
Mar 10 08:11:19 my-machine docker[31858]: time="2016-03-10T08:11:19.667703053Z" level=fatal msg="Error starting daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid"
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Unit entered failed state.
Mar 10 08:11:19 my-machine systemd[1]: docker.service: Failed with result 'exit-code'.
@mlabieniec
Thank you!
but it’s not found on my region:ap-northeast-1 :crying_cat_face:
so I’ll try another AMI existing on Tokyo.
To reproduce this problem and inspect the effect of AMI, I create new machine by hitting
% docker-machine create --driver amazonec2
--amazonec2-region ap-northeast-1
--amazonec2-vpc-id vpc-123abc
--amazonec2-security-group sg-my-servers
my-service-machine
In this case, it works completely.
If my memory is correct, it is the same operation as what I got error.
and the AMI is ami-b36d4edd now. I regret NOT having logged AMI in error case.
So sorry, I’ve lost the way to reproduce this problem.
still waiting for @nathanleclaire‘s opinion. thanks for your help 
@otiai10 If you try docker-machine provision my-service-machine on the problematic instance?
I think what happened is:
- machine <0.6.0 created docker configuration file using
-d(deprecated) instead ofdaemon(you can see this flag in the logs) - upgrade of docker version went to a new version which doesn’t recognize this flag anymore
regenerate-certsdoesn’t replace the config file so the old (faulty) one was still in place
Anyway glad to hear it’s working now @otiai10 !
I’m having the same error message but instead with DigitalOcean using generic driver.
i’m trying, with docker-machine create command, to create a machine over an existing DigitalOcean droplet (i must not create a new one droplet and delete the existing one). Using the digitalocean driver is not valid for this case and i’m using the generic driver solution.
I’m running docker-machine with the Windows 10 Ubuntu subsystem (also i have tried it with Git Bash) and i’m using Windows 10 Pro with Hyperv.
The DigitalOcean droplet has a Ubuntu 18.04.
Docker version is:
[email protected]:~# docker version
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:25:46 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b7f0
Built: Wed Mar 11 01:24:19 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
The command i run is the following:
$ docker-machine create --driver generic --generic-ip-address 142.xx.xxx.xx --generic-ssh-user root --generic-ssh-key ~/.ssh/id_rsa_do_sctv do-sctv
and i get the following output:
Running pre-create checks...
Creating machine...
(do-sctv) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of r
etries (10) exceeded
I have enabled in the ufw firewall the following ports (in the droplet):
ufw allow 22/tcp
ufw allow 2376/tcp
ufw allow 7946/tcp
ufw allow 7946/udp
ufw allow 4789/udp
Also, i have tried docker-machine regenerate-certs --force --client-certs do-sctv with the same error.
When doing docker-machine ls i get the following error:
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
do-sctv - generic Running tcp://142.xx.xxx.xx:2376 Unknown Unable to query docker version: Cannot connect to the docker engine endpoint
With docker-machine env do-sctv the output is:
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "142.xx.xxx.xx:2376": dial tcp 142.xx.xxx.xx:2376: connect: connection refused
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which might stop running containers.
Hope you can help me.
Thanks.
I developed a crawler in PHP that parse an URL with specific headers and put all URLs of content in the queue. It works fine.
I developed this code in a ubuntu 14.04 and I put a .conf file in /etc/init folder with this content:
# Info
description "Warm the varnish to get the list of products"
author "Juanjo Aguilella"
# Events
start on startup
stop on shutdown
# Automatically respawn
respawn
respawn limit 100 5
# Run the script
# Note, in this example, if your PHP script return
# the string "ERROR", the daemon will stop itself.
script
[ $(exec /usr/bin/php -f /var/www/crawler.php) = 'ERROR' ] && ( stop; exit 1; )
end script
It works fine in Ubuntu 14.04 and I can start and stop the daemon using «sudo service crawler start» and «sudo service crawler stop»
Now in production environment I have a Ubuntu 16.04 server and I put the same code on the same folder but when I try to start the service I receive the message «Failed to start crawler.service. Unit crawler.service not found»
Can you give me any help about it?
Regards
asked Jun 22, 2016 at 9:32
2
Adding to @Juanjo Aguilella Marés answer, and once you have copied/linked your script to /etc/systemd/system, you may want to automatically start it when the server starts:
sudo systemctl daemon-reload
sudo systemctl enable my_service.service
sudo systemctl start my_service.service
Source Digital Ocean
It is also a good idea not to run it as root. Just change the user line on your script:
[Service]
User=some_user
answered May 22, 2017 at 16:28
0
I solved the problem:
a) Create a file crawler.service in /etc/systemd/system with this code:
[Unit]
Description=Crawler cache Service
After=network.target
[Service]
User=root
Restart=always
Type=forking
ExecStart=/var/www/execute.sh
[Install]
WantedBy=multi-user.target
my bash file contains a diferent executations on parallel to the same php file with this code:
#!/bin/sh
php /var/www/tiendas.local.mediamarkt.es/crawler.php
sleep 0.1
{
php /var/www/tiendas.local.mediamarkt.es/crawler.php
}&
sleep 0.2
{
php /var/www/tiendas.local.mediamarkt.es/crawler.php
}&
sleep 0.3
{
php /var/www/tiendas.local.mediamarkt.es/crawler.php
}&
sleep 0.4
{
php /var/www/tiendas.local.mediamarkt.es/crawler.php
}
the sleep between execitions es necessary to save the problem about the execution so fast of the service.
If you have any suggestion about the solution, please comment, I dont have a lot of experience in bash files and systemd files, but at the moment works fine.
answered Jun 23, 2016 at 10:18
1]. To create a service go to
/etc/systemd/system/
2]. Create a file of serviceName e.g chatSocket.service
3]. Put content to file as given bellow
[Unit]
Description=Your PHP Daemon Service
#Requires=mysqld.service memcached.service #May your script needs mysql or other services to run.
#After=mysqld.service memcached.service
[Service]
User=root
Type=simple
TimeoutSec=0
PIDFile=/var/run/server.pid
ExecStart=/usr/bin/php -f /home/shrikant/workspace/app/Http/Controllers/server.php 2>&1> /dev/null #path to script
#ExecStop=/bin/kill -HUP $MAINPID
#ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s
StandardOutput=null #If you don't want to make toms of logs you can set it null if you sent a file or some other options it will send all php output to this one.
StandardError=/home/shrikant/workspace/app/Http/Controllers/chatSocket.log #path to error log file
[Install]
WantedBy=default.target
4]. Reload configuration by hitting:
sudo systemctl daemon-reload
5]. Enable service by default so when system start service will automatically start:
sudo systemctl enable my_service.service
6]. Start your service by using command below:
sudo systemctl start my_service.service
answered Feb 19, 2018 at 7:08

