🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: fj.editor.xemacs
7 messages
7 total messages Started by chee Sun, 21 Oct 2001 12:45
オフライン時 起動できず
#101
Author: chee
Date: Sun, 21 Oct 2001 12:45
6 lines
1451 bytes
XEmacs 21.5 beta3 でオフライン時(LANケーブルを抜いた状態)
xemacs -q で立ち上げてみても、 dnsを引きにいってしまうようで
起動できません。

セッティングの問題やこれを抑制する方法など、分かるところがありま
したら教えてください。
emacs の起動が遅いのはなぜ? (was: オフライン時 起動できず)
#102
Author: KURODA Chihiro
Date: Mon, 22 Oct 2001 00:44
71 lines
4446 bytes
# PROBLEMS の中に次の記述を見つけたのですが、これによると Linux
# 固有の問題のように読めます。ということで fj.os.linux も追加。

emacs の起動が遅いのはなぜ? というトピックで、それに対する回答が
(オフライン状態の場合は) 空の host.conf を用意せよ、hosts は
この方法では不要である、 ということのようですが、

・そもそも私の環境では起動が遅いどころか、起動すらしない
・(オン・オフライン) 状態が頻繁に変わる状況で、いちいち空の host.
 conf を用意するなんてアプローチは取りたくない

いずれにしても、こういう仕様(-q をつけても 起動時に dns query)自体が
(少なくとも私には)にわかに信じ難いのですが、とりあえず皆さんはどういった
回避方法を取られているか、教えてもらえませんか?


/usr/share/doc/xemacs-21.5.3/PROBLEMS 1385 行目付近

*** Slow startup on Linux.

People using systems based on the Linux kernel sometimes report that
startup takes 10 to 15 seconds longer than `usual'.  There are two
problems, one older, one newer.

**** Old problem: IPv4 host lookup

On older systems, this is because Emacs looks up the host name when it
starts.  Normally, this takes negligible time; the extra delay is due
to improper system configuration.  (Recent Linux distros usually have
this configuration correct "out of the box".)  This problem can occur
for both networked and non-networked machines.

Here is how to fix the configuration.  It requires being root.

***** Networked Case

First, make sure the files `/etc/hosts' and `/etc/host.conf' both
exist.  The first line in the `/etc/hosts' file should look like this
(replace HOSTNAME with your host name):

    127.0.0.1      localhost HOSTNAME

Also make sure that the `/etc/host.conf' files contains the following
lines:

    order hosts, bind
    multi on

Any changes, permanent and temporary, to the host name should be
indicated in the `/etc/hosts' file, since it acts a limited local
database of addresses and names (e.g., some SLIP connections
dynamically allocate ip addresses).

***** Non-Networked Case

The solution described in the networked case applies here as well.
However, if you never intend to network your machine, you can use a
simpler solution: create an empty `/etc/host.conf' file.  The command
`touch /etc/host.conf' suffices to create the file.  The `/etc/hosts'
file is not necessary with this approach.


  > [chee] == chee@subdimension.com
  > wrote in message <m3adylqhzv.wl@localhost> ...

chee> XEmacs 21.5 beta3 でオフライン時(LANケーブルを抜いた状態)
chee> xemacs -q で立ち上げてみても、 dnsを引きにいってしまうようで
chee> 起動できません。

chee> セッティングの問題やこれを抑制する方法など、分かるところがありま
chee> したら教えてください。
Re: emacs の起動が遅いのはなぜ? (was: オフライン時 起動できず)
#105
Author: Yoichi NAKAYAMA
Date: Mon, 22 Oct 2001 09:08
11 lines
2517 bytes
Mon, 22 Oct 2001 09:44:24 +0900 頃に
KURODA Chihiro <chee@subdimension.com> さん曰く:
> いずれにしても、こういう仕様(-q をつけても 起動時に dns query)自体が
> (少なくとも私には)にわかに信じ難いのですが、

      -q, -no-init-file
               Do not load an init file.

なので -q は単に .emacs を読ませないだけですよ.
-- 
Yoichi Nakayama
Re: emacs の起動が遅いのはなぜ? (was: オフライン時 起動できず)
#107
Author: chee
Date: Mon, 22 Oct 2001 11:27
11 lines
2120 bytes
  > Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
  > wrote in message <86hessjb4f.wl@eken.phys.nagoya-u.ac.jp> ...

> -q は単に .emacs を読ませないだけですよ.

初期化ファイルを読み込まない = トラブルシューティングのための最小起動方法
という使い方をしているので、そんな場合でも起動の前に dns を引きにいく仕様
って嫌だなと。。 まず立ち上がるだけは立ち上がってもらわないと。。 それで

> (少なくとも私には)にわかに信じ難い
といっていた訳です。
Re: emacs の起動が遅いのはなぜ? (was: オフライン時 起動できず)
#108
Author: Yoichi NAKAYAMA
Date: Mon, 22 Oct 2001 12:46
27 lines
3148 bytes
なかやまです

Mon, 22 Oct 2001 20:27:30 +0900 頃に
chee@subdimension.com さん曰く:

> 初期化ファイルを読み込まない = トラブルシューティングのための最小起動方法
> という使い方をしているので、そんな場合でも起動の前に dns を引きにいく仕様
> って嫌だなと。。 まず立ち上がるだけは立ち上がってもらわないと。。 それで

> > (少なくとも私には)にわかに信じ難い
> といっていた訳です。

> ・(オン・オフライン) 状態が頻繁に変わる状況で、いちいち空の host.
>  conf を用意するなんてアプローチは取りたくない

hosts
bind 

の順に書いた host.conf を用意するのは駄目でしょうか?
# 書式は host.conf(5) 参照(order hosts,bind かしら)
hosts には

127.0.0.1	localhost

だけ書いてあればいいと思います.
-- 
Yoichi Nakayama
XEmacs 起動時の DNS query
#109
Author: chee
Date: Mon, 22 Oct 2001 14:01
33 lines
2805 bytes
アドバイスありがとうございます。早速試してみたところ、

・host.conf 内の order にかかわらず、dns query(*) を発行
 
することが分かりました。 host.conf を空にしても状況は変わらず、
つまり resolv.conf を消すか空にするしか起動時の query を止める
ことはできませんでした。

ということで、先に引用した PROBLEMS での

> > いちいち空の host.conf を用意するなんてアプローチ

でも「オフラインで XEmacs を起動できない」問題は解決できず、

(*) 毎回 hostname を 2回 (当然失敗)、`localhost' で8回も (これは
  成功にも関わらず - dns に localhost エントリあり) 問い合わせている ...

ということが分かり、さらに不可解になってきました。


  > Yoichi NAKAYAMA <yoichi@eken.phys.nagoya-u.ac.jp>
  > wrote in message <863d4b9719.wl@eken.phys.nagoya-u.ac.jp> ...

> hosts
> bind 

> の順に書いた host.conf を用意するのは駄目でしょうか?
> # 書式は host.conf(5) 参照(order hosts,bind かしら)
> hosts には

> 127.0.0.1	localhost

> だけ書いてあればいいと思います.
解決: XEmacs オフライン時 起動できず
#124
Author: chee
Date: Fri, 26 Oct 2001 06:50
21 lines
2314 bytes
comp.emacs.xemacs で答を得ましたのでご報告まで。

configure スクリプトのオプション --with-ipv6-cname をデフォルト (yes)
のまま xemacs をビルドすると「localhost の IPv6 CNAME を取得しにいく」
ことが原因でした。

この lookup 動作に関しては doc/PROBLEMS の先の引用部の *次段* に ...

|**** New problem: IPv6 CNAME lookup
|
|A newer problem is due to XEmacs changing to use the modern
|getaddrinfo() interface from the older gethostbyname() interface.  The
|solution above is insufficient, because getaddrinfo() by default tries
|to get IPv6 information for localhost (including the local X server).
|This always involves a dns lookup to get the CNAME, and the strategies
|above don't work.  It then falls back to IPv4 behavior.

# メールで頂いたコメント:
# 「/etc/nsswitch.conf 内のエントリ hosts: files dns の順番を確認せよ」
# 確認したところ順番はこの通りになっていて、今回の原因ではありませんでしたが、
# アドバイスをありがとうございました。
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads