Announcement

Collapse
No announcement yet.

DB Error: no such database

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DB Error: no such database

    bonjour! j'viens d'installer oreon! l'installation s'est bien deroulé ss probleme apparente! et quant j'veux acceder à la page d'aceuil ça m'affiche : DB Error: no such database!
    j'ai essayé de chercher ds le forum mais ne n'ai pas trouvé des solution! merci bcp

  • #2
    plz help :-( :-( :-( :-(

    Comment


    • #3
      salut,

      1- on va verifier que tu as bien tes base oreon et ODS.
      connecte toi à mysql :
      Code:
      mysql> show databases;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      | OreonDB            |
      | OreonDataStorage   |
      | test               |
      +--------------------+
      enfin ça doit correspondre aux noms des bases que tu as mis pendant l'install (Oreon et ods)

      verifie que tu as bien une structure dedans :
      Code:
      mysql> use OreonDB;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
      
      Database changed
      mysql> show tables;
      +----------------------------------------+
      | Tables_in_OreonDB                      |
      +----------------------------------------+
      | cfg_cgi                                |
      | cfg_nagios                             |
      | cfg_perfparse                          |
      | cfg_resource                           |
      | command                                |
      | contact                                |
      | contact_hostcommands_relation          |
      | contact_servicecommands_relation       |
      | contactgroup                           |
      | contactgroup_contact_relation          |
      | contactgroup_host_relation             |
      | contactgroup_hostgroup_relation        |
      | contactgroup_service_relation          |
      | contactgroup_servicegroup_relation     |
      | cron_operation                         |
      | css_color_menu                         |
      | dependency                             |
      | dependency_hostChild_relation          |
      | dependency_hostParent_relation         |
      | dependency_hostgroupChild_relation     |
      | dependency_hostgroupParent_relation    |
      | dependency_metaserviceChild_relation   |
      | dependency_metaserviceParent_relation  |
      | dependency_serviceChild_relation       |
      | dependency_serviceParent_relation      |
      | dependency_servicegroupChild_relation  |
      | dependency_servicegroupParent_relation |
      | downtime                               |
      | escalation                             |
      | escalation_contactgroup_relation       |
      | escalation_host_relation               |
      | escalation_hostgroup_relation          |
      | escalation_meta_service_relation       |
      | escalation_service_relation            |
      | extended_host_information              |
      | extended_service_information           |
      | general_opt                            |
      | giv_components                         |
      | giv_components_template                |
      | giv_graphT_componentT_relation         |
      | giv_graphs                             |
      | giv_graphs_template                    |
      | host                                   |
      | host_hostparent_relation               |
      | host_service_relation                  |
      | hostgroup                              |
      | hostgroup_relation                     |
      | inventory_index                        |
      | inventory_log                          |
      | inventory_mac_address                  |
      | inventory_manufacturer                 |
      | lca_define                             |
      | lca_define_contactgroup_relation       |
      | lca_define_host_relation               |
      | lca_define_hostgroup_relation          |
      | lca_define_servicegroup_relation       |
      | lca_define_topology_relation           |
      | log_archive_file_name                  |
      | log_archive_host                       |
      | log_archive_service                    |
      | meta_contactgroup_relation             |
      | meta_service                           |
      | meta_service_relation                  |
      | modules_informations                   |
      | nagios_macro                           |
      | nagios_server                          |
      | ods_view_details                       |
      | oreon_informations                     |
      | purge_policy                           |
      | reporting_diff_email                   |
      | reporting_diff_list                    |
      | reporting_email_list_relation          |
      | service                                |
      | servicegroup                           |
      | servicegroup_relation                  |
      | session                                |
      | timeperiod                             |
      | topology                               |
      | topology_JS                            |
      | traps                                  |
      | traps_service_relation                 |
      | view_city                              |
      | view_country                           |
      | view_map                               |
      +----------------------------------------+
      84 rows in set (0.00 sec)
      2- verifier les droits de l'utilisateur se connectant a ces tables
      Code:
      mysql> show grants for 'OreonDB'@'localhost';
      +----------------------------------------------------------------------------------------------------------------+
      | Grants for [email protected]                                                                                   |
      +----------------------------------------------------------------------------------------------------------------+
      | GRANT USAGE ON *.* TO 'OreonDB'@'localhost' IDENTIFIED BY PASSWORD '424242424242424242'|
      | GRANT ALL PRIVILEGES ON `OreonDataStorage`.* TO 'OreonDB'@'localhost' WITH GRANT OPTION                        |
      | GRANT ALL PRIVILEGES ON `OreonDB`.* TO 'OreonDB'@'localhost' WITH GRANT OPTION                                 |
      +----------------------------------------------------------------------------------------------------------------+
      3 rows in set (0.00 sec)
      note: ca depend du nom d'utilisateur que tu as mis à l'install pour oreon (ici OreonD.

      3- verifier que les infos sont les bonnes dans le fichier de conf
      Code:
      cat /usr/local/oreon/www/oreon.conf.php | grep \$conf
      $conf_oreon['host'] = "localhost";
      $conf_oreon['user'] = "OreonDB";
      $conf_oreon['password'] = "42_H2G2";
      $conf_oreon['db'] = "OreonDB";
      $conf_oreon['ods'] = "OreonDataStorage";
      verifier une dernière fois que cette utilisateur peut se connecter à ce server
      Code:
      # mysql -h localhost -uOreonDB -p
      Enter password:
      Welcome to the MySQL monitor.  Commands end with ; or \g.
      Your MySQL connection id is 159301 to server version: 5.0.27-standard
      
      Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
      
      mysql> show databases;
      +--------------------+
      | Database           |
      +--------------------+
      | information_schema |
      | OreonDB            |
      | OreonDataStorage   |
      | test               |
      +--------------------+
      4 rows in set (0.00 sec)
      Si tout est bon jusque là tu as surement une erreur sur la structure de données.
      ..()_() .°("who | grep -i blonde | date; cd ~; unzip;")
      =(o_0)=
      *(() () Nicolas Verriest, France

      Comment


      • #4
        merci pour les explications

        Comment


        • #5
          merci je vais tester et je vous tiens au courants...

          Comment


          • #6
            j'ai toujours le meme probleme qui persiste alors dis moi ce qu'il se passe de ton coté stp

            Comment


            • #7
              Je viens de rencontrer un probleme similaire, c'etait selinux qui faisait le bazard.
              Essaie de le desactiver pour debugguer.
              ..()_() .°("who | grep -i blonde | date; cd ~; unzip;")
              =(o_0)=
              *(() () Nicolas Verriest, France

              Comment


              • #8
                il est déjà résactivé je crois.
                Dans /etc/sysconfig/selinux j'ai :
                # This file controls the state of SELinux on the system.
                # SELINUX= can take one of these three values:
                # enforcing - SELinux security policy is enforced.
                # permissive - SELinux prints warnings instead of enforcing.
                # disabled - SELinux is fully disabled.
                SELINUX=disabled
                # SELINUXTYPE= type of policy in use. Possible values are:
                # targeted - Only targeted network daemons are protected.
                # strict - Full SELinux protection.
                SELINUXTYPE=targeted

                # SETLOCALDEFS= Check local definition changes
                SETLOCALDEFS=0

                ça suffira ça?
                mais, en fait, honnetement, je ne vois pas d'où peut venir le problème du tout.
                ca va faire 2 semaines que je suis bloqué.
                j attend votre réponse.
                merci d'avance.
                Last edited by netzuko; 25 May 2007, 09:17.

                Comment


                • #9
                  j'ai modifié quelques paramètres de la configuration, et lorsque que je lance le dedug, voilà ce que ca me donne :


                  Nagios 2.7
                  Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
                  Last Modified: 01-19-2007
                  License: GPL

                  Reading configuration data...

                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 38)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 56)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 74)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 92)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 110)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 128)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 146)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 164)
                  Warning: Duplicate definition found for service 'generic-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 182)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 215)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 230)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 245)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 260)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 275)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 290)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 305)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 320)
                  Warning: Duplicate definition found for service 'local-service' (config file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg', starting on line 335)
                  Running pre-flight check on configuration data...

                  Checking services...
                  Checked 275 services.
                  Checking hosts...
                  Warning: Host 'Meta_Module' has no services associated with it!
                  Warning: Host 'ROUTSTRAT' has no services associated with it!
                  Checked 82 hosts.
                  Checking host groups...
                  Checked 6 host groups.
                  Checking service groups...
                  Checked 0 service groups.
                  Checking contacts...
                  Checked 2 contacts.
                  Checking contact groups...
                  Checked 2 contact groups.
                  Checking service escalations...
                  Checked 0 service escalations.
                  Checking service dependencies...
                  Checked 0 service dependencies.
                  Checking host escalations...
                  Checked 0 host escalations.
                  Checking host dependencies...
                  Checked 0 host dependencies.
                  Checking commands...
                  Checked 68 commands.
                  Checking time periods...
                  Checked 5 time periods.
                  Checking extended host info definitions...
                  Checked 82 extended host info definitions.
                  Checking extended service info definitions...
                  Checked 275 extended service info definitions.
                  Checking for circular paths between hosts...
                  Checking for circular host and service dependencies...
                  Checking global event handlers...
                  Checking obsessive compulsive processor commands...
                  Checking misc settings...

                  Total Warnings: 2
                  Total Errors: 0

                  Things look okay - No serious problems were detected during the pre-flight check

                  cgi.cfg - déplacement KO
                  checkcommands.cfg - déplacement KO
                  contactgroups.cfg - déplacement KO
                  contacts.cfg - déplacement KO
                  dependencies.cfg - déplacement KO
                  escalations.cfg - déplacement KO
                  hostextinfo.cfg - déplacement KO
                  hostgroups.cfg - déplacement KO
                  hosts.cfg - déplacement KO
                  misccommands.cfg - déplacement KO
                  nagios.cfg - déplacement KO
                  resource.cfg - déplacement KO
                  serviceextinfo.cfg - déplacement KO
                  servicegroups.cfg - déplacement KO
                  services.cfg - déplacement KO
                  timeperiods.cfg - déplacement KO

                  d'où peu ou peuvent venir le ou les problèmes ?

                  Comment


                  • #10
                    Est ce que les fichiers sont bien générés dans '/usr/local/oreon/filesGeneration/nagiosCFG/'?

                    Si oui qu'est ce que ca fait quand tu lance une verification dessus à la main ?
                    ..()_() .°("who | grep -i blonde | date; cd ~; unzip;")
                    =(o_0)=
                    *(() () Nicolas Verriest, France

                    Comment


                    • #11
                      nagios -v /usr/local/oreon/filesGeneration/nagiosCFG/nagios.cfg

                      Nagios 2.7
                      Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
                      Last Modified: 01-19-2007
                      License: GPL

                      Reading configuration data...

                      Error: Cannot open resource file '/usr/local/nagios/etc/resource.cfg' for readin
                      g!
                      Error: Cannot open config file '/usr/local/nagios/etc/hosts.cfg' for reading: No
                      such file or directory

                      ***> One or more problems was encountered while processing the config files...

                      Check your configuration file(s) to ensure that they contain valid
                      directives and data defintions. If you are upgrading from a previous
                      version of Nagios, you should be aware that some variables/definitions
                      may have been removed or modified in this version. Make sure to read
                      the HTML documentation regarding the config files, as well as the
                      'Whats New' section to find out what has changed.


                      comment faire étant donné que les fichiers ne sont pas présents?

                      Comment


                      • #12
                        si tu efface tous les fichiers dand ce repertoire. Et que tu les regenere est ce qu'il les regenere tous sauf ces 2 là ?

                        parceque si c'est le cas c'est surement un bug. Mais s'il n'en regenere aucun c'est soit un probleme de conf, soit de droits.
                        ..()_() .°("who | grep -i blonde | date; cd ~; unzip;")
                        =(o_0)=
                        *(() () Nicolas Verriest, France

                        Comment


                        • #13
                          je viens de trouver mon erreur qui était dans les droits pour /usr/local/nagios/ j'ai appliqué un "chmod 777 etc".

                          Nagios 2.7
                          Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
                          Last Modified: 01-19-2007
                          License: GPL

                          Reading configuration data...

                          Running pre-flight check on configuration data...

                          Checking services...
                          Checked 275 services.
                          Checking hosts...
                          Checked 80 hosts.
                          Checking host groups...
                          Checked 5 host groups.
                          Checking service groups...
                          Checked 0 service groups.
                          Checking contacts...
                          Checked 1 contacts.
                          Checking contact groups...
                          Checked 1 contact groups.
                          Checking service escalations...
                          Checked 0 service escalations.
                          Checking service dependencies...
                          Checked 0 service dependencies.
                          Checking host escalations...
                          Checked 0 host escalations.
                          Checking host dependencies...
                          Checked 0 host dependencies.
                          Checking commands...
                          Checked 68 commands.
                          Checking time periods...
                          Checked 5 time periods.
                          Checking extended host info definitions...
                          Checked 80 extended host info definitions.
                          Checking extended service info definitions...
                          Checked 275 extended service info definitions.
                          Checking for circular paths between hosts...
                          Checking for circular host and service dependencies...
                          Checking global event handlers...
                          Checking obsessive compulsive processor commands...
                          Checking misc settings...

                          Total Warnings: 0
                          Total Errors: 0

                          Things look okay - No serious problems were detected during the pre-flight check

                          cgi.cfg - déplacement OK
                          checkcommands.cfg - déplacement OK
                          contactgroups.cfg - déplacement OK
                          contacts.cfg - déplacement OK
                          dependencies.cfg - déplacement OK
                          escalations.cfg - déplacement OK
                          hostextinfo.cfg - déplacement OK
                          hostgroups.cfg - déplacement OK
                          hosts.cfg - déplacement OK
                          misccommands.cfg - déplacement OK
                          nagios.cfg - déplacement OK
                          resource.cfg - déplacement OK
                          serviceextinfo.cfg - déplacement OK
                          servicegroups.cfg - déplacement OK
                          services.cfg - déplacement OK
                          timeperiods.cfg - déplacement OK


                          ca a l'air de marcher, mais, j'ai l'impression que les services ne sont pas en route. 0 up, 0 down, 0 inaccessible, 0 en attente. tous les états sont a 0. une petite idée?

                          Comment


                          • #14
                            Tu veux dire dans la barre de resumé en haut ou alors quand tu va dans l'interface de monitoring ?
                            ..()_() .°("who | grep -i blonde | date; cd ~; unzip;")
                            =(o_0)=
                            *(() () Nicolas Verriest, France

                            Comment


                            • #15
                              dans la barre de resumé en haut et aussi dans l'interface de monitoring, je n'ai aucun hote.
                              où pourrait être le problème?

                              Comment

                              Working...
                              X