{"action":"opened","issue":{"url":"https://api.github.com/repos/boot2docker/boot2docker/issues/900","labels_url":"https://api.github.com/repos/boot2docker/boot2docker/issues/900/labels{/name}","comments_url":"https://api.github.com/repos/boot2docker/boot2docker/issues/900/comments","events_url":"https://api.github.com/repos/boot2docker/boot2docker/issues/900/events","html_url":"https://github.com/boot2docker/boot2docker/issues/900","id":83931158,"number":900,"title":"Cannot start boot2docker in Mac OS X's crontab","user":{"login":"Atry","id":601530,"avatar_url":"https://avatars.githubusercontent.com/u/601530?v=3","gravatar_id":"","url":"https://api.github.com/users/Atry","html_url":"https://github.com/Atry","followers_url":"https://api.github.com/users/Atry/followers","following_url":"https://api.github.com/users/Atry/following{/other_user}","gists_url":"https://api.github.com/users/Atry/gists{/gist_id}","starred_url":"https://api.github.com/users/Atry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Atry/subscriptions","organizations_url":"https://api.github.com/users/Atry/orgs","repos_url":"https://api.github.com/users/Atry/repos","events_url":"https://api.github.com/users/Atry/events{/privacy}","received_events_url":"https://api.github.com/users/Atry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-02T09:15:55Z","updated_at":"2015-06-02T09:15:55Z","closed_at":null,"body":"I installed ant initialized boot2docker from home brew, then I added a user-level crontab job to start it.\r\n\r\n```\r\n$ crontab -e\r\n```\r\n\r\nSave the content:\r\n```\r\n@reboot /usr/local/bin/boot2docker up -v\r\n```\r\n\r\nUnfortunately crontab is unable to start boot2docker\r\n\r\n```\r\nX-Cron-Env: <SHELL=/bin/sh>\r\nX-Cron-Env: <PATH=/usr/bin:/bin>\r\nX-Cron-Env: <LOGNAME=twer>\r\nX-Cron-Env: <USER=twer>\r\nX-Cron-Env: <HOME=/Users/twer>\r\nDate: Tue,  2 Jun 2015 15:13:35 +0800 (CST)\r\n\r\nBoot2Docker-cli version: v1.6.2\r\nDate: Tue,  2 Jun 2015 15:13:35 +0800 (CST)\r\nX-Cron-Env: <LOGNAME=twer>\r\nX-Cron-Env: <USER=twer>\r\nX-Cron-Env: <HOME=/Users/twer>\r\nDate: Tue,  2 Jun 2015 15:13:35 +0800 (CST)\r\n\r\nBoot2Docker-cli version: v1.6.2\r\nGit commit: cb2c3bc\r\n2015/06/02 15:13:35 executing: VBoxManage showvminfo boot2docker-vm --machinereadable\r\n2015/06/02 15:13:38 executing: VBoxManage guestproperty set boot2docker-vm /VirtualBox/GuestAdd/SharedFolders/MountPrefix /\r\n2015/06/02 15:13:38 executing: VBoxManage guestproperty set boot2docker-vm /VirtualBox/GuestAdd/SharedFolders/MountDir /\r\n2015/06/02 15:13:39 executing: VBoxManage sharedfolder add boot2docker-vm --name Users --hostpath /Users --automount\r\nVBoxManage: error: Shared folder named 'Users' already exists\r\nVBoxManage: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component SessionMachine, interface IMachine, callee nsISupports\r\nVBoxManage: error: Context: \"CreateSharedFolder(Bstr(name).raw(), Bstr(hostpath).raw(), fWritable, fAutoMount)\" at line 1009 of file VBoxManageMisc.cpp\r\n2015/06/02 15:13:39 executing: VBoxManage setextradata boot2docker-vm VBoxInternal2/SharedFoldersEnableSymlinksCreate/Users 1\r\n2015/06/02 15:13:39 executing: VBoxManage startvm boot2docker-vm --type headless\r\nVBoxManage: error: Nonexistent host networking interface, name 'vboxnet0' (VERR_INTERNAL_ERROR)\r\nVBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole\r\nWaiting for VM \"boot2docker-vm\" to power on...\r\n2015/06/02 15:13:44 executing: VBoxManage showvminfo boot2docker-vm --machinereadable\r\nerror in run: Failed to start machine \"boot2docker-vm\" (run again with -v for details)\r\n```\r\n\r\nWhile I can start boot2docker in a login shell\r\n\r\n```\r\n$ boot2docker up -v\r\nBoot2Docker-cli version: v1.6.2\r\nGit commit: cb2c3bc\r\n2015/06/02 16:11:04 executing: VBoxManage showvminfo boot2docker-vm --machinereadable\r\n2015/06/02 16:11:04 executing: VBoxManage guestproperty set boot2docker-vm /VirtualBox/GuestAdd/SharedFolders/MountPrefix /\r\n2015/06/02 16:11:04 executing: VBoxManage guestproperty set boot2docker-vm /VirtualBox/GuestAdd/SharedFolders/MountDir /\r\n2015/06/02 16:11:04 executing: VBoxManage sharedfolder add boot2docker-vm --name Users --hostpath /Users --automount\r\nVBoxManage: error: Shared folder named 'Users' already exists\r\nVBoxManage: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component SessionMachine, interface IMachine, callee nsISupports\r\nVBoxManage: error: Context: \"CreateSharedFolder(Bstr(name).raw(), Bstr(hostpath).raw(), fWritable, fAutoMount)\" at line 1009 of file VBoxManageMisc.cpp\r\n2015/06/02 16:11:04 executing: VBoxManage setextradata boot2docker-vm VBoxInternal2/SharedFoldersEnableSymlinksCreate/Users 1\r\n2015/06/02 16:11:04 executing: VBoxManage startvm boot2docker-vm --type headless\r\nWaiting for VM \"boot2docker-vm\" to power on...\r\nVM \"boot2docker-vm\" has been successfully started.\r\n2015/06/02 16:11:05 executing: VBoxManage showvminfo boot2docker-vm --machinereadable\r\nWaiting for VM and Docker daemon to start...\r\n.Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0)2015/06/02 16:11:16 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost ip addr show dev eth1\r\nSSH returned: 4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000\r\n    link/ether 08:00:27:44:3f:b0 brd ff:ff:ff:ff:ff:ff\r\n\r\nEND SSH\r\n.Connecting to tcp://localhost:2022 (attempt #0)2015/06/02 16:11:16 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost ip addr show dev eth1\r\nSSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:44:3f:b0 brd ff:ff:ff:ff:ff:ff\r\n    inet6 fe80::a00:27ff:fe44:3fb0/64 scope link tentative \r\n       valid_lft forever preferred_lft forever\r\n\r\nEND SSH\r\n.Connecting to tcp://localhost:2022 (attempt #0)2015/06/02 16:11:17 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost ip addr show dev eth1\r\nSSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:44:3f:b0 brd ff:ff:ff:ff:ff:ff\r\n    inet6 fe80::a00:27ff:fe44:3fb0/64 scope link tentative \r\n       valid_lft forever preferred_lft forever\r\n\r\nEND SSH\r\n.Connecting to tcp://localhost:2022 (attempt #0)2015/06/02 16:11:17 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost ip addr show dev eth1\r\nSSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:44:3f:b0 brd ff:ff:ff:ff:ff:ff\r\n    inet6 fe80::a00:27ff:fe44:3fb0/64 scope link tentative \r\n       valid_lft forever preferred_lft forever\r\n\r\nEND SSH\r\n.Connecting to tcp://localhost:2022 (attempt #0)2015/06/02 16:11:17 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost ip addr show dev eth1\r\nSSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:44:3f:b0 brd ff:ff:ff:ff:ff:ff\r\n    inet6 fe80::a00:27ff:fe44:3fb0/64 scope link tentative \r\n       valid_lft forever preferred_lft forever\r\n\r\nEND SSH\r\n.Connecting to tcp://localhost:2022 (attempt #0)2015/06/02 16:11:17 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost ip addr show dev eth1\r\nSSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:44:3f:b0 brd ff:ff:ff:ff:ff:ff\r\n    inet 192.168.59.103/24 brd 192.168.59.255 scope global eth1\r\n       valid_lft forever preferred_lft forever\r\n    inet6 fe80::a00:27ff:fe44:3fb0/64 scope link tentative \r\n       valid_lft forever preferred_lft forever\r\n\r\nEND SSH\r\nVM Host-only IP address: 192.168.59.103\r\nWaiting for Docker daemon to start...\r\no2015/06/02 16:11:17 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost grep tcp:// /proc/$(cat /var/run/docker.pid)/cmdline\r\ncat: can't open '/var/run/docker.pid': No such file or directory\r\nError requesting socket: exit status 1\r\no2015/06/02 16:11:18 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost grep tcp:// /proc/$(cat /var/run/docker.pid)/cmdline\r\ncat: can't open '/var/run/docker.pid': No such file or directory\r\nError requesting socket: exit status 1\r\no2015/06/02 16:11:19 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost grep tcp:// /proc/$(cat /var/run/docker.pid)/cmdline\r\nSSH returned: tcp://0.0.0.0:2376\r\n\r\nEND SSH\r\n2015/06/02 16:11:19 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost ip addr show dev eth1\r\nSSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000\r\n    link/ether 08:00:27:44:3f:b0 brd ff:ff:ff:ff:ff:ff\r\n    inet 192.168.59.103/24 brd 192.168.59.255 scope global eth1\r\n       valid_lft forever preferred_lft forever\r\n    inet6 fe80::a00:27ff:fe44:3fb0/64 scope link \r\n       valid_lft forever preferred_lft forever\r\n\r\nEND SSH\r\n\r\nStarted.\r\n2015/06/02 16:11:19 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/twer/.ssh/id_boot2docker docker@localhost tar c /home/docker/.docker/*.pem\r\ntar: Removing leading `/' from member names\r\nWriting /Users/twer/.boot2docker/certs/boot2docker-vm/ca.pem\r\nWriting /Users/twer/.boot2docker/certs/boot2docker-vm/cert.pem\r\nWriting /Users/twer/.boot2docker/certs/boot2docker-vm/key.pem\r\n\r\nTo connect the Docker client to the Docker daemon, please set:\r\n    export DOCKER_HOST=tcp://192.168.59.103:2376\r\n    export DOCKER_CERT_PATH=/Users/twer/.boot2docker/certs/boot2docker-vm\r\n    export DOCKER_TLS_VERIFY=1\r\n\r\n\r\n```"}}