0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Sambaが止まっているはずなのにプロセスが使用中の場合の解決法

Posted at

エラー内容

$ sudo systemctl status samba-ad-dc.service
* samba-ad-dc.service - Samba AD Daemon
     Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sun 2021-07-25 00:09:33 JST; 1s ago
       Docs: man:samba(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 3465 ExecStart=/usr/sbin/samba --foreground --no-process-group $SAMBAOPTIONS (code=exited, status=1/FAILURE)
   Main PID: 3465 (code=exited, status=1/FAILURE)
     Status: "Starting process..."

Jul 25 00:09:33 ik1-442-53089 smbd[3480]:   ERROR: smbd is already running. File /run/samba/smbd.pid exists and process id 2092 is running.
Jul 25 00:09:33 ik1-442-53089 samba[3475]: [2021/07/25 00:09:33.107690,  0] ../../file_server/file_server.c:45(file_server_smbd_done)
Jul 25 00:09:33 ik1-442-53089 samba[3475]:   file_server smbd daemon died with exit status 1
Jul 25 00:09:33 ik1-442-53089 samba[3475]: [2021/07/25 00:09:33.107815,  0] ../../source4/smbd/service_task.c:36(task_server_terminate)
Jul 25 00:09:33 ik1-442-53089 samba[3475]:   task_server_terminate: task_server_terminate: [smbd child process exited]
Jul 25 00:09:33 ik1-442-53089 samba[3465]: [2021/07/25 00:09:33.164919,  0] ../../source4/smbd/server.c:370(samba_terminate)
Jul 25 00:09:33 ik1-442-53089 samba[3465]:   samba_terminate: samba_terminate of samba 3465: smbd child process exited
Jul 25 00:09:33 ik1-442-53089 systemd[1]: samba-ad-dc.service: Main process exited, code=exited, status=1/FAILURE
Jul 25 00:09:33 ik1-442-53089 systemd[1]: samba-ad-dc.service: Failed with result 'exit-code'.
Jul 25 00:09:33 ik1-442-53089 systemd[1]: Failed to start Samba AD Daemon.

やり方

起動しているプロセスを終了させる

$ sudo killall smbd

もしくはプロセスIDが分かる場合はそれを使用する
※上記の場合はエラー内容にプロセスIDが書かれている。

$ sudo kill 2092
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?