Error running admin web UI: Database connection "Mysql" is missing

Comments

9 comments

  • Official comment
    Avatar
    Krzysztof Ksiazek

    Hi,

    Unfortunately, as of now Debian 9 is not yet supported and installation script may not work. We are working on adding the support but we cannot give you any ETA on that. We will announce it in the changelog.

    Thanks,
    Krzysztof

    Comment actions Permalink
  • Avatar
    edray mashiri

    Same issue here, did you manage to get a solution?

    0
    Comment actions Permalink
  • Avatar
    Martin Eslon

    Hi,

    Any progress on this one?

     

    BR,

    M.

    0
    Comment actions Permalink
  • Avatar
    Paul Namuag

    Hi Martin Eslon

    This post was 3 years ago and I don't think this issue is still existing. Let us know what issue you are facing as we have massive changes since that year. Checkout https://support.severalnines.com/hc/en-us/articles/212425943-ChangeLog to get more updates of our changes.

     

     

    0
    Comment actions Permalink
  • Avatar
    Martin Eslon

    Hi, thanks for this extremely prompt reply :)

    I installed Severalnines with a script on a Debian GNU/Linux 9.13 (stretch) server a while ago. And from the get-go I got this error: "Database connection "Mysql" is missing, or could not be created."

    In the logs (clustercontrol/app/tmp/logs/error.log) I get:
    2021-01-05 17:10:42 Error: [MissingConnectionException] Database connection "Mysql" is missing, or could not be created.
    Exception Attributes: array (
    'class' => 'Mysql',
    'message' => 'Selected driver is not enabled',
    'enabled' => false,
    )
    Request URL: /clustercontrol/
    Stack Trace:
    #0 /var/www/clustercontrol/lib/Cake/Model/ConnectionManager.php(105): DboSource->__construct(Array)
    #1 /var/www/clustercontrol/lib/Cake/Model/Model.php(3646): ConnectionManager::getDataSource('default')
    #2 /var/www/clustercontrol/lib/Cake/Model/Model.php(1162): Model->setDataSource('default')
    #3 /var/www/clustercontrol/lib/Cake/Model/Model.php(3673): Model->setSource('cake_sessions')
    #4 /var/www/clustercontrol/lib/Cake/Model/Model.php(3040): Model->getDataSource()
    #5 /var/www/clustercontrol/lib/Cake/Model/Model.php(3012): Model->_readDataSource('first', Array)
    #6 /var/www/clustercontrol/lib/Cake/Model/Datasource/Session/DatabaseSession.php(92): Model->find('first', Array)
    #7 [internal function]: DatabaseSession->read('s5hkf4ti8c62k2t...')
    #8 /var/www/clustercontrol/lib/Cake/Model/Datasource/CakeSession.php(743): session_start()
    #9 /var/www/clustercontrol/lib/Cake/Model/Datasource/CakeSession.php(219): CakeSession::_startSession()
    #10 /var/www/clustercontrol/lib/Cake/Model/Datasource/CakeSession.php(439): CakeSession::start()
    #11 /var/www/clustercontrol/lib/Cake/Controller/Component/FlashComponent.php(100): CakeSession::write('Message.auth', Array)
    #12 /var/www/clustercontrol/lib/Cake/Controller/Component/AuthComponent.php(853): FlashComponent->set('You are not aut...', Array)
    #13 /var/www/clustercontrol/lib/Cake/Controller/Component/AuthComponent.php(364): AuthComponent->flash('You are not aut...')
    #14 /var/www/clustercontrol/lib/Cake/Controller/Component/AuthComponent.php(306): AuthComponent->_unauthenticated(Object(PagesController))
    #15 /var/www/clustercontrol/lib/Cake/Utility/ObjectCollection.php(128): AuthComponent->startup(Object(PagesController))
    #16 /var/www/clustercontrol/lib/Cake/Event/CakeEventManager.php(243): ObjectCollection->trigger('startup')
    #17 /var/www/clustercontrol/lib/Cake/Controller/Controller.php(678): CakeEventManager->dispatch(Object(CakeEvent))
    #18 /var/www/clustercontrol/lib/Cake/Routing/Dispatcher.php(189): Controller->startupProcess()
    #19 /var/www/clustercontrol/lib/Cake/Routing/Dispatcher.php(167): Dispatcher->_invoke(Object(PagesController), Object(CakeRequest))
    #20 /var/www/clustercontrol/app/webroot/index.php(136): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
    #21 {main}

    I've reinstalled SN, Mysql, php, tried to tweak files, to enable php modules, checked DB etc. None helped so now I'm just googling desperately...
    BR,

    M.

    0
    Comment actions Permalink
  • Avatar
    Paul Namuag

    Hi Martin Eslon

     

    I have tried with Debian 9/Stretch but works fine on my end. The only way I can reproduce this is if when I stop my MariaDB instance. With that regard, it looks like there's an issue with connectivity between your CC (or at least via PHP) going to MariaDB/MySQL. Checkout the MySQL/MariaDB logs you have. Also checkout if you have the proper modules or packages that PHP requires in order to connect to your MySQL/MariaDB instance.

    0
    Comment actions Permalink
  • Avatar
    Martin Eslon

    Hey, thanks for checking it. I've been messing with it a lot but still no luck. I think I'll start from scratch. I checked php-mysql connectivity and it worked from brauser and shell. Still the culprit could be php version. Which php version is the recommended one, 7.4? Also, there are lot of open ports - 9500, 9501, 9510, 9511, 9518, Mysql etc - do they all have to be open to the world?

    BR,

    M.

    0
    Comment actions Permalink
  • Avatar
    Paul Namuag

    Hi Martin Eslon

    I was using https://github.com/severalnines/puppet and it uses PHP 7 (PHP 7.0.33-0+deb9u10) in my deployment test. For the ports, no you don't need to open it to the world. There's no reason you need to open that unless your in a private network. If you require more complex setup such as using cmon HA, then use VPN instead. Also if CC is using a public IP to register your database nodes and if that's what you intend, then I discourage using public IP of course and that is really dangerous idea. Rather use VIP or set it up on a tight or private network where it can reach your database nodes or they can interact vice versa.

     

     

    0
    Comment actions Permalink
  • Avatar
    Martin Eslon

    Hey, after rebuilding the server from scratch, it works! Big thanks again for taking the time!

     

    BR,

    M.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk