tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tramp (2.2.11-24.5); Multihop connection ssh|docker fails due to carriag


From: Oleg Sivokon
Subject: tramp (2.2.11-24.5); Multihop connection ssh|docker fails due to carriage returns
Date: Thu, 25 Feb 2016 16:52:39 +0200



Hello,
I was trying to access filesystem inside a Docker container running
inside a virtual machine (VMWare, in a VCenter).  My host OS is Fedora
23.  The VM OS is CentOS 7, the Docker container system is CentOS 7 too.

I've used `docker-tramp' library to add a connection type for Docker
containers.  (However, I also tried to do that on my own earlier).  The
relevant code looks like this:

(add-to-list 'tramp-methods
             '("docker"
               (tramp-login-program "docker")
               (tramp-login-args
                (("exec" "-i") ("%h") ("/bin/sh")))
               (tramp-remote-shell "/bin/sh")
               (tramp-remote-shell-args ("-i") ("-c"))))

I've also tried `(tramp-login-args (("exec" "-ti") ("%h") ("/bin/sh")))'

Even though I am able to use Tramp to ssh into this VM, and I can use
Tramp inside Docker container running on my system, I cannot connect to
the docker running inside a VM using /ssh:vm|docker:id:/ path.  The
output seems to indicate there is a problem with carriage returns (^M)
which might mess up the parsing.
The error I was receiving:

cond: Wrong type argument: number-or-marker-p, //DIRED-OPTIONS//

I've tried to advise `tramp-find-executable':

(defun my/tramp-find-executable
    (func vec progname dirlist &optional ignore-tilde ignore-path)
  (org-trim (funcall func vec progname dirlist ignore-tilde ignore-path)))

(advice-add 'tramp-find-executable
            :around 'my/tramp-find-executable)

Which seems to have remedied part of the problem, but now Tramp waits
for about five minutes, and then gives up with the last message being:

exec docker exec -i 74b79b8b67a2 /bin/sh^M

(note the ^M in this line)

Best.

Oleg

Emacs  : GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.17.8)
 of 2015-09-11 on buildvm-21.phx2.fedoraproject.org
Package: tramp (2.2.11-24.5)

current state:
==============
State could not be dumped due to the following error:

(error Multibyte character in data for base64 encoding)

You should still send this bug report.
local variables:
================
;; *tramp/docker 74b79b8b67a2*
(setq-local
 default-directory "/docker:74b79b8b67a2:/"
 )

load-path shadows:
==================

Attachment: txtLk7NHq0rpY.txt
Description: *tramp/docker 74b79b8b67a2*

Attachment: txtd5UHW4_C1i.txt
Description: *debug tramp/docker 74b79b8b67a2*

Attachment: txt0TeoWpQPgy.txt
Description: *debug tramp/ssh root@func14-loader1*


reply via email to

[Prev in Thread] Current Thread [Next in Thread]