Score:0

Apache not starting while installing RT5: DATABASE access issue

za flag
nil

Apache is not starting.

(rt5venv) root@devrt5:/etc/apache2/sites-available# systemctl start apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.

Try 1:

(rt5venv) root@devrt5:/etc/apache2/sites-available# systemctl status apache2

Or with journalctl -xe:

Dec 20 17:44:44 devrt5 apachectl[19768]: connectivity problem.
Dec 20 17:44:44 devrt5 apachectl[19768]: The error RT got back when trying to connect to your database
Dec 20 17:44:44 devrt5 apachectl[19768]: Connect Failed Access denied for user 'rt_user'@'localhost'
Dec 20 17:44:44 devrt5 apachectl[19768]:  at /opt/rt5/sbin/../lib/RT.pm line 222.
Dec 20 17:44:44 devrt5 RT[19771]: [19771] DBI 
connect('dbname=rt5;host=localhost','rt_user',...)
Dec 20 17:44:45 devrt5 systemd[1]: apache2.service: Control process exited, code=exited status=1
Dec 20 17:44:45 devrt5 sudo[19765]: pam_unix(sudo:session): session closed for user root
Dec 20 17:44:45 devrt5 systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 20 17:44:45 devrt5 systemd[1]: Failed to start The Apache HTTP Server.
-- Unit apache2.service has failed.

More tries:

(rt5venv) root@devrt5:/tmp/rt-5.0.2# /opt/rt5/sbin/rt-server &
[2] 21336
[1]   Exit 2                  /opt/rt5/sbin/rt-server
(rt5venv) root@devrt5:/tmp/rt-5.0.2# 
RT couldn't connect to the database where tickets are stored.
If this is a new installation of RT, you should visit the URL below
to configure RT and initialize your database.

If this is an existing RT installation, this may indicate a database
connectivity problem.

The error RT got back when trying to connect to your database was:

Connect Failed Access denied for user 'rt_user'@'localhost' (using password: YES)
 at /opt/rt5/sbin/../lib/RT.pm line 222.

I have also done the following:

  1. Granted all privileges on rt5.* to rt_user@localhost with grant option.
  2. Set up the password as well as rt_user for the DB in rt_siteconfig.pm.

I can get into MySQL using mysql -u root -p and it works perfectly fine.

I am happy to provide further details on file info if needed.

in flag
I'm not quite sure which MySQL user account you're using for the webite. `rt_user` or `root`. As @guiverc has stated, `root` cannot be used by systems (unless run as `sudo`). Does `/var/log/apache2/error.log` contain any actionable information to explain the problem?
nil avatar
za flag
nil
Here is more detail on the system: Distributor ID:Ubuntu; Description:Ubuntu 18.04.6 LTS; Release:18.04; Codename:bionic I am using rt_user as my SQL user. Following is the information I found in the error.log: Command line: '/usr/sbin/apache2' RT couldn't connect to the database where tickets are stored. If this is an existing RT installation, this may indicate a database connectivity problem. The error RT got trying to connect to your database was: Connect Failed Access denied for user 'rt_user'@'localhost' (using password: YES) at /opt/rt5/sbin/../lib/RT.pm line 222.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.