---
slug: "samba-ad-dc-failed-stop-slapd"
title: "Samba AD DC Malfunction -> Stopping slapd Resolved the Issue"
description: "System packages (`libmysqlclient-dev` etc.) and env vars needed when Python's MySQLdb fails with `mysql_config not found`."
url: "https://www.ytyng.com/en/blog/samba-ad-dc-failed-stop-slapd"
publish_date: "2018-12-04T12:21:21Z"
created: "2018-12-04T12:21:21Z"
updated: "2026-05-11T13:21:48.253Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/8860ac2794fb495aa257c9e8d97e8258.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# Samba AD DC Malfunction -> Stopping slapd Resolved the Issue

<p>On Ubuntu 18, the samba-ad-dc service was running and was being used from a Synology NAS,</p>
<p>but after updating Ubuntu 18, I tried to update the domain information and encountered an error saying "No trusted domain controller found."</p>
<p></p>
<p>As a test, I tried to connect from another AD client (Mac), and an error like "Error: Connection failed to the directory server. (2100)" appeared.</p>
<p>When I checked the logs in /var/log/samba/, I found NT_STATUS_ADDRESS_ALREADY_ASSOCIATED (I forgot the file name).</p>
<p></p>
<p>As a test, on the AD server, I checked the status of slapd with /var/log/samba# sudo service slapd status</p>
<p>● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)<br /> Loaded: loaded (/etc/init.d/slapd; generated)<br /> Active: active (running) since Tue 2018-12-04 18:56:39 JST; 2h 19min ago<br /> Docs: man:systemd-sysv-generator(8)</p>
<p></p>
<p>Since it was running actively,</p>
<p></p>
<p>sudo service slapd stop</p>
<p>sudo service samba-ad-dc stop</p>
<p>sudo service samba-ad-dc status</p>
<p>After stopping the samba-ad-dc and slapd services, samba-ad-dc worked properly.</p>
<p>(Using sudo systemctl stop ... might be recommended)</p>
<p></p>
<p>To stop the service</p>
<p>sudo systemctl disable slapd.service</p>
<p></p>
<p>Restart and verify.</p>
