LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-25-2016, 07:25 PM   #16
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943

Quote:
Originally Posted by usr345 View Post
no, doesn't start without the Internet connection.
Code:
# For loopbacking.
127.0.0.1               localhost
127.0.0.1               phpmyadmin
127.0.0.1               dubai
127.0.0.1               lwt
192.168.1.4             asus.asus asus
93.184.220.75           static1.dmcdn.net
208.64.123.130          bitcoin.org

# End of hosts.
What's in /etc/HOSTNAME ? Also I found some info at StackExchange that might be relevant;
Quote:

One slow startup problem is usually that you don't have your machines fully qualified hostname declared in /etc/hosts which causes emacs to hang at some syscall during startup. However, that would not explain why emacs is faster than emacs -Q.
[...]
I had the same problem and solved it by adding machine name (not fully qualified) to /etc/hosts as a synonym for localhost. strace revealed that it used before 5 seconds opening an IP connection and another 4+4 seconds in two ioctls and still some seconds in other handling of these connections. Now it starts immediately
 
Old 10-26-2016, 12:09 AM   #17
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by asdrubale View Post
maybe you have to add
Code:
127.0.0.1   host.does.not.exist
to /etc/hosts
Tried, didn't help. But it seems, that this is the right way of investigation at least. Today when I launched GUI Emacs after some time I got a popup with the following message:

Quote:
The authenticity of host 'host.does.not.exist (127.0.0.1)' can't be established. ECDSA key fingerprint is SHA256:<hex code>. Are you sure want to continue connecting?
So, it's tramp trying to connect to my local machine for some reason.

Last edited by usr345; 10-26-2016 at 12:27 AM.
 
Old 10-26-2016, 12:24 AM   #18
a4z
Senior Member
 
Registered: Feb 2009
Posts: 1,727

Rep: Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742Reputation: 742
have you tried to remove (rename) your .emacs.d , or what you use for emacs,
maybe there is some auto install update melpa other package manager configured that tries to get info from the net
did you tried to use emacs clean?
 
Old 10-26-2016, 01:20 AM   #19
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by a4z View Post
have you tried to remove (rename) your .emacs.d , or what you use for emacs,
maybe there is some auto install update melpa other package manager configured that tries to get info from the net
did you tried to use emacs clean?
Yes, I renamed both .emacs and .emacs.d --- didn't help.
 
Old 10-26-2016, 03:46 PM   #20
asdrubale
LQ Newbie
 
Registered: Aug 2012
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by usr345 View Post
Tried, didn't help. But it seems, that this is the right way of investigation at least. Today when I launched GUI Emacs after some time I got a popup with the following message:



So, it's tramp trying to connect to my local machine for some reason.
you could try with an IP address which belongs to the same subnet of your PC but is not used by any other PC, e.g. 192.168.1.253. I had the same problem a year ago and now in my /etc/host there is the following line:
Code:
192.168.1.253   host.does.not.exist
but I can't remember why I chose that address...
 
Old 10-26-2016, 11:14 PM   #21
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by asdrubale View Post
you could try with an IP address which belongs to the same subnet of your PC but is not used by any other PC, e.g. 192.168.1.253. I had the same problem a year ago and now in my /etc/host there is the following line:
Code:
192.168.1.253   host.does.not.exist
Tried, didn't help.
 
Old 10-26-2016, 11:38 PM   #22
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by usr345 View Post
So, it's tramp trying to connect to my local machine for some reason.
Unplug cable. Start emacs with the "--debug-init" command line option. Hit ctrl-G after 5 minutes. Give stacktrace.
 
Old 10-27-2016, 10:24 AM   #23
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
Unplug cable. Start emacs with the "--debug-init" command line option. Hit ctrl-G after 5 minutes. Give stacktrace.
Tried it. It gave just the info about successfully loading my packages:

Quote:
Loading /home/usr345/.emacs.d/bootstrap-init.el (source)...
Loading ~/.emacs.d/functions...done
Loading /home/usr345/.emacs.d/accounting.el (source)...done
Loading /home/usr345/.emacs.d/bookmarks.el (source)...done
Loading /home/usr345/.emacs.d/dired.el (source)...
Loading /home/usr345/.emacs.d/filesets-cache.el (source)...done
Accessing directories in Dired will REUSE the buffer
Loading /home/usr345/.emacs.d/dired.el (source)...done
Loading /home/usr345/.emacs.d/cperl.el (source)...done
Loading /home/usr345/.emacs.d/css.el (source)...done
Loading /home/usr345/.emacs.d/eshell.el (source)...done
Loading /home/usr345/.emacs.d/html-mode.el (source)...done
Loading /home/usr345/.emacs.d/kb_shortcuts.el (source)...done
Loading /home/usr345/.emacs.d/latex.el (source)...done
Loading /home/usr345/.emacs.d/php.el (source)...
Loading /home/usr345/.emacs.d/php-functions.el (source)...done
Loading /home/usr345/.emacs.d/php.el (source)...done
Loading /home/usr345/.emacs.d/javascript.el (source)...done
Loading /home/usr345/.emacs.d/elisp.el (source)...done
Loading /home/usr345/.emacs.d/org-mode.el (source)...done
Loading /home/usr345/.emacs.d/sql-mode.el (source)...
Loading sql...done
Loading /home/usr345/.emacs.d/local_databases.el (source)...done
Loading /home/usr345/.emacs.d/sql-mode.el (source)...done
Loading tagging...done
Loading /home/usr345/.emacs.d/plugins/yasnippet/yasnippet.el (source)...done
[yas] Prepared just-in-time loading for ~/.emacs.d/yasnippets
[yas] Reloaded everything (snippets will load just-in-time)....
Loading cua-base...done
Loading /home/usr345/.emacs.d/bootstrap-init.el (source)...done
[yas] Loading for `emacs-lisp-mode', just-in-time: (lambda nil (yas--load-directory-1 (quote /home/usr345/.emacs.d/yasnippets/emacs-lisp-mode) (quote emacs-lisp-mode)))!
[yas] Loading compiled snippets from /home/usr345/.emacs.d/yasnippets/emacs-lisp-mode
Loading /home/usr345/.emacs.d/yasnippets/emacs-lisp-mode/.yas-compiled-snippets.el (source)...done
[yas] Loading snippet files from /home/usr345/.emacs.d/yasnippets/emacs-lisp-mode
For information about GNU Emacs and the GNU system, type C-h C-a.
Package iswitchb is obsolete!
Quit
 
Old 10-27-2016, 10:43 AM   #24
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
Do you use yp for user and any firewall rule on local client? local host's 127.0.0.1 has to connect to yp server.
 
Old 10-27-2016, 10:49 AM   #25
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
So does the machine hostname (in /etc/HOSTNAME) have an entry in /etc/hosts ?

Also, you could perhaps try the idea from StackExchange (running it under strace)
Code:
strace -o /tmp/foo emacs -Q -nw
and see what's in /tmp/foo while it's hanging.
 
1 members found this post helpful.
Old 10-27-2016, 11:42 AM   #26
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,220

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
Also, there's no strange zombie processes are there? If you
Code:
killall emacs
first do you get anywhere?
 
Old 10-27-2016, 11:45 AM   #27
number22
Member
 
Registered: Sep 2006
Location: Earth
Distribution: Slackware 14.1 Slackware64-current multilib
Posts: 278
Blog Entries: 7

Rep: Reputation: Disabled
Do you use any rpc services? rpc binding port can be connected to 127.0.0.1 as well.
 
Old 10-27-2016, 12:40 PM   #28
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by drgibbon View Post
So does the machine hostname (in /etc/HOSTNAME) have an entry in /etc/hosts ?

Also, you could perhaps try the idea from StackExchange (running it under strace)
Code:
strace -o /tmp/foo emacs -Q -nw
and see what's in /tmp/foo while it's hanging.
No, it doesn't. /etc/HOSTNAME has:

Quote:
laptop.local
Which is not present in /etc/ hosts

Here is the trace (seems that it tries to connect to laptop):

Quote:
socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4
connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.1.1")}, 16) = 0
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
send(4, "\346k\1\0\0\1\0\0\0\0\0\0\6laptop\5local\0\0\34\0\1", 30, MSG_NOSIGNAL) = 30
poll([{fd=4, events=POLLIN}], 1, 5000) = 0 (Timeout)
poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}])
send(4, "\346k\1\0\0\1\0\0\0\0\0\0\6laptop\5local\0\0\34\0\1", 30, MSG_NOSIGNAL) = 30
poll([{fd=4, events=POLLIN}], 1, 5000) = 0 (Timeout)
close(4) = 0
It repeats again and again.
 
Old 10-27-2016, 12:42 PM   #29
usr345
Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 204

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Hurray! After adding:

Quote:
127.0.0.1 laptop
to /etc/hosts it started to work. Thank you, drgibbon, sir.

Last edited by usr345; 10-27-2016 at 01:01 PM.
 
Old 10-27-2016, 12:51 PM   #30
atelszewski
Member
 
Registered: Aug 2007
Distribution: Slackware
Posts: 948

Rep: Reputation: Disabled
Hi,

Quote:
Originally Posted by usr345 View Post
Hurray! After adding:
Quote:
laptop 127.0.0.1
to /etc/hosts it started to work. Thank you, drgibbon, sir.
This does not look like a correct entry for /etc/hosts (i.e. IP address should be first).

--
Best regards,
Andrzej Telszewski
 
  


Reply

Tags
emacs



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware current x64 and KDE doesn't start? hsahin4 Slackware 6 02-02-2011 02:00 PM
KDM on slackware 11 Doesn`t Start sanctusiuda Linux - Newbie 9 05-21-2007 11:26 PM
Slackware 10.2 sometimes system doesn't start from cold not even BIOS messages. kowkow Slackware 27 04-18-2007 03:00 AM
(x)emacs doesn't start thelonius Debian 8 07-21-2006 12:30 PM
LILO doesn't start up-Slackware 10 AM1SHFURN1TURE Linux - Software 7 10-01-2004 05:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration