Project

General

Profile

Tâche #16830

Distribution EOLE - Scénario #16996: Le service samba devrait toujours être démarré (HORUS-T01-001)

Le service samba ne démarre pas après instance (HORUS-T01-001)

Added by Daniel Dehennin about 7 years ago. Updated about 7 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
07/27/2016
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

Description

Voici le résultat de la commande diagnose:

*** Test du module horus version 2.6.0 (horus 00000001) ***

Attention, serveur opérationnel mais des services n'ont pas démarrés

[...]

.           Partage (SMB/TCP) => Erreur

Related issues

Related to Distribution EOLE - Tâche #22981: Deux unit systemd pour démarrer smbd. Il y en a une de trop ! Fermé 01/29/2018

Associated revisions

Revision 482e36a1 (diff)
Added by Daniel Dehennin about 7 years ago

Toujours redémarrer smbd

Si le service slapd ne démarre pas assez vite, smbd plante.

  • common/init/smbd.service: Définition d’un service systemd avec
    « Restart=always ».

Ref: #16830

Revision 8b048184 (diff)
Added by Daniel Dehennin about 7 years ago

Installation du service systemd de smbd

Ref: #16830

Revision 0f35793f (diff)
Added by Daniel Dehennin about 7 years ago

Correction du copier/coller

Ref: #16830

Revision 62c44bcb (diff)
Added by Daniel Dehennin about 7 years ago

Correction de l’installation du service systemd

  • debian/rules (override_dh_installinit): Fournir le nom du service
    systemd pour l’installer sur le système de fichier.

Ref: #16830

Revision 31700f57 (diff)
Added by Daniel Dehennin about 7 years ago

Correction de la gestion systemd

  • debian/control (Build-Depends): Ajout de dh-systemd
  • debian/rules: Ajout de systemd à la liste des debhelpers utilisés.
    Ne pas générer la gestion de scripts system V.

Ref: #16830

Revision 320ec932 (diff)
Added by Daniel Dehennin about 7 years ago

Le service smbd est à installer dans le -pkg

Ref: #16830

History

#1 Updated by Daniel Dehennin about 7 years ago

Après un reconfigure le service est OK.

#2 Updated by Daniel Dehennin about 7 years ago

  • Project changed from Distribution EOLE to Horus

#3 Updated by Daniel Dehennin about 7 years ago

  • Subject changed from HORUS-T01-001: Le service samba ne démarre pas après instance to Le service samba ne démarre pas après instance (HORUS-T01-001)
  • Description updated (diff)

#4 Updated by Emmanuel GARETTE about 7 years ago

  • Status changed from Nouveau to En cours
  • Assigned To set to Emmanuel GARETTE

#5 Updated by Emmanuel GARETTE about 7 years ago

Pour avoir plus d'information :

cat << EOF >> /lib/systemd/system/smbd.service
[Unit]
Description=Samba SMB/CIFS daemon (smbd)
Before=multi-user.target
Before=shutdown.target
After=network-online.target
After=slapd.service
After=cups.service
Wants=network-online.target
Conflicts=shutdown.target

[Service]
TimeoutSec=5min
ExecStart=/usr/sbin/smbd -F -d 256 --debuglevel=256 -S --option=loglevel=256

[Install]
WantedBy=multi-user.target

EOF

rm /etc/init.d/smbd
systemctl daemon-reload
systemctl disable smbd.service
systemctl enable smbd.service

/root/mount.eole-ci-tests
cp /mnt/eole-ci-tests/configuration/aca.horus/default-2.6.0/etc/eole/config.eol /etc/eole/
ps auxf|grep smbd
yes non | instance

Le problème vient d'un problème d'accès à LDAP :

Found pdb backend ldapsam
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=DOMACA))]
smbldap_search_ext: base => [o=gouv,c=fr], filter => [(&(objectClass=sambaDomain)(sambaDomainName=DOMACA))], scope => [2]
The connection to the LDAP server was closed
smb_ldap_setup_connection: ldap://127.0.0.1:389
smbldap_open_connection: connection opened
ldap_connect_system: Binding to ldap server ldap://127.0.0.1:389 as "cn=admin,o=gouv,c=fr" 
failed to bind to server ldap://127.0.0.1:389 with dn="cn=admin,o=gouv,c=fr" Error: Can't contact LDAP server
#011(unknown)
Connection to LDAP server failed for the 1 try!
The connection to the LDAP server was closed
smbldap_search_domain_info: Problem during LDAPsearch: Timed out
smbldap_search_domain_info: Query was: o=gouv,c=fr, (&(objectClass=sambaDomain)(sambaDomainName=DOMACA))
pdb_init_ldapsam: WARNING: Could not get domain info, nor add one to the domain. We cannot work reliably without it.
pdb backend ldapsam:ldap://127.0.0.1:389 did not correctly init (error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO)

Bizarrement lorsque j'essai en dehors d'instance, il essai plusieurs :

Found pdb backend ldapsam
smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=DOMACA))]
smbldap_search_ext: base => [o=gouv,c=fr], filter => [(&(objectClass=sambaDomain)(sambaDomainName=DOMACA))], scope => [2]
The connection to the LDAP server was closed
smb_ldap_setup_connection: ldap://127.0.0.1:389
smbldap_open_connection: connection opened
ldap_connect_system: Binding to ldap server ldap://127.0.0.1:389 as "cn=admin,o=gouv,c=fr" 
failed to bind to server ldap://127.0.0.1:389 with dn="cn=admin,o=gouv,c=fr" Error: Can't contact LDAP server
#011(unknown)
Connection to LDAP server failed for the 1 try!
smb_ldap_setup_connection: ldap://127.0.0.1:389
smbldap_open_connection: connection opened
ldap_connect_system: Binding to ldap server ldap://127.0.0.1:389 as "cn=admin,o=gouv,c=fr" 
failed to bind to server ldap://127.0.0.1:389 with dn="cn=admin,o=gouv,c=fr" Error: Can't contact LDAP server
#011(unknown)
Connection to LDAP server failed for the 2 try!
smb_ldap_setup_connection: ldap://127.0.0.1:389
smbldap_open_connection: connection opened
ldap_connect_system: Binding to ldap server ldap://127.0.0.1:389 as "cn=admin,o=gouv,c=fr" 
failed to bind to server ldap://127.0.0.1:389 with dn="cn=admin,o=gouv,c=fr" Error: Can't contact LDAP server
#011(unknown)
Connection to LDAP server failed for the 3 try!
smb_ldap_setup_connection: ldap://127.0.0.1:389
smbldap_open_connection: connection opened
ldap_connect_system: Binding to ldap server ldap://127.0.0.1:389 as "cn=admin,o=gouv,c=fr" 
failed to bind to server ldap://127.0.0.1:389 with dn="cn=admin,o=gouv,c=fr" Error: Can't contact LDAP server
#011(unknown)

#6 Updated by Emmanuel GARETTE about 7 years ago

  • % Done changed from 0 to 50
  • Remaining (hours) changed from 3.0 to 1.0

Le problème c'est que ldap est bien démarré, mais ne répond pas assez rapidement :

2016-08-23T11:58:52.518687+02:00 horus.ac-test.lan smbd[7032]: smbldap_search_domain_info: Problem during LDAPsearch: Timed out

Je vois 2 solutions (a priori fonctionnel), augmenter les timeout ldap connection timeout et ldap timeout dans le fichier /usr/share/eole/creole/distrib/smb-include_global.conf.

Ou alors utiliser le script d'init suivant à la place de celui proposé par Ubuntu :

# /lib/systemd/system/smbd.service
[Unit]
Description=Samba SMB/CIFS daemon (smbd)
Before=multi-user.target
Before=shutdown.target
After=network-online.target
After=slapd.service
After=cups.service
Wants=network-online.target
Conflicts=shutdown.target

[Service]
TimeoutSec=5min
ExecStart=/usr/sbin/smbd -F
Restart=always

[Install]
WantedBy=multi-user.target

L'intérêt de cette modification c'est que le service redémarre "toujours" s'il y a une défaillance du service.

#7 Updated by Joël Cuissinat about 7 years ago

  • Parent task changed from #16807 to #16996

#8 Updated by Emmanuel GARETTE about 7 years ago

  • Assigned To deleted (Emmanuel GARETTE)

#9 Updated by Daniel Dehennin about 7 years ago

  • Assigned To set to Daniel Dehennin

#10 Updated by Daniel Dehennin about 7 years ago

  • % Done changed from 50 to 100
  • Remaining (hours) changed from 1.0 to 0.25

#11 Updated by Daniel Dehennin about 7 years ago

  • Status changed from En cours to Résolu

#12 Updated by Emmanuel GARETTE about 7 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.25 to 0.0

Le test HORUS-T01-001 est passé avec succès.

#13 Updated by Laurent Flori over 5 years ago

  • Related to Tâche #22981: Deux unit systemd pour démarrer smbd. Il y en a une de trop ! added

Also available in: Atom PDF