Git Product home page Git Product logo

Comments (11)

codebling avatar codebling commented on June 9, 2024 1

Thanks for the quick response.

There is no ps available in the redis image (621ceef7494a), and no files in /tmp in the container. Another image had ps, but running it showed only the original process, the sh I was using, and ps itself (and again no files in /tmp).

I tried with a few other images and I got this error about half the time

2022/01/05 11:46:24 [ERR] yamux: Invalid protocol version: 79

Let me know what else I should try

from autoportforward.

ruoshan avatar ruoshan commented on June 9, 2024 1

Thank you for your help!

from autoportforward.

codebling avatar codebling commented on June 9, 2024 1

Confirmed. I was expecting the port to show up as forwarded under Docker after running apf but it makes sense that it doesn't. Definitely forwards the port, and forwarding stops when the program is closed. Works great! Thanks for the quick fix!

By the way, I've made autoportforward available as a package on arch. It's just in the user repository and builds from the main branch, for now.

Great idea thanks for the great creation!

from autoportforward.

ruoshan avatar ruoshan commented on June 9, 2024

can you log into the container (docker -it exec redis bash) and run some commands while apf is running with -d?

# in the container
ps aux
cat /tmp/autoportforward.log

I don't have an Archlinux. but it does work on my CentOS vm and Mac.

from autoportforward.

ruoshan avatar ruoshan commented on June 9, 2024

Interesting. the way apf works is apf will copy a small agent binary to the container, and that binary will use its stdio to multiplex tcp streams. I am suspecting the binary can't be executed in your containers,maybe because the kernel or the libc loader or the arch doesn't match.

Those errors you got, and with no log file in the container might be caused by that binary failing to run. The next step to assist me debugging would be:

  • run an ubuntu container or others that has ps/busybox installed
  • run apf -d
  • in other terminal window, log in the container, check if there's a /apf-agent file in the / dir
  • if so, see if you can manually run it. let me known if it runs, prints some garbage characters and exits.

Thanks!

from autoportforward.

codebling avatar codebling commented on June 9, 2024

aha!

./apf-agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./apf-agent)
# ldd ./apf-agent 
./apf-agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./apf-agent)
	linux-vdso.so.1 (0x00007ffc86fd7000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0b6be68000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0b6bc76000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f0b6be8f000)

I can poke around a bit more later

from autoportforward.

ruoshan avatar ruoshan commented on June 9, 2024

I will build a static agent binary

from autoportforward.

ruoshan avatar ruoshan commented on June 9, 2024

@codebling mind help me checking if the latest main works? before I tag a new release.

from autoportforward.

codebling avatar codebling commented on June 9, 2024

works!

from autoportforward.

codebling avatar codebling commented on June 9, 2024

Does not exit after forwarding ports, however. Is that normal?

from autoportforward.

ruoshan avatar ruoshan commented on June 9, 2024

apf should stay running so it can keep the listeners alive. if you close it, forwarding stops.

from autoportforward.

Related Issues (6)

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.