![Cygwin で Exim デーモンを起動できない](https://rvso.com/image/1518661/Cygwin%20%E3%81%A7%20Exim%20%E3%83%87%E3%83%BC%E3%83%A2%E3%83%B3%E3%82%92%E8%B5%B7%E5%8B%95%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84.png)
Windows 10 上の Cygwin に Exim デーモンをインストールした後、起動できなくなりました。
セットアップの最後にexim-config
、デーモンは次のメッセージで失敗します。
Do you want to start the exim daemon as a service now? (yes/no) yes
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:
The service has not been started.
ERROR: Could not start the daemon.
INFO: The exim log files are in /var/log/exim.
WARNING: The default permissions are only suitable for a casual environment.
See /usr/share/doc/Cygwin/exim-X-Y.README for how to adjust them.
When everything else fails,
read /usr/share/doc/Cygwin/exim-X-Y.README,
or look up the documentation on www.exim.org.
Many happy mailings :)
次のログ ファイルが存在します/var/log/exim
:
$ dir -l /var/log/exim
total 4
-rw-rw-r-- 1 cyg_server Administrators 0 Jan 13 16:48 cygrunsrv_err.log
-rw-rw-r-- 1 cyg_server Administrators 0 Jan 13 16:48 cygrunsrv_out.log
-rw-rw-rw- 1 User1 User1 1499 Jan 14 09:49 exim_main.log
最初の 2 つは空で、3 番目には関連する情報がありません。
構成を実行した後にサービスを開始しようとすると、次のメッセージが表示されて失敗します。
$ net start exim
The exim service is starting.
The exim service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
$ NET HELPMSG 3534
The service did not report an error.
Windows イベント ビューアーのアプリケーション ログには次のメッセージが表示されます。
The description for Event ID 0 from source exim cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
exim: PID 2708: service `exim' failed: signal 6 raised
このエラーの原因は何なのか、またはさらにどのような診断を実行すればよいのか、ご意見はありますか? ありがとうございます!
答え1
約1時間同じエラーをいじった後、私は現在setup-x86.exe
のhttps://cygwin.com/setup-x86.exeexim と openssh-server の「再インストール」をチェックしました。
次に、ドメイン管理者として実行しexim-config
、サービスを(再度)再構成しました。
現在、サービスは問題なく実行されています。
答え2
私の場合 (サーバー 2016 および 2019) の問題は、サービスのログオン ユーザーでした。セットアップ スクリプトでは、特別な権限を持つ cyg_server ユーザーを作成して使用します。しかし、最近ではそれだけでは十分ではないようです。
次のコマンドを実行すると障害を確認できます: exim -bd -q15m -v -d
私の場合は、setuid を x および y に変更できない、ログに書き込めない、というメッセージが表示されました... これは権限の問題です。
これを回避するには、exim をサービスとしてのみ実行し、次のように Windows に組み込まれている「ローカル サービス」を使用します。サービス、exim、ログオン タブで、ローカル システム アカウントを選択します。