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. Server may crush when working with strings

Server may crush when working with strings

Scheduled Pinned Locked Moved Support
7 Posts 3 Posters 15.0k 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.
  • M
    M
    Mongi
    wrote on last edited by
    #1

    We are planning to use NetXMS with our custom push-type counters. All numeric counters seem to work well, but string one has some problems.

    First of all, they are limited to 255 chars (according to database configuration). Moreover, they can cause server to crush due to lack of string NULL-terminator.

    Way to reproduce:

    1. Create DCI, Parameter:Test, Type: string; Origin: Push Agent
    2. Excute:

    C:\NetXMS\bin>nxpush.exe -H localhost -u user -P pass host.local:Test=123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789

    (it is string with 300+ symbols)
    3) Open "Last values" -- here you will see probably all of string
    4) Open "Show history" -- here are 2 possibilities:
      a) server crush and you wont see anything
      b) you are lucky to see first 127 symbols and a bunch of garbage from server memory till first NULL-symbol

    Server 1.0.4, Windows; DB: MSSQL

    In spite of server crush, Is there a way work with strings longer than 127 symbols?

    1 Reply Last reply
    0
    • A
      A
      Alex Kirhenshtein
      wrote on last edited by
      #2

      Thank you for the report, we will check it ASAP.

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

        I have fixed this bug. Fix will be included in next release.

        Best regards,
        Victor

        1 Reply Last reply
        0
        • M
          M
          Mongi
          wrote on last edited by
          #4

          Thanks for fast reply!

          In addition, there is another problem with strings: some special chars get escaped on push, but never decoded in History.

          For example:

          C:\NetXMS\bin>nxpush.exe -H localhost -u user -P pass host.local:Test=\\//!@#$%^&*

          Will be saved and showed as

          #5C#5C//!@#23$#25&*

          Also, if you add non-english characters, then they are showed as they were UTF8 encoded, so "ЙЦУКЕН" will become "ЙЦУКЕН". You are using simple varchar type in MSSQL in order to store values and it will be better to switch to nvarchar, or there are limitations from other DB engines?

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

            Character escaping bug fixed as well. I agree that we should switch to nvarchar from varchar in MS SQL, and we definitely will do that, but it's a major change, which will require careful examination of many SQL statements within existing code.

            Best regards,
            Victor

            1 Reply Last reply
            0
            • M
              M
              Mongi
              wrote on last edited by
              #6

              Hello again!

              I'm not sure weather it's a new bug or it has been already fixed, so I decided to write about it anyway.

              When we try to set description of any DCI with non-english and non-russian language the description is saved as "?" symbols, for example: نوع محل or 测试服务 will be saved as "????".

              Same behavior in "Parameter" field of DCI.

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

                It's because server not working with UNICODE texts. All texts coming from client (in UNICODE) converted to server's code page, which is set by CodePage parameter in netxmsd.conf. You can try to set codepage to UTF-8, but it may or may not work.

                Best regards,
                Victor

                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