spurin / diveintoansible-lab

Dive Into Ansible Lab
788 stars 498 forks source link

Docker-compose #61

Closed Priyanka-Cloud-Infinite closed 2 years ago

Priyanka-Cloud-Infinite commented 2 years ago

Hello Sir, I am following your course to sharp my Ansible skill. I am facing a problem with the installation pahase. When I type docker-compose it will generate

Untitled

When I type localhost:1000 I get this

2

Cloud you guide my next steps to resolve the issue?

spurin commented 2 years ago

Hi @Priyanka-Cloud-Infinite

Thanks for reaching out to me on this and for the shared screenshots.

It looks like you're using Ubuntu under WSL2 and the issue you're encountering, relates to this version of Ubuntu being stripped down for use on Windows. In your output you can see that the Ubuntu containers are exiting with 255 errors.

There's an easy fix, if you have a look on the main repo page on GitHub and search for 255, you'll find details of how to resolve this.

Have a look and let me know how you get on 👍

Best Regards

James Spurin

steevi commented 2 years ago

HI @spurin

I'm having the same error in native installation of ubuntu 20.04. Any idea?

Thanks

spurin commented 2 years ago

Hi @steevi

Could you please tell me more about the setup? i.e. when you say Native, is this on bare metal, running in a VM, in cloud or something else. As much information as possible.

Could you also please share with me your .env file and output of the failure.

Will take a look.

Thanks

James Spurin

steevi commented 2 years ago

Thanks for the quick reply @spurin . Ubuntu 20.04.2 is installed locally on a laptop. Hardware wise think i don't have an issue (8 cores/16 threads, 16GB RAM).

my .env file is the following:

# Shared config volume
CONFIG=/home/steevi/diveintoansible-lab/config

# Shared home directories
ANSIBLE_HOME=/home/steevi/diveintoansible-lab/ansible_home

Doing docker inspect on the ubuntu images, couldn't see any entrypoint or command. I'm familiar a lot with docker but not with ansible :/

Can help to debug if you want

spurin commented 2 years ago

The specs should be absolutely fine and your config looks okay. Can you share the output of it failing please.

Thanks

steevi commented 2 years ago

@spurin Is that ok? Screenshot from 2021-09-08 15-11-12

spurin commented 2 years ago

Thanks @steevi

That's great. You really shouldn't have any issues. We'll dig into this a bit further, could you provide me with -

  1. Output of systemctl

  2. Output of mount command

  3. More info on the setup/install process. If you have the reference to the image you used that will help. Also, did you happen to do anything in particular, like a minimal install?

steevi commented 2 years ago
  1. Is the following what you need?

    [sudo] password for steevi: 
    Sorry, try again.
    [sudo] password for steevi: 
    -- Logs begin at Sat 2021-06-05 17:39:50 BST. --
    Sep 08 14:23:35 asus-ubuntu dockerd[1643]: time="2021-09-08T14:23:35.174588235+01:00" level=info msg="ignoring event" container=dd116555a846f14d631a593de45301d0b86c2abc374f290202ed7e1f36010066 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Sep 08 14:23:35 asus-ubuntu dockerd[1643]: time="2021-09-08T14:23:35.962807970+01:00" level=info msg="ignoring event" container=88544d2525e17fcd2790090d45a459eeafd2e5b51fd09b89c164a02fb6c15898 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Sep 08 14:23:35 asus-ubuntu dockerd[1643]: time="2021-09-08T14:23:35.962881033+01:00" level=info msg="ignoring event" container=c2ed4e262fa946ede3bedf344dede329d2053e8b15b6613dc779061f1bda9cc0 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Sep 08 14:23:35 asus-ubuntu dockerd[1643]: time="2021-09-08T14:23:35.982924074+01:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4]"
    Sep 08 14:23:35 asus-ubuntu dockerd[1643]: time="2021-09-08T14:23:35.982974505+01:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
    Sep 08 14:23:36 asus-ubuntu dockerd[1643]: time="2021-09-08T14:23:36.605119947+01:00" level=info msg="ignoring event" container=2b6994ce548665d39920c47a0b0d35ffb2173b3c0a0942759f78bb5d183a9725 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Sep 08 14:24:34 asus-ubuntu dockerd[1643]: time="2021-09-08T14:24:34.019888675+01:00" level=info msg="ignoring event" container=0b508a488f3ddfb5293677de20f19bb41958e7490bc9b4e69310d16bb3ccb045 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Sep 08 14:24:34 asus-ubuntu dockerd[1643]: time="2021-09-08T14:24:34.019939176+01:00" level=info msg="ignoring event" container=344bb9c96e5ed30951679ae098edbdc06a3bdaa3e163e42c6b952545960a06db module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Sep 08 14:24:34 asus-ubuntu dockerd[1643]: time="2021-09-08T14:24:34.040055771+01:00" level=info msg="ignoring event" container=b044b4218282061c0b1c508d59fe734ce33dff9a3d7a3035e9a9bf3388b3db8e module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
    Sep 08 14:24:34 asus-ubuntu dockerd[1643]: time="2021-09-08T14:24:34.044969126+01:00" level=info msg="ignoring event" container=9309e9635c0b3c241469edfb3e80a2e7351a61f1c9e9e9662b35eb94be400858 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
  2. How can i get the output of the mount command?

  3. Setup wise

spurin commented 2 years ago

Hi @steevi

Apologies, I have got sidetracked on this. Please let me know if you'd like to continue troubleshooting this further.