Git Product home page Git Product logo

Comments (11)

udondan avatar udondan commented on May 24, 2024

Thank for the report Brady and sorry for the delay here.

I'm currently the only one on this little project and I'm on parental leave since last week. I'll be looking into this ASAP, most probably within this week.

from ansible-silo.

udondan avatar udondan commented on May 24, 2024

Tested Silo on a vanilla Ubuntu 16.04.3 with Docker 17.06.0-ce and wasn't able to reproduce this.

I have a vague guesses what could be going on here. Silo forwards all environment variables from the host into the container. This is to ensure Ansible setups that depend on environment variables (usually plugins are configured through env vars) still work with Silo. A forwarded variable might conflict here with git.

Can you please do the following things and let me know about any errors, to help me understand the problem better:

  1. Try a manual git fetch:

    ansible-silo --shell "cd /silo/ansible && sudo git fetch"
  2. Try to clone ansible:

     ansible-silo --shell
     git clone git://github.com/ansible/ansible.git /tmp/ansible
  3. Can you please run silo in debug mode and post the output. If there is any sensitive data in it, you can also send it to me by email: [email protected]

    SILO_DEBUG=1 ansible-silo --switch v2.0.0.0-1

from ansible-silo.

bdlamprecht avatar bdlamprecht commented on May 24, 2024

from ansible-silo.

udondan avatar udondan commented on May 24, 2024

Brady, we just released Silo v2.0.0. This release filters all GIT_* environment vars - that's the best guess I had. Leaving this open until you had time to check it out and see if this solves your problem.

from ansible-silo.

bdlamprecht avatar bdlamprecht commented on May 24, 2024

Yeah, tried this new version and still having the same issues...

$ ansible-silo --switch
fatal: protocol error: bad line length character:

Er
Failed to fetch!

Showing the I've upgraded to the latest:

$ ansible-silo --version
ansible-silo 2.0.0
ansible 2.3.1.0
ansible-lint 3.5.0
ansible-silo 2.0.0
ansible 2.3.1.0
ansible-lint 3.5.0
ansible installed on volume silo.bl839s

I also upgrade docker to the latest stable:

$ docker --version
Docker version 17.07.0-ce, build 8784753

Any other ideas on why this is happening only to me? I'm no expert on docker, but some thoughts I've had are the machines I'm running them on are part of a swarm. Could this be causing an issue?

from ansible-silo.

bdlamprecht avatar bdlamprecht commented on May 24, 2024

Just tried installing a new Ubuntu VM for testing this outside of a swarm and anything else I've added to the machines I was using before and I'm still encountering the same issue:

bl839s@docker-test:~$ ansible-silo --version
ansible-silo 2.0.0
ansible 2.3.2.0
ansible-lint 3.5.0
ansible installed on volume silo.bl839s
bl839s@docker-test:~$ ansible-silo --switch
fatal: protocol error: bad line length character:

Er
Failed to fetch!

bl839s@docker-test:~$ cat /etc/issue
Ubuntu 16.04.3 LTS \n \l

bl839s@docker-test:~$ docker --version
Docker version 17.07.0-ce, build 8784753

I have no idea what is going on with this and me.

from ansible-silo.

bdlamprecht avatar bdlamprecht commented on May 24, 2024

Previously, I was using a VMware template that was created previously that possibly included an odd setting or package that is causing this issue.

So I downloaded a brand new ISO of Ubuntu 16.04.3 and installed it in a new VirtualBox on my local machine, installed just the base packages, and docker-ce version 17.07.0-ce and tried the command again.

Now I'm getting the following error:

brady@docker-vbox:~$ ansible-silo --switch
fatal: unable to connect to github.com:
github.com[0: 192.30.253.113]: errno=Connection refused
github.com[1: 192.30.253.112]: errno=Connection refused

Failed to fetch!

However, I can ping those IPs just fine:

brady@docker-vbox:~$ ping -c 3 192.30.253.113
PING 192.30.253.113 (192.30.253.113) 56(84) bytes of data.
64 bytes from 192.30.253.113: icmp_seq=1 ttl=47 time=62.4 ms
64 bytes from 192.30.253.113: icmp_seq=2 ttl=47 time=61.2 ms
64 bytes from 192.30.253.113: icmp_seq=3 ttl=47 time=83.6 ms

--- 192.30.253.113 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 61.248/69.099/83.628/10.288 ms

As you mentioned above, I ran the same command with SILO_DEBUG=1 and this is what I got:

brady@docker-vbox:~/bin$ SILO_DEBUG=1 ansible-silo --switch
SILO vars:
 - SILO_DEBUG=1

Runner file already exists.

Executing: /tmp/ansible-silo-runner-2.0.0 "--switch"

Executing: /usr/bin/docker run --interactive --tty --rm --volume "/home/brady/bin:/home/user/playbooks" --env DIRSTACK --env EUID --env HOSTTYPE --env LANG --env LESSCLOSE --env LESSOPEN --env MAIL --env OPTERR --env OPTIND --env PIPESTATUS --env POSIXLY_CORRECT --env PPID --env PS4 --env SHELLOPTS --env SHLVL --env docker_cmd --env docker_default  --volume "silo.brady:/silo/userspace" --env "SILO_VOLUME=silo.brady" --hostname "silo.docker-vbox" --volume /var/run/docker.sock:/var/run/docker.sock --privileged    --env USER_NAME="brady" --env USER_ID="1000" "grpn/ansible-silo:2.0.0" "--switch"

fatal: unable to connect to github.com:
github.com[0: 192.30.253.112]: errno=Connection refused
github.com[1: 192.30.253.113]: errno=Connection refused

Failed to fetch!

@udondan I apologize for the many comments which are probably overwhelming you with the work you already have, I'm just really confused by why I'm (apparently) the only one that is unable to get this to work.

from ansible-silo.

bdlamprecht avatar bdlamprecht commented on May 24, 2024

I tried doing your suggestion 2 above and it looks like that is where the issue lies:

brady@docker-vbox:~$ ansible-silo --shell
[ansible-silo 2.0.0|~/playbooks]$ git clone git://github.com/ansible/ansible.git /tmp/ansible
Cloning into '/tmp/ansible'...
fatal: unable to connect to github.com:
github.com[0: 192.30.253.112]: errno=Connection refused
github.com[1: 192.30.253.113]: errno=Connection refused

I'm not an git expert by any means, but just for kicks, I tried cloning ansible using HTTPS instead and it apparently works fine. So something is messed up in this --shell environment to not allow certain types of SSH traffic (such as git cloning):

[ansible-silo 2.0.0|~/playbooks]$ git clone https://github.com/ansible/ansible.git /tmp/ansible
Cloning into '/tmp/ansible'...
remote: Counting objects: 254706, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 254706 (delta 1), reused 5 (delta 1), pack-reused 254693
Receiving objects: 100% (254706/254706), 79.28 MiB | 821.00 KiB/s, done.
Resolving deltas: 100% (164570/164570), done.
Checking connectivity... done.

On how to solve this, I'm not sure exactly what is going on behind the scenes, but would love to be able to participate in helping getting this resolved.

from ansible-silo.

udondan avatar udondan commented on May 24, 2024

Thanks for all the details. Not sure what's going on here. Maybe in your environment non-https connections to github are blocked in general? Does the cloning work directly on your host without any docker involved?

Running this command should fix the problem temporarily for you:

ansible-silo --shell sudo sed -i 's/git:/https:/g' /silo/userspace/ansible/.git/config

You would need to run this for every Silo volume you use. If you only use the default volume it would be a one-time action until you --reset the volume.

from ansible-silo.

bdlamprecht avatar bdlamprecht commented on May 24, 2024

Yeah, that line worked! I can now use the --switch option to see all of the tags.

Perhaps you could have an option within ansible-silo to default to using https instead of git so as to not have to do this for each volume that is created.

I tried following this stackoverflow guide as to why git was failing and it this is what is returned:

brady@docker-vbox:/tmp$ ssh github.com git-receive-pack /tmp/ansible
ssh: connect to host github.com port 22: Connection refused

I'll have to work with some of my colleagues as to why this is occurring, but I appreciate the help.

from ansible-silo.

udondan avatar udondan commented on May 24, 2024

Perhaps you could have an option within ansible-silo to default to using https instead of git

Yes, I guess it makes sense to switch from git to https protocol. After some searching I found it actually is not that rare git protocol is blocked at some companies. Silo 2.0.2 was just released with this change.

Thanks again for bringing this to attention and all the details.

from ansible-silo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.