Error received from database was #2002: No such file or directory

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Post Reply
stewy
Posts: 2
Joined: 11 Oct 2018, 19:13

Error received from database was #2002: No such file or directory

Post by stewy »

Configured as best i can, but running the check script produces:

Code: Select all

APPLICATION ERROR #400: Database connection failed. Error received from database was #2002: No such file or directory.
Script access core.php no problem.

Running Mantis 2.9.0 on MariaDB (PHP 5.6)
atrol
Site Admin
Posts: 8399
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error received from database was #2002: No such file or directory

Post by atrol »

stewy wrote: 11 Oct 2018, 19:18 Running Mantis 2.9.0
Quite outdated. I recommend to use latest version (2.17.1 at the moment)

The given information is not enough to provide any help.
You should provide detailed step by step instructions of what you do, what you get and what you expect to get.
Please use Search before posting and read the Manual
stewy
Posts: 2
Joined: 11 Oct 2018, 19:13

Re: Error received from database was #2002: No such file or directory

Post by stewy »

Everything is wrapped up nicely on a Synology NAS server.... but yes, updates are sorely lacking for 3rd party apps.
SL-Gundam
Posts: 725
Joined: 06 Jul 2011, 14:17

Re: Error received from database was #2002: No such file or directory

Post by SL-Gundam »

To summarize

1. This is unrelated to EmailReporting. So maybe should be moved to the appropriate forum
2. You are using the pre-build Synology app for MantisBT (https://www.synology.com/en-global/dsm/ ... s/MantisBT). If there are problems with that i suggest you contact the providers of that package here: https://forum.synology.com/enu/viewforum.php?f=190
3. Since MantisBT is just a web package. You could just remove the Synology app for MantisBT and install it manually on the Synology webserver

My advise is option 3
somebodylikeme
Posts: 3
Joined: 24 Feb 2022, 09:21

Re: Error received from database was #2002: No such file or directory

Post by somebodylikeme »

I got the same error on my Synology NAS (DSM 6.2), with Web Station, nginx, PHP 7.4 (no PEAR) even with the latest version of MantisBT (2.25.2).
Since my project administration depends on Mantis, I decided to track down the error, and I think I found a bug in ado-php.

1. index.php line 31 requires core.php
2. core.php line 269 requires API database_api.php
3. core/database_api.php line 154 ADONewConnection::Connect is called
4. vendor/adodb/adodb-php line 695 ADONewConnection::_connect is called

The problem: the function ADONewConnection::_connect() does not exist (!), probably some autoloader is activated which obviously can not find the file and triggers the error. Although I don't see why the same code worked perfectly on my Debian 11 server?
somebodylikeme
Posts: 3
Joined: 24 Feb 2022, 09:21

Re: Error received from database was #2002: No such file or directory

Post by somebodylikeme »

I've missed the fact that ADOConnection is an abstract class.. my bad.

I did however solve the problem (after more than 2 hours, because of the initial unhelpful error message)

- Changing the configuration parameter from 'localhost' to '127.0.0.1' changed the error to 'Connection refused'
- After enabling TCP/IP on port 3306 in DSM -> Package Manager -> MariaDB 10 -> Open, the database connection worked
somebodylikeme
Posts: 3
Joined: 24 Feb 2022, 09:21

Re: Error received from database was #2002: No such file or directory

Post by somebodylikeme »

Related: Synology stopped support for their MantisBT package as of June 30 2020.
https://www.synology.com/en-global/prod ... y_packages

Also see: viewtopic.php?f=2&t=27043
Post Reply