Author

Topic: [my own pool] 'CDbConnection failed to open the DB connection.' error (Read 180 times)

newbie
Activity: 14
Merit: 0
Okay, it seems like I've fixed it with the help of some people at a Discord server. I'm sharing the solution here in case someone runs into the same problem and locking this thread. Sorry for the (unintentional) spam! Cheesy

What I needed to do was install php7.3-memcache and php7.3-memcached:

Code:
sudo apt install php7.3-memcache php7.3-memcached memcached

and then change the default php version from 8.1 to 7.3:

Code:
sudo update-alternatives --config php

Finally, then I restarted nginx and php fpm:

Code:
sudo service nginx restart

sudo service php7.3-fpm restart

That fixed it! Smiley

newbie
Activity: 14
Merit: 0
Hi everyone,

I've set up my own mining pool using the installer at https://github.com/cryptopool-builders/Multi-Pool-Installer. It seems to be working fine for the most part but I'm seeing the  'CDbConnection failed to open the DB connection.' error in my debug.log file. Here's what the log entries look like in full:

Code:
[2022-02-17 13:26:14] CDbException#1
(
    [*:message] => 'CDbConnection failed to open the DB connection.'
    [Exception:string] => ''
    [*:code] => 0
    [*:file] => '/home/crypto-data/yiimp/site/web/framework/db/CDbConnection.php'
    [*:line] => 405
    [Exception:trace] => array
    (
        0 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/db/CDbConnection.php'
            'line' => 347
            'function' => 'open'
            'class' => 'CDbConnection'
            'type' => '->'
        )
        1 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/db/CDbConnection.php'
            'line' => 325
            'function' => 'setActive'
            'class' => 'CDbConnection'
            'type' => '->'
        )
        2 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/base/CModule.php'
            'line' => 394
            'function' => 'init'
            'class' => 'CDbConnection'
            'type' => '->'
        )
        3 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/base/CModule.php'
            'line' => 103
            'function' => 'getComponent'
            'class' => 'CModule'
            'type' => '->'
        )
        4 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/yaamp/core/common/libdbo.php'
            'line' => 38
            'function' => '__get'
            'class' => 'CModule'
            'type' => '->'
        )
        5 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/yaamp/modules/thread/CronjobController.php'
            'line' => 51
            'function' => 'dborun'
        )
        6 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/web/actions/CInlineAction.php'
            'line' => 49
            'function' => 'actionRunBlocks'
            'class' => 'CronjobController'
            'type' => '->'
        )
        7 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/web/CController.php'
            'line' => 308
            'function' => 'runWithParams'
            'class' => 'CInlineAction'
            'type' => '->'
        )
        8 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/web/CController.php'
            'line' => 286
            'function' => 'runAction'
            'class' => 'CController'
            'type' => '->'
        )
        9 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/framework/web/CController.php'
            'line' => 265
            'function' => 'runActionWithFilters'
            'class' => 'CController'
            'type' => '->'
        )
        10 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/yaamp/components/CYiimpConsoleApp.php'
            'line' => 125
            'function' => 'run'
            'class' => 'CController'
            'type' => '->'
        )
        11 => array
        (
            'file' => '/home/crypto-data/yiimp/site/web/runconsole.php'
            'line' => 20
            'function' => 'runController'
            'class' => 'CYiimpConsoleApp'
            'type' => '->'
        )
    )
    [Exception:previous] => null
    [errorInfo] => null
)

I'm not seeing any MySQL errors in the mysql.log file, nginx logs don't seem to show anything either, same with client.log and reject.log. application.log  in /home/crypto-data/yiimp/site/web/yaamp/runtime only has this:

Code:
2022/02/18 11:24:43 [error] [php] memcache_connect(): Server 127.0.0.1 (tcp 11211, udp 0) failed with: Connection failed: Connection refused (111) (/home/crypto-data/yiimp/site/web/yaamp/core/functions/memcache.php:10)
Stack trace:
#0 /home/crypto-data/yiimp/site/web/framework/base/CApplication.php(170): CYiimpConsoleApp->init()
#1 /home/crypto-data/yiimp/site/web/framework/YiiBase.php(127): CYiimpConsoleApp->__construct()
#2 /home/crypto-data/yiimp/site/web/runconsole.php(14): createApplication()

but this is from hours ago and my problem still persists.

The coin log in stratum/config only has this:

Code:
12:44:11: connecting to coind TLC
12:44:11: Techcoin wallet is using getaddressinfo.
12:44:11: Warning: unable to decode TLC tc1qhnfad09vg78a4whxjjdydqy00gjx64wqsrc8um script pubkey
12:44:11: TLC tc1qhnfad09vg78a4whxjjdydqy00gjx64wqsrc8um extracted script pubkey is d3d6bcac478fdabae6949a46808f7a246d

syslog doesn't show any MySQL errors either. MySQL/MariaDB seem to be running okay and I can connect to the database manually.

What other log files should I check? What could be the problem, if the database connection seems okay?

Thanks in advance! Smiley
Jump to: