Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Problem to store Last values into database.

Problem to store Last values into database.

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 25.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V
    V
    vargaata
    wrote on last edited by
    #1

    I upgraded my Slackware installation from 14.2 to the latest and NetXMS from 2.0.7 to 2.2.7. During the upgrade I had to delete netxms database: DROP DATABASE netxms; . I compiled NetXMS from source with following options: ./configure --with-server --with-agent --with-snmp --with-mariadb --disable-mqtt --disable-ipv6.
    After I created the new database, NetXMS started correctly, but not saving any real data from "Last values". It stores values with 01.01.1970 01:00:00 Time Stamp and 0 Value.

    There are no errors reported in MariaDB and NetXMS logfiles. MariaDB version is: 10.3.8.

    Can somebody help me, what to check, please?

    1 Reply Last reply
    0
    • V
      V
      vargaata
      wrote on last edited by
      #2

      The strange thing is, when I do a query with mysql CLI from database, for examle: SELECT idata_timestamp,idata_value FROM netxms.idata_114 WHERE item_id = 109; I can see the correct values with timestamp. Do not know how to translate idata_timestamp to real date and time yet, but idata_value is correct.

      It looks like, the data stored correcly in the database, just the NetXms client (PC and Mobile) cannot display it.

      Thanks.

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hi,

        it's problem with reading data from database, not with storing. It is caused by bug in MariaDB client library https://jira.mariadb.org/browse/CONC-281. It is supposed to be fixed in latest client version, but could be not. Our MariaDB driver has check for client version that activates workaround - maybe it erroneously assumes version number where this issue was fixed. You can try to find the following lines in src/db/dbdrv/mariadb/mariadb.cpp:

        /* workaround for MariaDB C Connector bug CONC-281 */
        if (mysql_get_client_version() < 100209)  // for any client before 10.2.9
        {
            mysql_stmt_store_result(hStmt->statement);
        }
        

        and comment out version check so it will look like this:

        /* workaround for MariaDB C Connector bug CONC-281 */
        //if (mysql_get_client_version() < 100209)  // for any client before 10.2.9
        {
            mysql_stmt_store_result(hStmt->statement);
        }
        

        then recompile MariaDB driver.

        Best regards,
        Victor

        1 Reply Last reply
        0
        • V
          V
          vargaata
          wrote on last edited by
          #4

          Hello Victor,

          Thanx for your answer. I followed your suggestion and modified the source file. It was successful. I can see stored values now.

          Thank you very much,
          Best regards,
          Attila.

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups