Can't contact LDAP server

Hello,

Après avoir redémarré mon serveur afin de le reconnecter à son VPN, qui venait alors de récupérer d’une panne, je suis maintenant confronté à une panne de serveur que je n’avais encore jamais vue.

Plus aucun de mes services ne fonctionne. Je lance donc la commande suivante:

`root@stemy:~# sudo systemctl status mysql`
  sudo: ldap_sasl_bind_s(): Can't contact LDAP server
    ● mysql.service - LSB: Start and stop the mysql database server daemon
       Loaded: loaded (/etc/init.d/mysql)
       Active: failed (Result: exit-code) since Fri 2018-06-08 11:39:59 CEST; 5min ago
      Process: 884 ExecStart=/etc/init.d/mysql start (code=exited, status=1/FAILURE)

    Jun 08 11:39:24 stemy.me systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
    Jun 08 11:39:28 stemy.me /etc/init.d/mysql[956]: [124B blob data]
    Jun 08 11:39:59 stemy.me systemd[1]: mysql.service: control process exited, code=exited status=1
    Jun 08 11:39:59 stemy.me systemd[1]: Failed to start LSB: Start and stop the mysql database server daemon.
    Jun 08 11:39:59 stemy.me systemd[1]: Unit mysql.service entered failed state.
    Jun 08 11:39:59 stemy.me mysql[884]: Starting MariaDB database server: mysqld . . . . . . . . . . . . . . . ....ailed!
    Hint: Some lines were ellipsized, use -l to show in full.

Je tente donc de redémarrer le service, et là, surprise, il ne veut pas.

root@stemy:~# sudo systemctl restart mysql
sudo: ldap_sasl_bind_s(): Can't contact LDAP server
Job for mysql.service failed. See 'systemctl status mysql.service' and 'journalctl -xn' for details.

Bon, j’en profite pour faire une vérification d’une modification effectuée peu de temps auparavant dans un fichier texte.

root@stemy:~# nano /etc/fstab

Mais là encore, mauvaise surprise:

Error writing /root/.nano_history: Read-only file system

Je n’aime pas ça du tout. J’ai déjà eu un problème de carte mémoire qui se met en lecture seule, ça a été irréversible, j’ai du la remplacer par une nouvelle carte sur laquelle j’ai refait une installation depuis zéro. J’espère vraiment que ce n’est pas ce qui est en train de se reproduire.

Les redémarrages successifs n’ont rien changé et je me retrouve le bec dans l’eau. Quelqu’un peut m’aider ?

Merci d’avance.

à toute fin utile, voici ce que me donne le terminal série au moment du démarrage.

U-Boot SPL 2014.10+dfsg1-5 (Apr 07 2015 - 21:54:22)
DRAM: 512 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2


U-Boot 2014.10+dfsg1-5 (Apr 07 2015 - 21:54:22) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
I2C:   ready
DRAM:  512 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
SCSI:  SUNXI SCSI INIT
Target spinup took 0 ms.
AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part ccc apst 
Net:   dwmac.1c50000
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0...
Found U-Boot script /boot/boot.scr
2343 bytes read in 131 ms (16.6 KiB/s)
## Executing script at 43100000
Mainline u-boot / new-style environment detected.
3191848 bytes read in 369 ms (8.2 MiB/s)
22270 bytes read in 258 ms (84 KiB/s)
13842997 bytes read in 939 ms (14.1 MiB/s)
Booting Debian 3.16.0-6-armmp from mmc 0:1...
Kernel image @ 0x42000000 [ 0x000000 - 0x30b428 ]
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
   Loading Ramdisk to 4f2cc000, end 4ffffa35 ... OK
   Loading Device Tree to 4f2c3000, end 4f2cb6fd ... OK

Starting kernel ...

[    0.000000] Linux version 3.16.0-6-armmp (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.56-1+deb8u1 (2018-05-08)
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 console=ttyS1 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p60 root=/dev/mmcblk0p1 rootwait sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=0 panic=10 loglevel=6 consoleblank=0
[    0.000000] Memory: 495492K/524288K available (6442K kernel code, 831K rwdata, 2204K rodata, 688K init, 393K bss, 28796K reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0879bec   (8647 kB)
[    0.000000]       .init : 0xc087a000 - 0xc09262c0   ( 689 kB)
[    0.000000]       .data : 0xc0928000 - 0xc09f7cd8   ( 832 kB)
[    0.000000]        .bss : 0xc09f7cd8 - 0xc0a5a274   ( 394 kB)
[    0.039033] /cpus/cpu@0 missing clock-frequency property
[    0.039066] /cpus/cpu@1 missing clock-frequency property
[    0.048972] CPU1: Booted secondary processor
[    0.098174] edma-dma-engine edma-dma-engine.0: Can't allocate PaRAM dummy slot
[    0.098208] edma-dma-engine: probe of edma-dma-engine.0 failed with error -5
[    1.211599] audit: type=2000 audit(1.196:1): initialized
[    1.213888] VFS: Disk quotas dquot_6.5.2
[    1.213973] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.421816] Registering SWP/SWPB emulation handler
Loading, please wait...
[    1.513946] random: systemd-udevd: uninitialized urandom read (16 bytes read, 0 bits of entropy available)
[    1.591951] SCSI subsystem initialized
[    1.704043] mmc0: host does not support reading read-only switch. assuming write-enable.
[    1.864345] ahci-sunxi 1c18000.sata: forcing PORTS_IMPL to 0x1
[    2.100757] sunxi-mmc 1c0f000.mmc: smc 0 err, cmd 18, RD DTO !!
[    2.106733] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.113104] mmcblk0: timed out sending r/w cmd command, card status 0x900
[    2.119919] end_request: I/O error, dev mmcblk0, sector 31422208
[    2.125939] Buffer I/O error on device mmcblk0, logical block 3927776
[    3.876616] ata1.00: supports DRM functions and may not be fully accessible
[    3.884371] ata1.00: supports DRM functions and may not be fully accessible
[    3.892329] scsi 0:0:0:0: Direct-Access     ATA      Samsung SSD 850  2B6Q PQ: 0 ANSI: 5
[    3.914504] sd 0:0:0:0: [sda] 488397168 512-byte logical blocks: (250 GB/232 GiB)
[    3.922721] sd 0:0:0:0: [sda] Write Protect is off
[    3.927770] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.940508] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.947783] sd 0:0:0:0: Attached scsi generic sg0 type 0
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.25.2
[/sbin/fsck.ext4 (1) -- /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1 
/dev/mmcblk0p1: clean, 184914/915840 files, 1387376/3927552 blocks
done.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[    4.780381] random: systemd: uninitialized urandom read (16 bytes read, 81 bits of entropy available)

Welcome to Debian GNU/Linux 8 (jessie)!

[    5.126807] random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 98 bits of entropy available)
[    5.373762] random: systemd: uninitialized urandom read (16 bytes read, 110 bits of entropy available)
[    5.384307] random: systemd: uninitialized urandom read (16 bytes read, 110 bits of entropy available)
[    5.394782] random: systemd: uninitialized urandom read (16 bytes read, 110 bits of entropy available)
[    5.421659] random: systemd: uninitialized urandom read (16 bytes read, 113 bits of entropy available)
[    5.431595] random: systemd: uninitialized urandom read (16 bytes read, 113 bits of entropy available)
[    5.441091] random: systemd: uninitialized urandom read (16 bytes read, 113 bits of entropy available)
[    5.481229] random: systemd: uninitialized urandom read (16 bytes read, 116 bits of entropy available)
[    5.724076] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory.
         Expecting device dev-ttyS0.device...
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Paths.
[  OK  ] Set up automount Arbitrary Executable File Formats F...utomount Point.
[  OK  ] Reached target Encrypted Volumes.
[  OK  ] Created slice Root Slice.
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Created slice User and Session Slice.
[  OK  ] Listening on udev Control Socket.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on Journal Socket.
[  OK  ] Created slice System Slice.
         Starting Increase datagram queue length...
         Starting Nameserver information manager...
[    5.879612] random: nonblocking pool is initialized
         Mounting POSIX Message Queue File System...
         Starting Load Kernel Modules...
         Starting Create list of required static device nodes...rrent kernel...
         Starting udev Coldplug all Devices...
         Mounting Debug File System...
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-postgresql.slice.
[  OK  ] Reached target Slices.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Started Increase datagram queue length.
[  OK  ] Started Load Kernel Modules.
[  OK  ] Started Create list of required static device nodes ...current kernel.
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Nameserver information manager.
[  OK  ] Started udev Coldplug all Devices.
         Activating swap /mnt/evo/swapfile...
         Starting Load/Save Random Seed...
         Starting Create Static Device Nodes in /dev...
         Mounting FUSE Control File System...
         Starting Apply Kernel Variables...
[  OK  ] Listening on Syslog Socket.
         Starting Journal Service...
[  OK  ] Started Journal Service.
[  OK  ] Mounted FUSE Control File System.
[FAILED] Failed to activate swap /mnt/evo/swapfile.
See 'systemctl status mnt-evo-swapfile.swap' for details.
[DEPEND] Dependency failed for Swap.
[FAILED] Failed to start Load/Save Random Seed.
See 'systemctl status systemd-random-seed.service' for details.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Apply Kernel Variables.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Reached target Remote File Systems.
         Starting Trigger Flushing of Journal to Persistent Storage...
         Starting LSB: Raise network interfaces....
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
         Starting Update UTMP about System Boot/Shutdown...
         Starting Copy rules generated while the root was ro...
         Starting LSB: Tune IDE hard disks...
[  OK  ] Started Copy rules generated while the root was ro.
[  OK  ] Found device /dev/ttyS0.
[FAILED] Failed to start Update UTMP about System Boot/Shutdown.
See 'systemctl status systemd-update-utmp.service' for details.
[DEPEND] Dependency failed for Update UTMP about System Runlevel Changes.
[  OK  ] Started LSB: Tune IDE hard disks.
[  OK  ] Created slice system-ifup.slice.
[  OK  ] Created slice system-systemd\x2drfkill.slice.
         Starting Load/Save RF Kill Switch Status of rfkill0...
[  OK  ] Started Load/Save RF Kill Switch Status of rfkill0.
[  OK  ] Started LSB: Raise network interfaces..
         Starting ifup for eth0...
[  OK  ] Started ifup for eth0.
[  OK  ] Reached target Network.
[  OK  ] Reached target Network is Online.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on Dovecot IMAP/POP3 email server activation socket.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
         Starting Entropy daemon using the HAVEGE algorithm...
[  OK  ] Started Entropy daemon using the HAVEGE algorithm.
         Starting OpenBSD Secure Shell server...
         Starting Synapse Matrix homeserver...
         Starting Initialize hardware monitoring sensors...
         Starting coturn...
         Starting A high performance web server and a reverse proxy server...
         Starting YunoHost VPN Client....
         Starting YunoHost Firewall...
         Starting Avahi mDNS/DNS-SD Stack...
         Starting The PHP FastCGI Process Manager...
         Starting System Logging Service...
         Starting Another sendmail milter for different mail checks...
[  OK  ] Started Another sendmail milter for different mail checks.
         Starting Advanced key-value store...
         Starting YunoHost API Server...
[  OK  ] Started YunoHost API Server.
         Starting Etherpad-lite, the collaborative editor....
[  OK  ] Started Etherpad-lite, the collaborative editor..
         Starting /etc/rc.local Compatibility...
         Starting Login Service...
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
         Starting Permit User Sessions...
         Starting LSB: daemon to balance interrupts for SMP systems...
         Starting LSB: Starts and daemonize Glances server...
         Starting LSB: Starts the Name Service Cache Daemon...
         Starting LSB: coturn TURN Server...
         Starting LSB: disk temperature monitoring daemon...
         Starting (null)...
         Starting LSB: OpenLDAP standalone server (Lightweigh...ss Protocol)...
         Starting LSB: Start NTP daemon...
         Starting LSB: Metronome XMPP Server...
         Starting LSB: Start/stop uWSGI server instance(s)...
         Starting dnsmasq - A lightweight DHCP and caching DNS server...
         Starting PostgreSQL Cluster 9.4-main...
         Starting LSB: Start/stop fail2ban...
[  OK  ] Started System Logging Service.
[  OK  ] Started OpenBSD Secure Shell server.
[FAILED] Failed to start Advanced key-value store.
See 'systemctl status redis-server.service' for details.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started LSB: daemon to balance interrupts for SMP systems.
[  OK  ] Started LSB: Starts the Name Service Cache Daemon.
[  OK  ] Started LSB: coturn TURN Server.
[  OK  ] Started LSB: disk temperature monitoring daemon.
[  OK  ] Started (null).
[  OK  ] Started Initialize hardware monitoring sensors.
[  OK  ] Started coturn.
[  OK  ] Started LSB: Starts and daemonize Glances server.
[  OK  ] Started LSB: Start NTP daemon.
[FAILED] Failed to start LSB: OpenLDAP standalone server (Lig...cess Protocol).
See 'systemctl status slapd.service' for details.
[FAILED] Failed to start A high performance web server and a ...e proxy server.
See 'systemctl status nginx.service' for details.
[  OK  ] Started Login Service.
         Stopping LSB: Start NTP daemon...
         Stopping Etherpad-lite, the collaborative editor....
[  OK  ] Stopped Etherpad-lite, the collaborative editor..
         Starting Etherpad-lite, the collaborative editor....
[  OK  ] Started Etherpad-lite, the collaborative editor..
         Stopping Advanced key-value store...
[  OK  ] Stopped Advanced key-value store.
         Starting Advanced key-value store...
[  OK  ] Stopped LSB: Start NTP daemon.
[FAILED] Failed to start The PHP FastCGI Process Manager.
See 'systemctl status php5-fpm.service' for details.
[FAILED] Failed to start Advanced key-value store.
See 'systemctl status redis-server.service' for details.
         Stopping Advanced key-value store...
[  OK  ] Stopped Advanced key-value store.
         Starting Advanced key-value store...
         Stopping Etherpad-lite, the collaborative editor....
[  OK  ] Stopped Etherpad-lite, the collaborative editor..
         Starting Etherpad-lite, the collaborative editor....
[  OK  ] Started Etherpad-lite, the collaborative editor..
[  OK  ] Started dnsmasq - A lightweight DHCP and caching DNS server.
[  OK  ] Reached target Host and Network Name Lookups.
         Starting rapid spam filtering system...
[  OK  ] Started rapid spam filtering system.
         Starting LSB: Start and stop the mysql database server daemon...
         Starting LSB: LDAP connection daemon...
[FAILED] Failed to start Advanced key-value store.
See 'systemctl status redis-server.service' for details.
         Stopping Etherpad-lite, the collaborative editor....
[  OK  ] Stopped Etherpad-lite, the collaborative editor..
         Starting Etherpad-lite, the collaborative editor....
[  OK  ] Started Etherpad-lite, the collaborative editor..
         Stopping Advanced key-value store...
[  OK  ] Stopped Advanced key-value store.
         Starting Advanced key-value store...
[  OK  ] Started LSB: Metronome XMPP Server.
[FAILED] Failed to start Advanced key-value store.
See 'systemctl status redis-server.service' for details.
[FAILED] Failed to start /etc/rc.local Compatibility.
See 'systemctl status rc-local.service' for details.
[FAILED] Failed to start YunoHost Firewall.
See 'systemctl status yunohost-firewall.service' for details.
[  OK  ] Started LSB: LDAP connection daemon.
         Stopping Advanced key-value store...
[  OK  ] Stopped Advanced key-value store.
         Starting Advanced key-value store...
         Starting Dovecot IMAP/POP3 email server...
[  OK  ] Started Dovecot IMAP/POP3 email server.
         Starting Regular background program processing daemon...
[  OK  ] Started Regular background program processing daemon.
         Starting Serial Getty on ttyS0...
[  OK  ] Started Serial Getty on ttyS0.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
         Stopping Etherpad-lite, the collaborative editor....
[  OK  ] Stopped Etherpad-lite, the collaborative editor..
         Starting Etherpad-lite, the collaborative editor....
[  OK  ] Started Etherpad-lite, the collaborative editor..
[FAILED] Failed to start Advanced key-value store.
See 'systemctl status redis-server.service' for details.
         Stopping Etherpad-lite, the collaborative editor....
[  OK  ] Stopped Etherpad-lite, the collaborative editor..
         Starting Etherpad-lite, the collaborative editor....
[FAILED] Failed to start Etherpad-lite, the collaborative editor..
See 'systemctl status etherpad_mypads.service' for details.
         Stopping Advanced key-value store...
[  OK  ] Stopped Advanced key-value store.
         Starting Advanced key-value store...
[FAILED] Failed to start Advanced key-value store.
See 'systemctl status redis-server.service' for details.
[FAILED] Failed to start LSB: Start/stop uWSGI server instance(s).
See 'systemctl status uwsgi.service' for details.
         Stopping YunoHost API Server...
[  OK  ] Stopped YunoHost API Server.
         Starting YunoHost API Server...
[  OK  ] Started YunoHost API Server.

Debian GNU/Linux 8 stemy.me ttyS0

stemy login:

Hmmm en effet ça sent le sapin pour ta carte microSD.

[    2.100757] sunxi-mmc 1c0f000.mmc: smc 0 err, cmd 18, RD DTO !!
[    2.106733] sunxi-mmc 1c0f000.mmc: data error, sending stop command
[    2.113104] mmcblk0: timed out sending r/w cmd command, card status 0x900
[    2.119919] end_request: I/O error, dev mmcblk0, sector 31422208
[    2.125939] Buffer I/O error on device mmcblk0, logical block 3927776

Teste-la avec la commande badblocks sur un PC linux :

sudo badblocks -s -v -n /dev/mmcblk0

Si elle est morte mais que t’as une autre carte microSD en bon état et de taille équivalente sous la main tu peux y transférer son contenu avec la commande dd.

Voillà, le test est terminé. Aucun bloc défectueux.

J’ai trouvé l’origine du problème: j’avais accidentellement effacé le fstab, du coup, forcément, y’a plus rien qui marchait. Je l’ai donc remis dans son état initial et maintenant, tout est rentré dans l’ordre.

Je crois bien que c’était un peu de ma faute, désolé :confused: