Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18624

xwiki-tomcat9-mysql postinstall fails at upgrade on Debian when the tomcat9 service is stopped and disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.10.6
    • Fix Version/s: 12.10.7, 13.4-rc-1
    • Component/s: Distribution - Debian
    • Labels:
      None
    • Environment:
      Debian 10.9, xinit
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      Upgrading from 11.10.4 to 12.10.6 with xinit set up to manage tomcat's lifecycle:

      ...
      Setting up xwiki-tomcat9-mysql (12.10.6) ...
      dpkg: error processing package xwiki-tomcat9-mysql (--configure):
       installed xwiki-tomcat9-mysql package post-installation script subprocess returned error exit status 3
      Errors were encountered while processing:
       xwiki-tomcat9-mysql
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      W: Operation was interrupted before it could finish
      

      Investigating, I get to:

      root@host:/home/user# less /var/lib/dpkg/info/xwiki-tomcat9-mysql.postinst 
      root@host:/home/user# systemctl -q is-active tomcat9.service
      root@host:/home/user# echo $?
      3
      root@host:/home/user# systemctl status tomcat9
      ● tomcat9.service - Apache Tomcat 9 Web Application Server
         Loaded: loaded (/lib/systemd/system/tomcat9.service; disabled; vendor preset: enabled)
        Drop-In: /etc/systemd/system/tomcat9.service.d
                 └─xwiki-tomcat9-systemd.conf
         Active: inactive (dead)
           Docs: https://tomcat.apache.org/tomcat-9.0-doc/index.html
      

      Possibly the solution is to replace the oneliner with an if that never ends up in an exit code other than 0.

      Looks related or caused by XWIKI-17883.

      Workaround:

      # systemctl start tomcat9
      # dpkg --configure xwiki-tomcat9-mysql
      

        Attachments

          Activity

            People

            Assignee:
            tmortagne Thomas Mortagne
            Reporter:
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: