Ad Widget

Collapse

Zabbix Installing Zabbix web interface- Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aprakash
    Junior Member
    • Mar 2017
    • 21

    #1

    Zabbix Installing Zabbix web interface- Issue

    Configure DB connection tab,, we are getting this error..

    Please create database manually, and set the configuration parameters for connection to this database. Press "Next step" button when done.

    Cannot connect to the database.
    Details
    Error connecting to database:


    NoteB is already running...
  • toine7m
    Member
    • Feb 2017
    • 93

    #2
    First of all, try to connect to your DB from your zabbix server, if you can, list the tables and look if the Zabbix DB is there

    Comment

    • aprakash
      Junior Member
      • Mar 2017
      • 21

      #3
      connect to DB from zabbix server

      Originally posted by toine7m
      First of all, try to connect to your DB from your zabbix server, if you can, list the tables and look if the Zabbix DB is there
      i am able to connect to DB server from my Zabbix server host

      However, i am not able to start zabbix server.. it gives below error

      11235:20170330:082621.484 In DBcheck_version()
      11235:20170330:082621.484 In DBconnect() flag:0
      11235:20170330:082621.504 query without transaction detected
      11235:20170330:082621.504 query [txnlev:0] [alter session set nls_numeric_characters='. ']
      11235:20170330:082621.504 End of DBconnect():0
      11235:20170330:082621.504 query [txnlev:0] [select 1 from tab where tabtype='TABLE' and lower(tname)='dbversion']
      11235:20170330:082621.517 query [txnlev:0] [select mandatory,optional from dbversion]
      11235:20170330:082621.520 Cannot get the database version. Exiting ...


      when i check DB side.. i see TABLE Exists.. what else required ?
      SQL> select * from session_privs;

      PRIVILEGE
      ----------------------------------------
      CREATE SESSION
      CREATE TABLE
      CREATE PROCEDURE

      SQL> select 1 from tab where tabtype='TABLE' and lower(tname)='dbversion';

      1
      ----------
      1

      SQL> select * from DBVERSION;

      no rows selected

      SQL> desc DBVERSION
      Name Null? Type
      ----------------------------------------- -------- ----------------------------
      MANDATORY NOT NULL NUMBER(10)
      OPTIONAL NOT NULL NUMBER(10)

      SQL> show user
      USER is "ZABBIXPOC"

      Comment

      • toine7m
        Member
        • Feb 2017
        • 93

        #4
        Hi,

        Did you import the initial schema to the database after the creation of the 'Zabbix' table ?

        Code:
        zcat /usr/share/doc/zabbix-server-pgsql/create.sql.gz | psql -U <username> zabbix
        I suppose that you're using PostgreSQL ?

        Comment

        • aprakash
          Junior Member
          • Mar 2017
          • 21

          #5
          We are using OracleDB

          We are using Oracle Database

          Oracle Database 11g Enterprise Edition Release 11.2.0.4.0

          Yes. We created all below scripts

          data.sql images.sql schema.sql

          Comment

          • toine7m
            Member
            • Feb 2017
            • 93

            #6
            I think there's a problem with your scripts, but it's out of my scope I'm sorry :/

            Comment

            • aprakash
              Junior Member
              • Mar 2017
              • 21

              #7
              DB scripts

              Thanks. i will check the scripts

              Comment

              • aprakash
                Junior Member
                • Mar 2017
                • 21

                #8
                sql scripts are fixed

                i have fixed the scripts from DB side.. Now i am able to start the zabbix server successfully

                netstat -an | grep 10051
                tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN

                /usr/sbin/lsof -i:10051
                COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
                zabbix_se 6796 orainst 6u IPv4 9486273 0t0 TCP *:zabbix-trapper (LISTEN)
                zabbix_se 6797 orainst 6u IPv4 9486273 0t0 TCP *:zabbix-trapper (LISTEN)
                zabbix_se 6798 orainst 6u IPv4 9486273 0t0 TCP *:zabbix-trapper (LISTEN)
                zabbix_se 6799 orainst 6u IPv4 9486273 0t0 TCP *:zabbix-trapper (LISTEN)


                Still i am facing same issue while connecting from browser

                Cannot connect to the database.
                Details
                Error connecting to database:

                Comment

                • toine7m
                  Member
                  • Feb 2017
                  • 93

                  #9
                  what does your DB log files says ? I think there's a problem of rights on the DB or a problem of user I think

                  Comment

                  • aprakash
                    Junior Member
                    • Mar 2017
                    • 21

                    #10
                    Setup details

                    Let me explain the setup

                    I have installed Apache and zabbix server in Host1

                    1) I have started the Zabbix server after fixing the issue in DB side

                    zabbix server is running with user "orainst"

                    Zabbix servers logs are processing with below

                    6816:20170403:080505.693 In DCsync_history() history_num:0
                    6816:20170403:080505.693 In flush_correlated_events() events_num:0
                    6816:20170403:080505.693 End of flush_correlated_events() events_num:0
                    6816:20170403:080505.693 __zbx_zbx_setproctitle() title:'history syncer #1 [synced 0 items in 0.000052 sec, idle 1 sec]'
                    6801:20170403:080505.819 __zbx_zbx_setproctitle() title:'poller #3 [got 0 values in 0.000120 sec, getting values]'
                    6801:20170403:080505.819 In get_values()
                    6801:20170403:080505.819 In DCconfig_get_poller_items() poller_type:0
                    6801:20170403:080505.819 End of DCconfig_get_poller_items():0
                    6801:20170403:080505.819 In DCconfig_get_poller_nextcheck() poller_type:0
                    6801:20170403:080505.819 End of DCconfig_get_poller_nextcheck():-1
                    6801:20170403:080505.819 End of get_values():0
                    6801:20170403:080505.819 __zbx_zbx_setproctitle() title:'poller #3 [got 0 values in 0.000103 sec, idle 5 sec]'


                    2)To configure Web interface, My apache server is running in Host1
                    As per document, i have placed the PHP contents and trying to configure web interface
                    Note: My apache web server also running with user " orainst"

                    [Mon Apr 03 07:26:08.697933 2017] [mpm_event:notice] [pid 7960:tid 140634831210240] AH00489: Apache/2.4.25 (Unix) PHP/5.6.30 configured -- resuming normal operations
                    [Mon Apr 03 07:26:08.698005 2017] [core:notice] [pid 7960:tid 140634831210240] AH00094: Command line: '/tools/appsw/oracle/apache/bin/httpd'


                    3)Oracle DB server is running on Host2
                    As per your comment "I think there's a problem of rights on the DB or a problem of user I think ?
                    what rights i need to check here?

                    i am getting connection error from my chrome browser
                    Do we have any log trace we can enable to troubleshoot web interface configure DB issue ?

                    Comment

                    • toine7m
                      Member
                      • Feb 2017
                      • 93

                      #11
                      I don't know if there is a trace for DB, but I know there's a logLevel in the conf you can try by setting it at 3 to see more details.

                      When you created your DB with the zabbix schema, you've to create a user, in your case it's orainst, and give him the admin rights on the Zabbix DB. Did you do that in the host part of Oracle ?

                      Comment

                      • aprakash
                        Junior Member
                        • Mar 2017
                        • 21

                        #12
                        Dbuser

                        less zabbix_server.conf | grep -i DBuser
                        # For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.
                        ### Option: DBUser
                        # DBUser=
                        DBUser=ZABBIXPOC


                        I have already set Debug level as
                        DebugLevel=5

                        Now, issue is only i am not able to configure web interface from browser

                        Comment

                        Working...