Upgrade from Jessie to Strech problems

Discussion in 'Installation/Configuration' started by Pierrot727, Mar 29, 2019.

  1. Pierrot727

    Pierrot727 New Member

    Hi all,

    I want to upgrade my version from Debian Jessie to Debian Strech.
    I follow this tutorial:
    https://angristan.fr/mettre-a-jour-debian-8-jessie-vers-debian-9-stretch/

    Wich mainly mean:
    update the file /etc/apt/sources.list
    Wich is now:
    deb http://deb.debian.org/debian stretch main
    deb http://deb.debian.org/debian stretch-updates main
    deb http://security.debian.org/ stretch/updates main

    Use
    apt-update
    apt-upgrade

    But now i have this problem:
    with apt-update i get this answer:
    [email protected]:/etc/apt# apt update
    Hit http://security.debian.org stretch/updates InRelease
    Get:1 https://packages.sury.org strech InRelease [1,441 B]
    Ign https://packages.sury.org strech InRelease
    Get:2 http://security.debian.org stretch/updates/main amd64 Packages [481 kB]
    Get:3 https://packages.sury.org strech Release.gpg [1,441 B]
    Ign https://packages.sury.org strech Release.gpg
    Ign http://deb.debian.org stretch InRelease
    Get:4 http://security.debian.org stretch/updates/main Translation-en [213 kB]
    Get:5 https://packages.sury.org strech Release [1,441 B]
    Hit http://deb.debian.org stretch-updates InRelease
    Ign https://packages.sury.org strech Release
    Get:6 https://packages.sury.org strech/main amd64 Packages [1,441 B]
    Hit http://deb.debian.org stretch Release.gpg
    Get:7 https://packages.sury.org strech/main Translation-en_US [1,441 B]
    Get:8 https://packages.sury.org strech/main Translation-en [1,441 B]
    Get:9 http://deb.debian.org stretch-updates/main amd64 Packages/DiffIndex [8,116 B]
    Get:10 https://packages.sury.org strech/main amd64 Packages [1,441 B]
    Get:11 http://deb.debian.org stretch-updates/main Translation-en/DiffIndex [4,672 B]
    Get:12 https://packages.sury.org strech/main Translation-en_US [1,441 B]
    Get:13 https://packages.sury.org strech/main Translation-en [1,441 B]
    Hit http://deb.debian.org stretch Release
    Get:14 https://packages.sury.org strech/main amd64 Packages [1,441 B]
    Get:15 https://packages.sury.org strech/main Translation-en_US [1,441 B]
    Get:16 https://packages.sury.org strech/main Translation-en [1,441 B]
    Get:17 https://packages.sury.org strech/main amd64 Packages [1,441 B]
    Get:18 http://deb.debian.org stretch/main amd64 Packages [7,084 kB]
    Get:19 https://packages.sury.org strech/main Translation-en_US [1,441 B]
    Get:20 http://deb.debian.org stretch/main Translation-en [5,384 kB]
    Get:21 https://packages.sury.org strech/main Translation-en [1,441 B]
    Get:22 https://packages.sury.org strech/main amd64 Packages [1,441 B]
    Err https://packages.sury.org strech/main amd64 Packages
    HttpError404
    Get:23 https://packages.sury.org strech/main Translation-en_US [1,441 B]
    Ign https://packages.sury.org strech/main Translation-en_US
    Get:24 https://packages.sury.org strech/main Translation-en [1,441 B]
    Ign https://packages.sury.org strech/main Translation-en
    Fetched 12.8 kB in 2s (5,991 B/s)
    W: Failed to fetch https://packages.sury.org/php/dists/strech/main/binary-amd64/Packages HttpError404

    E: Some index files failed to download. They have been ignored, or old ones used instead.
    [email protected]:/etc/apt#

    ---
    And with apt upgrade:

    [email protected]:/etc/apt# apt upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    libssl1.1 : Breaks: python-httplib2 (< 0.11.3-1) but 0.9.2+dfsg-1 is to be installed
    E: Broken packages
    [email protected]:/etc/apt#

    So please, from now, i don't know what i have to do in fact ...
    Thanks for your help

    P.
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    check for additional files in /etc/apt/sources.list.d
     
  3. Pierrot727

    Pierrot727 New Member

  4. Pierrot727

    Pierrot727 New Member

    Ok i finally fix it, for that, i do
    apt dist-upgrade

    and it works! cool.
    But i still have some issue:
    udapte command:
    Code:
    [email protected]:/etc/apt/sources.list.d# apt update
    Ign:1 http://deb.debian.org/debian stretch InRelease
    Hit:2 http://deb.debian.org/debian-security stretch/updates InRelease
    Hit:3 http://deb.debian.org/debian stretch-updates InRelease
    Hit:4 http://deb.debian.org/debian stretch Release
    Get:5 https://packages.sury.org/php strech InRelease [1,441 B]
    Ign:5 https://packages.sury.org/php strech InRelease
    Get:7 https://packages.sury.org/php strech Release [1,441 B]
    Err:7 https://packages.sury.org/php strech Release
      HttpError404
    Reading package lists... Done
    E: The repository 'https://packages.sury.org/php strech Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    [email protected]:/etc/apt/sources.list.d#
    
    And upgrade command:
    Code:
    [email protected]:/etc/apt/sources.list.d# apt upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:
    
    The following packages have unmet dependencies:
     libssl1.1 : Breaks: python-httplib2 (< 0.11.3-1) but 0.9.2+dfsg-1 is to be installed
    E: Broken packages
    [email protected]:/etc/apt/sources.list.d#
    
    my source.list.d contain only 1 file: php.list wich contain itself:
    deb https://packages.sury.org/php/ strech main

    Thanks for helping
     
  5. Pierrot727

    Pierrot727 New Member

    Upgrade fixed! but i still have a problem with fail2ban, any help ?

    Code:
    [email protected]:/var/www/clients/client1/web1/web/www# apt upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    The following packages have been kept back:
      php-log phpmyadmin roundcube-core roundcube-mysql
    0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Setting up fail2ban (0.9.6-2) ...
    Job for fail2ban.service failed because the control process exited with error code.
    See "systemctl status fail2ban.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript fail2ban, action "start" failed.
    ● fail2ban.service - Fail2Ban Service
       Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
       Active: activating (auto-restart) (Result: exit-code) since Sat 2019-03-30 02:50:24 CET; 3ms ago
         Docs: man:fail2ban(1)
      Process: 15058 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
    
    Mar 30 02:50:24 rackam systemd[1]: Failed to start Fail2Ban Service.
    Mar 30 02:50:24 rackam systemd[1]: fail2ban.service: Unit entered failed state.
    Mar 30 02:50:24 rackam systemd[1]: fail2ban.service: Failed with result 'exit-code'.
    dpkg: error processing package fail2ban (--configure):
     subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
     fail2ban
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    [email protected]:/var/www/clients/client1/web1/web/www#
    
     
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The proper guide for upgrading Debian is in the Release Notes, for Jessie to Stretch it is available in several languages from
    https://www.debian.org/releases/stable/releasenotes
    The problems you have seen so far are resolved in that guide.
    You still have packages that are not upgraded, this is shown in your last message:
    To see why fail2ban does not start, do what it suggest, namely
    Code:
    systemctl status fail2ban.service
    and
    Code:
    journalctl -xe
    If that does not help, see other log files in /var/log, for example try starting fail2ban and do ls -lth on that directory, then you see what log files are the latest to get some new lines.
    It may also be good to do
    Code:
    systemctl --state=failed
    to see if other services have failed to start.
     
  7. Pierrot727

    Pierrot727 New Member

    Hi,
    Yep, i found the issue:
    Code:
    ● fail2ban.service - Fail2Ban Service
       Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Sun 2019-03-31 14:11:58 CEST; 2min 16s ago
         Docs: man:fail2ban(1)
    
    Mar 31 14:11:58 rackam systemd[1]: fail2ban.service: Unit entered failed state.
    Mar 31 14:11:58 rackam systemd[1]: fail2ban.service: Failed with result 'exit-code'.
    Mar 31 14:11:58 rackam systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
    Mar 31 14:11:58 rackam systemd[1]: Stopped Fail2Ban Service.
    Mar 31 14:11:58 rackam systemd[1]: fail2ban.service: Start request repeated too quickly.
    Mar 31 14:11:58 rackam systemd[1]: Failed to start Fail2Ban Service.
    Mar 31 14:11:58 rackam systemd[1]: fail2ban.service: Unit entered failed state.
    Mar 31 14:11:58 rackam systemd[1]: fail2ban.service: Failed with result 'exit-code'.
    
    Now working to fix-it ...
     
  8. Pierrot727

    Pierrot727 New Member

    .... i search on the doc and i did'nt found it yet, could you give me a link please ?
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    A link to what?
     
  10. Pierrot727

    Pierrot727 New Member

    I look in the guide, and i don't find the place where it's solverd ;-) so please can you show me where it is (the link to the page), or help me to try to solve it :)

    Thanks and very good week :)
     
  11. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Solve what?
    Some points:
    • Chapter 4.2 Checking System State tells
      Following that would have avoided the trouble with sury.org.
    • the release notes advices to use two phase upgrade, first minimal upgrade with apt-get upgrade and then apt-get dist-upgrade. This should be a smoother way to do the upgrade.
    • And the command to use is apt-get, not apt.
    Hope the above helps. My point is, that Debian project makes a thorough update manual. I have used that and have either had a smoot upgrade since Debian 1.x or the manual tells me how to avoid or fix the problems if such try to appear.
     
  12. Pierrot727

    Pierrot727 New Member

    Ok still working on problem. The issue is not solved, but after many try more informations:

    [​IMG]

    Thanks for support, i know that i have to fix something in jail.local or jail.conf but i don't know what ...

    This my jail.local

    Code:
    [pureftpd]
    enabled  = true
    port     = ftp
    filter   = pureftpd
    logpath  = /var/log/syslog
    maxretry = 3
    
    [dovecot-pop3imap]
    enabled = true
    filter = dovecot-pop3imap
    action = iptables-multiport[name=dovecot-pop3imap, port="pop3,pop3s,imap,imaps", protocol=tcp]
    logpath = /var/log/mail.log
    maxretry = 5
    
    [postfix-sasl]
    enabled  = true
    port     = smtp
    filter   = postfix-sasl
    logpath  = /var/log/mail.log
    maxretry = 3
    
    Thanks for helping
     
  13. Pierrot727

    Pierrot727 New Member

    And status:
     
  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    The Perfect Server Guide shows for jail.local
    Code:
    [pure-ftpd]
    Try just doing copy paste of the jail.local example in the Guide, try if fail2ban starts with that. Then start doing small changes one by one and try if it still starts.
     
  15. Pierrot727

    Pierrot727 New Member

    After long working on it. i found finally a solution which, well, work:

    Code:
    service fail2ban stop
    rm -r /etc/fail2ban/
    apt-get purge fail2ban
    
    apt-get install fail2ban
    Of course, it's a little bit extrem, but it did the job and now everything works fine :)
     

Share This Page