azukiapp / azk

azk is a lightweight open source development environment orchestration tool. Instantly & safely run any environment on your local machine.
http://azk.io
Apache License 2.0
898 stars 63 forks source link

Azk agent doesn't start #671

Closed nvartolomei closed 8 years ago

nvartolomei commented 8 years ago

azk agent start

 λ nvartolomei at hephaestus in /Users/nvartolomei/code/project
 → azk agent status
azk: Agent is not running (try: `azk agent start`).
a λ nvartolomei at hephaestus in /Users/nvartolomei/code/project
 → azk agent stop
azk: Agent is not running (try: `azk agent start`).
 λ nvartolomei at hephaestus in /Users/nvartolomei/code/project
 → azk vm stop
azk: Unknown error: "undefined"
 λ nvartolomei at hephaestus in /Users/nvartolomei/code/project
 → azk vm stop
azk: Virtual machine is not running, try `azk vm start`.
 λ nvartolomei at hephaestus in /Users/nvartolomei/code/project
 → azk vm start
azk: Unknown error: "undefined"
 λ nvartolomei at hephaestus in /Users/nvartolomei/code/project
 → azk agent start
azk: Please wait, this process may take several minutes
azk: Loading settings and checking dependencies.
azk: Checking version...
azk: azk 0.18.0 detected
azk: Settings loaded successfully.
azk: Trying to stop virtual machine...
azk: Virtual machine has been successfully stopped.
azk: Removing virtual machine...
azk: Virtual machine has been successfully removed.
azk: Agent is being started...
azk: Installing virtual machine...
azk: Virtual machine has been successfully installed.
azk: Setting the ssh key to vm...
azk: Starting virtual machine...
azk: Waiting for virtual machine boot...
azk: Virtual machine is ready to use.
azk: Mounting the shared folder in virtual machine...
azk: Shared folder has been successfully mounted.
azk: Trying to connect to docker (http://192.168.50.4:2375) (timeout: 20s)...
azk: azk agent start error: Could not initialize balancer because docker was not available
azk: Agent is being stopped...
azk: Trying to stop virtual machine...
azk: Virtual machine has been successfully stopped.
azk: Agent has been successfully stopped.

Version : azk version 0.18.0, build 8b9f66c, date 2016-04-06 OS : OS X (x64), Memory: 16384MB Agent : Stopped Docker : Down Uses VM : Yes VirtualBox: 5.0.20r106931


Tried to recreate vm, no luck...

gullitmiranda commented 8 years ago

@nvartolomei try remove VM and disk: http://docs.azk.io/en/troubleshooting/#how-to-delete-the-vm-data-disk-mac-os-x-only

nvartolomei commented 8 years ago

@gullitmiranda works now...

nvartolomei commented 8 years ago

But I have another strange error

 → azk start redis
azk: ↑ starting `redis` system, 1 new instances...
azk: ✓ checking `library/redis:2.8` image...
azk: ✓ checking `redis:2.8` image...
azk: ⇲ downloading `library/redis:2.8` image...
azk: An error occurred. It will stop all instances already running. See details below.

azk: System `redis` not running

azk: Lost internet connection or error while connecting to docker registry:
azk:   Error: 404:  >> url: https://registry-1.docker.io/v1/repositories/library/redis/tags/2.8

However

 → azk vm ssh
debian2docker
-bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
docker@debian2docker:~$ docker pull redis:2.8
2.8: Pulling from library/redis
daac69515171: Pull complete
22f88a37f710: Pull complete
9606be4e2a10: Pull complete
83a2fc8e6e52: Pull complete
f6b9340a4633: Pull complete
26b58887c19e: Pull complete
db1079aaaa08: Pull complete
20f8a349ebbb: Pull complete
d538deb91dad: Pull complete
2be026a21bd3: Pull complete
c153dc714d03: Pull complete
c9cfb80af0c2: Pull complete
Digest: sha256:fe38fdf76ed2a547550bc3702f33e5d65cb0d474d80b58182f53864ec24d012b
Status: Downloaded newer image for redis:2.8
docker@debian2docker:~$ exit
 → azk start redis
azk: ↑ starting `redis` system, 1 new instances...
azk: ✓ checking `library/redis:2.8` image...
azk: ◴ waiting for `redis` system to start, trying connection to port redis/tcp...

and this way it works

gullitmiranda commented 8 years ago

@nvartolomei you tried more than once? May have happened fails to connect with docker hub.

however, we will improve the communication with the docker hub. see: https://github.com/azukiapp/azk/issues/581#issuecomment-191571383

nvartolomei commented 8 years ago

Of course I tried multiple times, I'm engineer after all.

gullitmiranda commented 8 years ago

ok. I'm going to mark the issue to investigate the problem

rictorres commented 8 years ago

i had the same problem trying to start redis from azk.

azk: ↑ starting `redis` system, 1 new instances...
azk: ✓ checking `library/redis:latest` image...
azk: ✓ checking `redis:latest` image...
azk: ⇲ downloading `library/redis:latest` image...
azk: An error occurred. It will stop all instances already running. See details below.

azk: System `mysql` not running
azk: System `redis` not running

azk: Lost internet connection or error while connecting to docker registry:
azk:   Error: 404:  >> url: https://registry-1.docker.io/v1/repositories/library/redis/tags/latest

i solved it by downloading the image with adocker pull redis

leandro-lugaresi commented 8 years ago

same problem here with images like drupal. php and memcached. This occurs only with docker official images.

azk: Lost internet connection or error while connecting to docker registry:
azk:   Error: 404:  >> url: https://registry-1.docker.io/v1/repositories/library/php/tags/latest

PS.: The problem occurs with all versions of the repository.

m9dfukc commented 7 years ago

Hey, any words about when the v.0.19.0 will be released? I'm also suffering from this:

azk: Lost internet connection or error while connecting to docker registry:
azk:   Error: 404:  >> url: https://registry-1.docker.io/v1/repositories/library/php/tags/latest

Manually pulling with adocker pull ... works but is not very elegant