howto (re)install roundcube

Discussion in 'Installation/Configuration' started by Jeee, Apr 9, 2021.

  1. Jeee

    Jeee New Member

    When trying to connect to roundcube I get:
    DATABASE ERROR: CONNECTION FAILED!
    I checked and there is no roundcube database in mysql.
    How can I initiate the reinstallation so it will create the database?
    thank you.
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Is this on ISPConfig host? Is it just now installed or has it been running a while and has worked?
    If you just installed ISPConfig and it just does not work, consider starting the installation from scratch and try not making any mistakes.
    Otherwise, start with this if you have ISPCOnfig system:
    https://www.howtoforge.com/community/threads/please-read-before-posting.58408/
    Also say how you installed your system.
     
  3. Jeee

    Jeee New Member

    It was a clean ansible install and I forgot to check roundcube. The server is up and running with all data migrated so a fresh install is not really an option at this point just for roundcube. I hoped there would be a script responsible for roundcube that I could run again....

    Code:
    # wget -q -O htf-common-issues.php "http://gitplace.net/pixcept/ispconfig-tools/raw/stable/htf-common-issues.php" && php -q htf-common-issues.php
    
    ##### SCRIPT FINISHED #####
    Results can be found in htf_report.txt
    To view results use your favourite text editor or type 'cat htf_report.txt | more' on the server console.
    
    If you want to see the non-anonymized output start the script with --debug as parameter (php -q htf-common-issues.php --debug).
    
    root@service:~# cat htf_report.txt
    
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Ubuntu 20.04.2 LTS
     
    [INFO] uptime:  13:40:27 up 14 days,  4:48,  1 user,  load average: 0.02, 0.05, 0.07
     
    [INFO] memory:
                  total        used        free      shared  buff/cache   available
    Mem:          3.8Gi       1.8Gi       872Mi        20Mi       1.2Gi       1.8Gi
    Swap:         3.8Gi       425Mi       3.4Gi
     
    [INFO] systemd failed services status:
      UNIT                      LOAD   ACTIVE SUB    DESCRIPTION                             
    ● logrotate.service         loaded failed failed Rotate log files                         
    ● snap.lxd.activate.service loaded failed failed Service for snap application lxd.activate
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    
    2 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.3
    
    
    ##### VERSION CHECK #####
    
    [INFO] php (cli) version is 7.4.3
    
    ##### PORT CHECK #####
    
    
    ##### MAIL SERVER CHECK #####
    
    
    ##### RUNNING SERVER PROCESSES #####
    
    [INFO] I found the following web server(s):
            Apache 2 (PID 2100)
    [INFO] I found the following mail server(s):
            Postfix (PID 2016)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 538)
    [INFO] I found the following imap server(s):
            Dovecot (PID 538)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 1188)
    
     
  4. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Which script did you use to install your server?
     
  5. Jeee

    Jeee New Member

  6. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    Maybe try dpkg-reconfigure of the various roundcube packages; from memory, maybe it's roundcube-core which sets up the database?
     
  7. Jeee

    Jeee New Member

    Code:
    root@service:~# dpkg-reconfigure roundcube
    root@service:~# dpkg-reconfigure roundcube-core
    Determining localhost credentials from /etc/mysql/debian.cnf: succeeded.
    root@service:~# dpkg-reconfigure roundcube-mysql
    root@service:~# dpkg-reconfigure roundcube-plugins
    root@service:~# 
    Unfortunately didnt do the trick.
     
  8. Jeee

    Jeee New Member

    I ended up creating the database manually:
    Code:
    mysql -u root -p
    CREATE DATABASE roundcube;
    CREATE USER 'roundcube'@'localhost' IDENTIFIED BY 'new_password_here';
    GRANT ALL ON roundcube.* TO 'roundcube'@'localhost' IDENTIFIED BY 'user_password_here' WITH GRANT OPTION;
    FLUSH PRIVILEGES;
    EXIT;
    
    cd /usr/share/roundcube/
    sudo mysql -u roundcube -p roundcube < SQL/mysql.initial.sql
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    That ansible-role is for Ubuntu 18.04, you installed on 20.04. That may be the culprit for the issue you saw, or then the different version of Roundcube in 20.04.
    You should ask that from the makers of ansible-role-ispconfig3, not here.
    Next time you could use https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller
     
  10. Jeee

    Jeee New Member

    Thank you all for your help.
    I forked the code to get it to run on 20.04 but I think you are right that that might be different in 20.04.
    Since I control my other machines with ansible (works very well!) as well that seemed the right way to go. Might also be convenient for others; maybe ispconfig can check that repository and clone & support it as well.
     
  11. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

Share This Page