<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Antisèches techniques</title>
    <description>Développement, administratation technique, mes antisèches sur le logiciel libre, GNU/Linux, PHP, Apache, l&apos;Open source, Debian, ...</description>
    <link>https://sergio.24eme.fr//</link>
    <atom:link href="https://sergio.24eme.fr//feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Wed, 19 Mar 2025 11:45:28 +0000</pubDate>
    <lastBuildDate>Wed, 19 Mar 2025 11:45:28 +0000</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Tester une configuration SSL de OpenLDAP - Debian</title>
        <description>&lt;p&gt;Pour tester si le SSL est activer et consulter le certificat :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; openssl s_client -connect 127.0.0.1:636 -showcerts -state
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Si il y a un certificat, voici la commande &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ldapsearch&lt;/code&gt; qui permet de tester la connexion :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; ldapsearch -v -H ldaps://127.0.0.1:636
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;La commande devrait répondre : &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SASL/DIGEST-MD5 authentication started&lt;/code&gt; avant de demander un mot de passe.&lt;/p&gt;

&lt;p&gt;En cas de mauvaise configuration, les messages suivants pourraient être renvoyés :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ldap_sasl_interactive_bind_s: Can&apos;t contact LDAP server&lt;/code&gt; : ldaps:/// n’est pas activé&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;additional info: The TLS connection was non-properly terminated&lt;/code&gt; : les certificats ne sont pas créés/activés&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enfin, le test pour un login particulier peut se faire avec la commande suivante :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ldapsearch  -x -D uid=admin,ou=People,dc=domain,dc=com -w &amp;lt;MOT_DE_PASSE_ADMIN&amp;gt; -H ldaps://127.0.0.1 -b  dc=domain,dc=com -x  uid=login
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;En adaptant :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;l’identifiant du compte admin (ici &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uid=admin,ou=People,dc=domain,dc=com&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;le mot de passe de ce compte (ici &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;MOT_DE_PASSE_ADMIN&amp;gt;&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;l’annuaire ldap interrogé (ici &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dc=domain,dc=com&lt;/code&gt;)&lt;/li&gt;
  &lt;li&gt;le login recherché (ici &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;uid=login&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;activer-ldaps&quot;&gt;Activer ldaps&lt;/h2&gt;

&lt;p&gt;Pour activer le SSL, veiller à ce que &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ldaps:///&lt;/code&gt; est activé via l’option &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SLAPD_SERVICES&lt;/code&gt; de &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/default/slapd&lt;/code&gt; :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; $ grep SLAPD_SERVICES /etc/default/slapd
 SLAPD_SERVICES=&quot;ldap:/// ldaps:/// ldapi:///&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;configurer-les-certificats&quot;&gt;Configurer les certificats&lt;/h2&gt;

&lt;p&gt;Vérifier que openldap est configuré avec un certificat :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=config -s base | grep olcTLS
olcTLSCACertificateFile: /etc/ssl/openldap/certs/cacert.pem
olcTLSCertificateFile: /etc/ssl/openldap/certs/ldapserver-cert.crt
olcTLSCertificateKeyFile: /etc/ssl/openldap/private/ldapserver-key.key
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Si ce n’est pas le cas, la commande ldapmodify permettra de le faire via un fichier ldif.&lt;/p&gt;

&lt;p&gt;Voici le contenu du ldif (appelé &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ssl.ldif&lt;/code&gt; dans la suite) :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dn: cn=config
changetype: modify
add: olcTLSCACertificateFile
olcTLSCACertificateFile: /etc/ssl/openldap/certs/cacert.pem
-
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/ssl/openldap/certs/ldapserver-cert.crt
-
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/ssl/openldap/private/ldapserver-key.key
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Il faut adapter les chemins des certificats/clés en fonction de ceux créés.&lt;/p&gt;

&lt;p&gt;Une fois le fichier créé, voici comment l’intégrer dans la configuration :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo ldapmodify -Y EXTERNAL -H ldapi:/// -f ssl.ldif
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Tue, 18 Mar 2025 12:15:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2025/03/18/openldap-test-ssl/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2025/03/18/openldap-test-ssl/</guid>
        
        
      </item>
    
      <item>
        <title>Augmenter la taille d&apos;une partition lvm</title>
        <description>&lt;p&gt;Trouver la partition à augmenter :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;df -h

/dev/mapper/lv-vg-tmp    4,6G    177M  4,1G   5% /tmp
/dev/mapper/lv-vg-tmp-home   121G     96G   20G  83% /home
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Augmenter la taille de la partition :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;lvresize --resizefs --size +5G /dev/mapper/lv-vg-tmp-home
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Source : https://doc.ubuntu-fr.org/lvm#volume_logique2&lt;/p&gt;
</description>
        <pubDate>Wed, 22 May 2024 15:45:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2024/05/22/lvresize/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2024/05/22/lvresize/</guid>
        
        
      </item>
    
      <item>
        <title>Conserver la compatibilité des url Big Blue Button</title>
        <description>&lt;p&gt;En changeant de version de Greenlight de la version 2 à la version 3 (big blue button 2.4 à 2.6), les url des chambres ont changées.&lt;/p&gt;

&lt;p&gt;Les chambres avaient des url de type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bbb.example.org/b/id-de-ma-chambre&lt;/code&gt;, elles sont maintenant accessibles depuis &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bbb.example.org/rooms/id-de-ma-chambre&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Pour conserver la compatibilité après la migration, il faut ajouter une redirection nginx en créant un fichier &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/bigbluebutton/nginx/oldurl.nginx&lt;/code&gt; avec le contenu :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rewrite ^/b/(.*)$ /rooms/$1 permanent;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Mon, 05 Jun 2023 15:00:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2023/06/05/url-big-blue-butoon/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2023/06/05/url-big-blue-butoon/</guid>
        
        
      </item>
    
      <item>
        <title>IcedTea Error: Cannot grant permissions to unsigned jars</title>
        <description>&lt;p&gt;Chez Online, l’accès KVM nécessite parfois l’execution d’un code java via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;icedtea-web&lt;/code&gt;. Pour certains vieux serveurs, un erreur &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Cannot grant permissions to unsigned jars&lt;/code&gt; doit être résolue.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ javaws viewer.jnlp
netx: Initialization Error: Could not initialize application. (Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.)
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line.
	at java.desktop/net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:823)
	at java.desktop/net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:531)
	at java.desktop/net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:946)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.
	at java.desktop/net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.getClassLoaderSecurity(JNLPClassLoader.java:2488)
	at java.desktop/net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:384)
	at java.desktop/net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:807)
	at java.desktop/net.sourceforge.jnlp.runtime.JNLPClassLoader.&amp;lt;init&amp;gt;(JNLPClassLoader.java:337)
	at java.desktop/net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:420)
	at java.desktop/net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:494)
	at java.desktop/net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:467)
	at java.desktop/net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:815)
	... 2 more
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Pour se faire, vous pouvez identifier les &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jar&lt;/code&gt; qui posent problème via la &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;java console&lt;/code&gt; :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;...
netx: Initialization Error: Could not initialize application. (Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.)
App already has trusted publisher: false
Jar found at /home/user/.cache/icedtea-web/cache/3/https/192.168.1.1/443/software/avctVMLinux64.jarhas been verified as UNSIGNED
Jar found at /home/user/.cache/icedtea-web/cache/2/https/192.168.1.1/443/software/avctKVMIOLinux64.jarhas been verified as UNSIGNED
Jar found at /home/user/.cache/icedtea-web/cache/1/https/192.168.1.1/443/software/avctKVM.jarhas been verified as UNSIGNED
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On peut reproduire l’erreur via l’outil &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jarsigner&lt;/code&gt; :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jarsigner -verify -certs -verbose /home/user/.cache/icedtea-web/cache/3/https/192.168.1.1/443/software/avctVMLinux64.jar

        196 Fri Jul 25 17:49:26 CEST 2014 META-INF/MANIFEST.MF
        259 Mon Jul 24 09:53:16 CEST 2017 META-INF/DELL.SF
        6669 Mon Jul 24 09:53:16 CEST 2017 META-INF/DELL.RSA
         259 Fri Jul 25 17:49:26 CEST 2014 META-INF/AVOCENT.SF
        1058 Fri Jul 25 17:49:26 CEST 2014 META-INF/AVOCENT.DSA
           0 Tue Nov 05 14:49:36 CET 2013 META-INF/
 m  ? 371353 Tue May 17 15:52:22 CEST 2011 libavmlinux.so

  s = signature was verified 
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  ? = unsigned entry

- Signed by &quot;CN=Avocent, OU=iBMC, O=Avocent Corporation, L=Sunrise, ST=Florida, C=US&quot;
    Digest algorithm: SHA1 (disabled)
    Signature algorithm: SHA1withDSA (disabled), 1024-bit key (weak)
- Signed by &quot;CN=Dell Inc., O=Dell Inc., L=Round Rock, ST=Texas, C=US&quot;
    Digest algorithm: SHA1 (weak)
    Signature algorithm: MD5withRSA (disabled), 2048-bit key
  Timestamped by &quot;CN=Certum EV TSA SHA2, OU=Certum Certification Authority, O=Unizeto Technologies S.A., C=PL&quot; on lun. juil. 24 09:53:17 UTC 2017
    Timestamp digest algorithm: SHA-1 (weak)
    Timestamp signature algorithm: SHA256withRSA, 2048-bit key

WARNING: The jar will be treated as unsigned, because it is signed with a weak algorithm that is now disabled by the security property:

  jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize &amp;lt; 1024, DSA keySize &amp;lt; 1024, SHA1 denyAfter 2019-01-01
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Il faut donc intervenir sur l’option &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jdk.jar.disabledAlgorithms&lt;/code&gt; de &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;java&lt;/code&gt; pour réactiver les éléments désactivés par défaut. Ici &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SHA1&lt;/code&gt; (et par incidence &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;SHA1withDSA&lt;/code&gt; et &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MD5withRSA&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Pour le faire, il faut éditer le fichier &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;java.security&lt;/code&gt; de la version de votre java.&lt;/p&gt;

&lt;p&gt;La version de mon java étant 17.0.5 :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ java -version
openjdk version &quot;17.0.5&quot; 2022-10-18
OpenJDK Runtime Environment (build 17.0.5+8-Debian-2)
OpenJDK 64-Bit Server VM (build 17.0.5+8-Debian-2, mixed mode, sharing)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;il faut modifier la configuration qui se trouve dans &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/usr/lib/jvm/java-1.17.0-openjdk-amd64/conf/security/java.security&lt;/code&gt; :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize &amp;lt; 1024, DSA keySize &amp;lt; 1024, SHA1 denyAfter 2019-01-01
jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize &amp;lt; 1024, DSA keySize &amp;lt; 1024
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;jarsigner&lt;/code&gt; indique maintenant que le jar est vérifié :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ jarsigner -verify -certs -verbose /home/user/.cache/icedtea-web/cache/3/https/192.168.1.1/443/software/avctVMLinux64.jar
...

jar verified.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;et icedtea-web ne pose plus de problème :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ javaws viewer.jnlp
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Mon, 02 Jan 2023 15:00:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2023/01/02/java-icetea-unsigned/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2023/01/02/java-icetea-unsigned/</guid>
        
        
      </item>
    
      <item>
        <title>Diviser la partition root en raid en plusieurs partitions</title>
        <description>&lt;p&gt;Pour réaliser cette procédure, on a besoin de modifier la partition root. Il faut donc booter en mode rescue (ou via un live cd).&lt;/p&gt;

&lt;h2 id=&quot;identifier-le-raid-de-la-partition-root&quot;&gt;Identifier le raid de la partition root&lt;/h2&gt;

&lt;p&gt;Liste les périphérique raid :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ cat /proc/mdstat Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] 
md126 : active (auto-read-only) raid1 sda3[1] sdb3[0]
      975055872 blocks super 1.2 [2/2] [UU]
      	resync=PENDING
      bitmap: 7/8 pages [28KB], 65536KB chunk

md127 : active (auto-read-only) raid1 sda2[1] sdb2[0]
      523264 blocks super 1.2 [2/2] [UU]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Et repérage des détails de chacun d’entre eux :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ tune2fs -l /dev/md126
tune2fs 1.45.5 (07-Jan-2020)
Filesystem volume name:   &amp;lt;none&amp;gt;
Last mounted on:          /
Filesystem UUID:          3b617f47-b28d-4c8f-9f17-697779d503bc
Block count:              243763968
Reserved block count:     12188198
Overhead blocks:          4108002
Free blocks:              239277665
Free inodes:              60907081
[...]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Le point de montage est bien /, c’est donc notre périphérique.&lt;/p&gt;

&lt;h2 id=&quot;réduction-de-la-taille-du-raid&quot;&gt;Réduction de la taille du raid&lt;/h2&gt;

&lt;p&gt;Vérification du système de fichier :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ e2fsck -f /dev/md126
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Réduction de la taille :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ resize2fs /dev/md126 40G
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Réduction de la taille du raid :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ mdadm --grow --size 45G /dev/md126
mdadm: component size of /dev/md126 has been set to 52428800K
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On prend volontairement des taille plus petite que la taille visée de 50G histoire d’éviter les problèmes de conversion d’unités&lt;/p&gt;

&lt;h2 id=&quot;retaille-la-première-partition&quot;&gt;Retaille la première partition&lt;/h2&gt;

&lt;p&gt;Il faut retailler une à une les partitions de chacun des disques.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ mdadm --manage --set-faulty /dev/md126 /dev/sda3

$ mdadm --manage --remove /dev/md126 /dev/sda3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Désactiver les autres partitions (via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mdadm --stop&lt;/code&gt; et/ou &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;swapoff&lt;/code&gt;) puis retailler le disque pour réduire la partition sda3 à 50G.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ fdisk /dev/sda

$ partprobe /dev/sda
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Une fois réalisé, on peut reconstituer le raid :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ mdadm --add /dev/md126 /dev/sda3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Il faut ensuite attendre que les données soient recopiées (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cat /proc/mdadm&lt;/code&gt;).&lt;/p&gt;

&lt;h2 id=&quot;copier-la-taille-pour-la-seconde-partitions&quot;&gt;Copier la taille pour la seconde partitions&lt;/h2&gt;

&lt;p&gt;Désactiver l’usage de toutes les partitions du 2d disque en commençant par celle faisant partie du raid :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ mdadm --manage --set-faulty /dev/md126 /dev/sdb3

$ mdadm --manage --remove /dev/md126 /dev/sdb3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Puis copier la table des partition du premier sur le 2d disque :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sfdisk -d /dev/sda   | sfdisk /dev/sdb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On prévient le noyau du changement de partitions :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ partprobe /dev/sdb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On ajoute le 2d disque dans le raid :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ mdadm --add /dev/md126 /dev/sdb3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;mise-decquerre-des-tailles-&quot;&gt;Mise d’ecquerre des tailles :&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ mdadm --grow --size 49G /dev/md126

$ resize2fs /dev/md126
resize2fs 1.45.5 (07-Jan-2020)
Filesystem at /dev/md126 is mounted on /root/root; on-line resizing required
old_desc_blocks = 6, new_desc_blocks = 7
The filesystem on /dev/md126 is now 13107200 (4k) blocks long.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Fri, 06 May 2022 09:30:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2022/05/06/reduire-raid-linux/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2022/05/06/reduire-raid-linux/</guid>
        
        
      </item>
    
      <item>
        <title>Création d&apos;une visualisation de schema SQL</title>
        <description>&lt;h1 id=&quot;installation-des-dépendances&quot;&gt;Installation des dépendances&lt;/h1&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; sudo apt install python3-sadisplay graphviz
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;création-du-fichier-graphviz&quot;&gt;Création du fichier graphviz&lt;/h1&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sadisplay -u &quot;mysql://user:password@host/database&quot; &amp;gt; schema.dot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h1 id=&quot;création-de-limage-de-visualisation-du-schéma-sql&quot;&gt;Création de l’image de visualisation du schéma SQL&lt;/h1&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;dot -Tpng schema.dot &amp;gt; schema.png
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Mon, 04 Apr 2022 09:30:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2022/04/04/mysql-graphviz-schema/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2022/04/04/mysql-graphviz-schema/</guid>
        
        
      </item>
    
      <item>
        <title>Réception de mail exim Mailing to remote domains not supported</title>
        <description>&lt;h1 id=&quot;description-du-problème--mailing-to-remote-domains-not-supported-&quot;&gt;Description du problème « Mailing to remote domains not supported »&lt;/h1&gt;

&lt;p&gt;Un serveur envoi de manière intempestive des mails au sujet « Mail delivery failed: returning message to sender » dont une partie du contenu :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  mail@example.org
     (generated from actualys@localhost)
     Mailing to remote domains not supported
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;La suite du message peut contenir des mails administratifs du type compte-rendu de crontab.&lt;/p&gt;

&lt;h1 id=&quot;mail-frozen&quot;&gt;Mail frozen&lt;/h1&gt;

&lt;p&gt;Avec la commande &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mailq&lt;/code&gt;, vérifiez qu’il existe bien des mails dans un état &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;frozen&lt;/code&gt; afin de vous assurez que les notifications viennent bien de cette machine :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ mailq
17h  2.0K 1mYA7M-0002Z6-16 &amp;lt;&amp;gt; *** frozen ***
      mail@example.org

17h  2.0K 1mYACA-0002a6-60 &amp;lt;&amp;gt; *** frozen ***
      mail@example.org
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;L’envoi de ces mails est donc retenté régulièrement par exim.&lt;/p&gt;

&lt;h1 id=&quot;reconfiguration-dexim&quot;&gt;Reconfiguration d’exim&lt;/h1&gt;

&lt;p&gt;Avec la commande &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dpkg-reconfigure&lt;/code&gt;, reconfigurez exim&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo dpkg-reconfigure exim4-config
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Veillez au domaine associé à votre configuration exim pour qu’elle ne corresponde pas à une autre machine que la votre.&lt;/p&gt;

&lt;h1 id=&quot;purge-des-mails-frozen&quot;&gt;Purge des mails frozen&lt;/h1&gt;

&lt;p&gt;Pour nettoyer les mails &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;frozen&lt;/code&gt;, executez la commande suivante :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo mailq | grep frozen | awk &apos;{print $3}&apos; | sudo xargs exim -Mrm
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Assurez-vous que la &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;queue&lt;/code&gt; de mails reste bien vide quelques minutes plus tard (notamment si des crons s’executent régulièrement).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ sudo mailq
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Thu, 07 Oct 2021 11:00:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2021/10/07/exim-mailing-to-remote-domains-not-supported/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2021/10/07/exim-mailing-to-remote-domains-not-supported/</guid>
        
        
      </item>
    
      <item>
        <title>Copier un document couchdb</title>
        <description>&lt;h1 id=&quot;copier-un-document-couchdb&quot;&gt;Copier un document couchdb&lt;/h1&gt;

&lt;p&gt;La documentation couchdb de la copie d’un document est décrite ici : https://docs.couchdb.org/en/stable/api/document/common.html#copying-from-a-specific-revision&lt;/p&gt;

&lt;p&gt;Dans la requète http il faut utiliser la méthode &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;COPY&lt;/code&gt; et l’entête &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Destination: new_document_id&lt;/code&gt; pour indiquer le nouvel id de document :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl -X COPY http://localhost:5984/database_name/document_id -H &apos;Destination: new_document_id&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Fri, 17 Sep 2021 09:37:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2021/09/17/copier-un-document-couchdb/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2021/09/17/copier-un-document-couchdb/</guid>
        
        
      </item>
    
      <item>
        <title>Autologin avec metabase</title>
        <description>&lt;h1 id=&quot;autologin-avec-metabase&quot;&gt;Autologin avec metabase&lt;/h1&gt;

&lt;h2 id=&quot;sauthentifier-avec-lapi-de-metabase&quot;&gt;S’authentifier avec l’api de metabase&lt;/h2&gt;

&lt;p&gt;Il est possible de s’authentifier à metabase via son api, en incluant par exemple ce code javascript dans une page du même domaine :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;var metabase_webpath = &apos;/metabase&apos;;
var username = &apos;username&apos;;
var password = &apos;password&apos;;

var xhttp = new XMLHttpRequest();
xhttp.open(&quot;POST&quot;, metabase_webpath + &quot;/api/session&quot;, false);
xhttp.setRequestHeader(&quot;Content-type&quot;, &quot;application/json&quot;);
xhttp.send(&apos;{&quot;password&quot;:&quot;&apos; + password + &apos;&quot;,&quot;username&quot;:&quot;&apos; + username + &apos;&quot;,&quot;remember&quot;:&apos;+ remember +&apos;}&apos;);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Une réponse avec le code http 200 indique une authentification réussi.&lt;/p&gt;

&lt;h2 id=&quot;vérifier-si-lutilisateur-est-authentifié-sur-metabase&quot;&gt;Vérifier si l’utilisateur est authentifié sur metabase&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;var metabase_webpath = &apos;/metabase&apos;;
var xhttp = new XMLHttpRequest();
xhttp.open(&quot;GET&quot;, metabase_webpath + &quot;/api/user/current&quot;, true);
xhttp.send();
xhttp.onload = function() {
	if(xhttp.status != 401) {
		// Utilisateur déjà authentifié sur metabase
        return;
	}
    
    // Utilisateur non authentifié
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;insérer-du-code-javascript-dans-métabase-avec-apache&quot;&gt;Insérer du code javascript dans métabase avec Apache&lt;/h2&gt;

&lt;p&gt;Si metabase est distribué par apache, comme par exemple avec cette configuration :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;Location &quot;/metabase/&quot;&amp;gt;
        ProxyPass http://localhost:3213/
        ProxyPassReverse http://localhost:3213/
        SSLRequireSSL
&amp;lt;/Location&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Il est possible d’insérer du code html dans la réponse http avec les modules apache substitute et filter. Filter est généralement activé de base, il est par contre nécessaire d’activer substitute :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sudo a2enmod substitute
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Voici la configuration apache pour insérer l’appel à un fichier javascript nommé &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/js/metabase_autologin.js&lt;/code&gt; dans toute les pages html de métabase :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;Location &quot;/metabase/&quot;&amp;gt;
        Header unset Content-Security-Policy
        RequestHeader unset Accept-Encoding
        AddOutputFilterByType SUBSTITUTE text/html
        Substitute &quot;s#&amp;lt;/body&amp;gt;#&amp;lt;script type=\&quot;text/javascript\&quot; src=\&quot;/js/metabase_autologin.js\&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/body&amp;gt;#ni&quot;
&amp;lt;/Location&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Mon, 13 Sep 2021 01:07:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2021/09/13/metabase-autologin/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2021/09/13/metabase-autologin/</guid>
        
        
      </item>
    
      <item>
        <title>Problème decriture du lock solr avec tomcat 9</title>
        <description>&lt;h1 id=&quot;problème-décriture-du-fichier-de-lock-solr-avec-tomcat-9&quot;&gt;Problème d’écriture du fichier de lock SOLR avec tomcat 9&lt;/h1&gt;

&lt;p&gt;Suite à une migration de tomcat8 à tomcat9 sous Debian, Solr n’arrive plus à écrire en la base lucenne.&lt;/p&gt;

&lt;p&gt;Les exceptions suivantes sont renvoyés (dans le fichier &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/log/tomcat9/catalina.out&lt;/code&gt; :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;java.lang.RuntimeException: Failed to acquire random test lock; please verify filesystem for lock directory &apos;./solr/data/index&apos; supports locking
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;ou :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;org.apache.lucene.store.LockReleaseFailedException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component: ./solr/data/index/lucene-xxxxxxxxxxxxxxxxxxxxxxxxx-lucene-xxxx-test.lock
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Le problème vient d’un problème d’autorisation en écriture de tomcat9 dans la base lucence.&lt;/p&gt;

&lt;h2 id=&quot;vérifier-la-paternité-et-les-droits-du-répertoire-data-et-de-ses-sous-répertoire&quot;&gt;Vérifier la paternité et les droits du répertoire data et de ses sous-répertoire&lt;/h2&gt;

&lt;p&gt;Le service Tomcat9 sous debian ne tourne plus sous l’utilisateur &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tomcat8&lt;/code&gt; mais &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;tomcat&lt;/code&gt;. Il faut donc s’assurer que ce démon a les droits pour écrire dans la base hébergée dans le sous répertoire &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;data&lt;/code&gt; du répertoire de travail solr.&lt;/p&gt;

&lt;p&gt;Pour s’en assurer, il faut changer les droits :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;chown -R tomcat.tomcat solr/data

chmod -R u+wX solr/data
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;autoriser-les-écritures-dans-la-sandbox-java&quot;&gt;Autoriser les écritures dans la sandbox java&lt;/h2&gt;

&lt;p&gt;Avec tomcat9, un système de sandboxing a été introduit. Il limite les accès en écriture sur quasi tous les répertoires (Pour plus d’info, voir ce &lt;a href=&quot;https://salsa.debian.org/java-team/tomcat9/blob/master/debian/README.Debian&quot;&gt;README Debian&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;A moins que le répertoire &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;data&lt;/code&gt; soit un sous répertoire de &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/var/lib/tomcat9/webapps&lt;/code&gt;, il faut l’ajouter comme répertoire autorisé dans &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;service.d&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Pour se faire, il suffit d’ajouter un fichier .conf dans le répertoire &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/systemd/system/tomcat9.service.d/&lt;/code&gt; (nous avons choisi &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;override.conf&lt;/code&gt;) contenant les informations suivantes :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  [Service]
  ReadWritePaths=/chemin/absolu/vers/solr/data
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;(il faut evidemment adapter /chemin/absolu/vers/solr/data à votre configuration)&lt;/p&gt;

&lt;p&gt;Cette résolution a été trouvée grace à ce &lt;a href=&quot;https://serverfault.com/questions/989150/application-logging-broken-under-tomcat-9-permission-denied-to-var-log-myapp&quot;&gt;fil serverfault&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Tue, 31 Aug 2021 21:00:00 +0000</pubDate>
        <link>https://sergio.24eme.fr//2021/08/31/tomcat9-solr-write-lock-exception/</link>
        <guid isPermaLink="true">https://sergio.24eme.fr//2021/08/31/tomcat9-solr-write-lock-exception/</guid>
        
        
      </item>
    
  </channel>
</rss>
