* 25.3.1 netbsd; scp tramp has long delay on first connection
@ 2018-09-21 6:39 Van L
2018-09-21 7:47 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-09-21 6:39 UTC (permalink / raw)
To: Help Gnu Emacs mailing list
Hello,
Using emacs to list a directory on a remote machine takes longer than expected.
I can ssh immediately but emacs’s tramp delays are over 60 seconds for the first time connection.
Is there a setting that is needed? Going in the other direction on the network with 26.1 emacs connects immediately.
┌────
│ Opening directory /scp:XXX@epi:/Users/XXX/2018-07-31/...
│ Tramp: Opening connection for XXX@epi using scp...
│ Tramp: Sending command ‘exec ssh -l XXX -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none epi’
│ Tramp: Waiting for prompts from remote shell...done
│ Tramp: Found remote shell prompt on ‘epi’
│ Tramp: Opening connection for XXX@epi using scp...done
│ Opening directory /scp:XXX@epi:/Users/XXX/2018-07-31/...done
└────
`(setq tramp-verbose 6)'
┌────
│ 6 (#o6, #x6, ?\C-f)
│ Opening directory /scp:XXX@epi:/Users/XXX/...
│ Tramp: Opening connection for XXX@epi using scp...
│ Tramp: Sending command ‘exec ssh -l XXX -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none epi’
│ Tramp: Waiting for prompts from remote shell...done
│ Tramp: Found remote shell prompt on ‘epi’
│ Tramp: Opening connection for XXX@epi using scp...done
│ Opening directory /scp:XXX@epi:/Users/XXX/...done
└────
(emacs-version) "GNU Emacs 25.3.1 (x86_64–netbsd, GTK+ Version
3.22.30) of 2018-07-05"
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-21 6:39 25.3.1 netbsd; scp tramp has long delay on first connection Van L
@ 2018-09-21 7:47 ` Michael Albinus
2018-09-21 8:18 ` Van L
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2018-09-21 7:47 UTC (permalink / raw)
To: Van L; +Cc: Help Gnu Emacs mailing list
Van L <van@scratch.space> writes:
> Hello,
Hi,
> `(setq tramp-verbose 6)'
> ┌────
> │ 6 (#o6, #x6, ?\C-f)
> │ Opening directory /scp:XXX@epi:/Users/XXX/...
> │ Tramp: Opening connection for XXX@epi using scp...
> │ Tramp: Sending command ‘exec ssh -l XXX -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none epi’
> │ Tramp: Waiting for prompts from remote shell...done
> │ Tramp: Found remote shell prompt on ‘epi’
> │ Tramp: Opening connection for XXX@epi using scp...done
> │ Opening directory /scp:XXX@epi:/Users/XXX/...done
> └────
> (emacs-version) "GNU Emacs 25.3.1 (x86_64–netbsd, GTK+ Version
> 3.22.30) of 2018-07-05"
If tramp-verbose is set to 6, there will be a Tramp debug buffer with
timestamps. Follow the lines which start "16:02:18.788240 <command> (6) ...",
and you'll see the commands Tramp sends to the remote, and the answers.
This should show us where Tramp spends its time.
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-21 7:47 ` Michael Albinus
@ 2018-09-21 8:18 ` Van L
2018-09-21 8:41 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-09-21 8:18 UTC (permalink / raw)
To: Michael Albinus; +Cc: Help Gnu Emacs mailing list
> Tramp debug buffer
7-8 line has the 75 second delay. The following is from an 'emacs -Q'
┌────
│ 1 17:58:00.706065 tramp-get-ls-command-with-dired (5) # Checking, whether ‘ls --dired’ works
│ 2 17:58:00.706184 tramp-get-ls-command (5) # Finding a suitable ‘ls’ command
│ 3 17:58:00.706630 tramp-maybe-open-connection (3) # Opening connection for epi using scp...
│ 4 17:58:00.710678 tramp-call-process (6) # ‘ssh -o ControlMaster’ nil *temp*
│ 5 17:58:00.722713 tramp-call-process (6) # 255
│ 6 command-line line 0: missing argument.
│ 7 17:58:00.722880 tramp-call-process (6) # ‘ssh -o ControlPath=%C 0.0.0.1’ nil *temp*
│ 8 17:59:15.790178 tramp-call-process (6) # 255
│ 9 Pseudo-terminal will not be allocated because stdin is not a terminal.
│ 10 ssh: connect to host 0.0.0.1 port 22: Connection timed out
│ 11 17:59:15.790435 tramp-call-process (6) # ‘ssh -o ControlPersist’ nil *temp*
│ 12 17:59:15.808515 tramp-call-process (6) # 255
│ 13 command-line line 0: Missing ControlPersist argument.
│ 14 17:59:15.810011 tramp-maybe-open-connection (6) # /bin/sh -i
│ 15 17:59:15.824180 tramp-wait-for-regexp (6) #
│ 16 XXX#$
│ 17 17:59:15.923043 tramp-maybe-open-connection (3) # Sending command ‘exec ssh -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none epi’
│ 18 17:59:15.923274 tramp-send-command (6) # exec ssh -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none epi
│ 19 17:59:15.925063 tramp-process-actions (3) # Waiting for prompts from remote shell...
│ 20 17:59:15.929173 tramp-process-one-action (5) # Looking for regexp "\(.*\(user\|login\)\( .*\)?: *\)\'" from remote shell
│ 21 17:59:15.930247 tramp-process-one-action (5) # Looking for regexp "\(^.*\(\(?:adgangskode\|contrase\(?:\(?:ny\|ñ\)a\)\|geslo\|h\(?:\(?:asł\|esl\)o\)\|iphasiwedi\|jelszó\|l\(?:ozinka\|ösenord\)\|m\(?:ot de passe\|ật khẩu\)\|pa\(?:rola\|s\(?:ahitza\|s\(?: phrase\|code\|ord\|phrase\|wor[dt]\)\|vorto\)\)\|s\(?:alasana\|enha\|laptažodis\)\|wachtwoord\|лозинка\|пароль\|ססמה\|كلمة السر\|गुप्तशब्द\|शब्दकूट\|গুপ্তশব্দ\|পাসওয়ার্ড\|ਪਾਸਵਰਡ\|પાસવર્ડ\|ପ୍ରବେଶ ସଙ୍କେତ\|கடவுச்சொல்\|సంకేతపదము\|ಗುಪ್ತಪದ\|അടയാളവാക്ക്\|රහස්පදය\|ពាក្យសម្ងាត់\|パスワード\|密[码碼]\|암호\)\).*:
└────
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-21 8:18 ` Van L
@ 2018-09-21 8:41 ` Michael Albinus
2018-09-21 9:58 ` Van L
0 siblings, 1 reply; 11+ messages in thread
From: Michael Albinus @ 2018-09-21 8:41 UTC (permalink / raw)
To: Van L; +Cc: Help Gnu Emacs mailing list
Van L <van@scratch.space> writes:
Hi,
> 7-8 line has the 75 second delay. The following is from an 'emacs -Q'
Yes. Lines 4-13 do check some features of your local ssh client.
> │ 4 17:58:00.710678 tramp-call-process (6) # ‘ssh -o ControlMaster’
> nil *temp*
> │ 5 17:58:00.722713 tramp-call-process (6) # 255
> │ 6 command-line line 0: missing argument.
This returns immediately.
> │ 7 17:58:00.722880 tramp-call-process (6) # ‘ssh -o ControlPath=%C 0.0.0.1’ nil *temp*
> │ 8 17:59:15.790178 tramp-call-process (6) # 255
> │ 9 Pseudo-terminal will not be allocated because stdin is not a terminal.
> │ 10 ssh: connect to host 0.0.0.1 port 22: Connection timed out
Here we have a time out, which causes the delay. The intention was to
get an immediate answer.
> │ 11 17:59:15.790435 tramp-call-process (6) # ‘ssh -o ControlPersist’
> nil *temp*
> │ 12 17:59:15.808515 tramp-call-process (6) # 255
> │ 13 command-line line 0: Missing ControlPersist argument.
This returns immediately, again.
Well, this is a known problem with some OpenSSH 7 versions, and fixed
already in more recent Tramp versions. The second ssh call in Tramp uses
"ConnectTimeout=1" additionally.
You can disable these tests by setting
tramp-use-ssh-controlmaster-options to nil.
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-21 8:41 ` Michael Albinus
@ 2018-09-21 9:58 ` Van L
0 siblings, 0 replies; 11+ messages in thread
From: Van L @ 2018-09-21 9:58 UTC (permalink / raw)
To: Michael Albinus; +Cc: Help Gnu Emacs mailing list
> Well, this is a known problem with some OpenSSH 7 versions, and fixed
> already in more recent Tramp versions. The second ssh call in Tramp uses
> "ConnectTimeout=1" additionally.
>
> You can disable these tests by setting
> tramp-use-ssh-controlmaster-options to nil.
That explains it. Thank you, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
@ 2018-09-25 2:27 Van L
2018-09-25 10:48 ` Michael Albinus
0 siblings, 1 reply; 11+ messages in thread
From: Van L @ 2018-09-25 2:27 UTC (permalink / raw)
To: Help Gnu Emacs mailing list
> You can disable these tests by setting
> tramp-use-ssh-controlmaster-options to nil.
┌────
│ ;; settings don't apply after Emacs restart
│ (custom-set-variables
│ '(tramp-use-ssh-controlmaster-options nil))
│
│ ;; this does
│ (setq tramp-use-ssh-controlmaster-options nil)
└────
In .emacs the above shows the Customize UI's settings not
sticking after Emacs restart.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-25 2:27 Van L
@ 2018-09-25 10:48 ` Michael Albinus
2018-09-25 11:23 ` Van L
[not found] ` <mailman.1290.1537875422.1284.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 11+ messages in thread
From: Michael Albinus @ 2018-09-25 10:48 UTC (permalink / raw)
To: Van L; +Cc: Help Gnu Emacs mailing list
Van L <van@scratch.space> writes:
Hi,
> > You can disable these tests by setting
> > tramp-use-ssh-controlmaster-options to nil.
>
> ┌────
> │ ;; settings don't apply after Emacs restart
> │ (custom-set-variables
> │ '(tramp-use-ssh-controlmaster-options nil))
> │
> │ ;; this does
> │ (setq tramp-use-ssh-controlmaster-options nil)
> └────
>
> In .emacs the above shows the Customize UI's settings not
> sticking after Emacs restart.
It might be needed to apply (require 'tramp) prior the
custom-set-variables call.
Best regards, Michael.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-25 10:48 ` Michael Albinus
@ 2018-09-25 11:23 ` Van L
[not found] ` <mailman.1290.1537875422.1284.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 11+ messages in thread
From: Van L @ 2018-09-25 11:23 UTC (permalink / raw)
To: Michael Albinus; +Cc: Help Gnu Emacs mailing list
>>> You can disable these tests by setting
>>> tramp-use-ssh-controlmaster-options to nil.
>>
>> ┌────
>> │ ;; settings don't apply after Emacs restart
>> │ (custom-set-variables
>> │ '(tramp-use-ssh-controlmaster-options nil))
>> │
>> │ ;; this does
>> │ (setq tramp-use-ssh-controlmaster-options nil)
>> └────
>
> It might be needed to apply (require 'tramp) prior the
> custom-set-variables call.
Yes, (require 'tramp) before custom-set-variables
absent setq lets the option setting stay after
restarting Emacs.
Line 5 in the documentation for require can do without
the lower case second word repeated in upper case by
the third.
┌────
│ 1 require is a built-in function in ‘C source code’.
│ 2
│ 3 (require FEATURE &optional FILENAME NOERROR)
│ 4
│ 5 If feature FEATURE is not loaded, load it from FILENAME.
│ 6 If FEATURE is not a member of the list ‘features’, then the feature is
│ 7 not loaded; so load the file FILENAME.
└────
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.1290.1537875422.1284.help-gnu-emacs@gnu.org>]
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
[not found] ` <mailman.1290.1537875422.1284.help-gnu-emacs@gnu.org>
@ 2018-09-25 14:48 ` Emanuel Berg
2018-09-26 1:58 ` Van L
2018-09-26 2:17 ` Van L
0 siblings, 2 replies; 11+ messages in thread
From: Emanuel Berg @ 2018-09-25 14:48 UTC (permalink / raw)
To: help-gnu-emacs
Van L wrote:
> require is a built-in function in ‘C source
> code’.
If I may, `require' is a built-in function in
`fns.c'!
1. Get the source:
#! /bin/zsh
get-source () {
apt-get source $@
}
alias get-src=get-source
$ get-src emacs24
2. Look for the "src" directory.
3. Set the `find-function-C-source-directory'
to the "src" directory, or move the dir to
where the var points.
4. Do `C-h f require RET' and hit the button
for the C source!
Oh, perhaps this is needed in
/etc/apt/sources.list
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi
But with a repository URL, distribution
(here: jessie), and components (main etc) to
match your system, right?
--
underground experts united
http://user.it.uu.se/~embe8573
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-25 14:48 ` Emanuel Berg
@ 2018-09-26 1:58 ` Van L
2018-09-26 2:17 ` Van L
1 sibling, 0 replies; 11+ messages in thread
From: Van L @ 2018-09-26 1:58 UTC (permalink / raw)
To: Emanuel Berg; +Cc: help-gnu-emacs
>> require is a built-in function in ‘C source
>> code’.
>
> If I may, `require' is a built-in function in
> `fns.c'!
I have clones of Emacs 18.53, 25, 26, 27 sources, open.
26.1 Emacs-mac 7.2 sends a click on the link `C source code’ to
~/2018/Sources/emacs-mac/src/fns.c
25.3.1 Emacs on link click produces a huge window frame dialog for file open. I thought I had used the Customize UI to set: always use the grandfather-feature-echo-area-only for that but maybe I need to magically know to require something else. To avoid being prompted, I guess I need to set to persist in Emacs the location of the TAGS file in the source code directory but how?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: 25.3.1 netbsd; scp tramp has long delay on first connection
2018-09-25 14:48 ` Emanuel Berg
2018-09-26 1:58 ` Van L
@ 2018-09-26 2:17 ` Van L
1 sibling, 0 replies; 11+ messages in thread
From: Van L @ 2018-09-26 2:17 UTC (permalink / raw)
To: Help Gnu Emacs mailing list
> 3. Set the `find-function-C-source-directory'
> to the "src" directory, or move the dir to
> where the var points.
┌────
│ 1 ;; 25.3 has only find-function-C-source; this fails
│ 2 ;; (find-function-C-source-directory '/home/XXX/opt/src/emacs-25.3/src)
│ 3
│ 4 ;; the following fails to reach link's target but the `C source code' link is now labelled `src/fns.c'
│ 5 ;; (setq find-function-C-source-directory '/home/XXX/opt/src/emacs-25.3/src)
│ 6
│ 7 ;; this works
│ 8 (setq find-function-C-source-directory "/home/XXX/opt/src/emacs-25.3/src")
└────
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-09-26 2:17 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-21 6:39 25.3.1 netbsd; scp tramp has long delay on first connection Van L
2018-09-21 7:47 ` Michael Albinus
2018-09-21 8:18 ` Van L
2018-09-21 8:41 ` Michael Albinus
2018-09-21 9:58 ` Van L
-- strict thread matches above, loose matches on Subject: below --
2018-09-25 2:27 Van L
2018-09-25 10:48 ` Michael Albinus
2018-09-25 11:23 ` Van L
[not found] ` <mailman.1290.1537875422.1284.help-gnu-emacs@gnu.org>
2018-09-25 14:48 ` Emanuel Berg
2018-09-26 1:58 ` Van L
2018-09-26 2:17 ` Van L
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.