ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-5526

WARNING: nonstandard use of \\ in a string literal - zabbix-2.0.2 + postgresql

    Details

    • Type: Incident report Incident report
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.11, 2.2.2, 2.3.0
    • Component/s: Proxy (P), Server (S)
    • Environment:
      Scientific Linux release 6.3 (Carbon)
      postgresql92-9.2-beta4_1PGDG.rhel6.x86_64
      zabbix-proxy

      Description

      cut from debug log of zabbix-proxy:

       29846:20120831:093726.059 query [txnlev:1] [begin;]
       29846:20120831:093726.059 In DCmass_proxy_add_history()
       29846:20120831:093726.060 query [txnlev:1] [insert into proxy_history (itemid,clock,ns,value,status) values (23781,1346391441,904778055,'99.933775',0),(23661,1346391441,905176630,'0.000000',0),(23541,1346391441,905587324,'0.597015',0),(23421,1346391441,905979616,'94.204979',0),(23841,1346391441,907285562,'{
      	"data":[
      		{
      			"{#IFNAME}":"lo"},
      		{
      			"{#IFNAME}":"eth0"},
      		{
      			"{#IFNAME}":"eth1"},
      		{
      			"{#IFNAME}":"venet0"}]}',0),(23782,1346391442,909865709,'0.000000',0),(23662,1346391442,910839557,'0.000000',0),(23842,1346391442,912319331,'{
      	"data":[
      		{
      			"{#FSNAME}":"\\/",
      			"{#FSTYPE}":"ext3"},
      		{
      			"{#FSNAME}":"\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/proc\\/bus\\/usb",
      			"{#FSTYPE}":"usbfs"},
      		{
      			"{#FSNAME}":"\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/boot",
      			"{#FSTYPE}":"ext2"},
      		{
      			"{#FSNAME}":"\\/dev\\/shm",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/401",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/401\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/401\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/402",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/402\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/402\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/401\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/401\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/401\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/403",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/403\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/403\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/402\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/402\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/404",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/404\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/404\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/403\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/403\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/405",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/405\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/405\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/404\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/406",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/406\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/406\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/404\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/405\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/405\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/405\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/406\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/406\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/406\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/410",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/410\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/410\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/410\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/410\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/410\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/411",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/411\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/411\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/411\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/411\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/411\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/407",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/407\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/407\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/407\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/407\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/407\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/408",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/408\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/408\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/408\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/408\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/408\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/409",
      			"{#FSTYPE}":"simfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/409\\/proc",
      			"{#FSTYPE}":"proc"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/409\\/sys",
      			"{#FSTYPE}":"sysfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/409\\/dev",
      			"{#FSTYPE}":"tmpfs"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/409\\/dev\\/pts",
      			"{#FSTYPE}":"devpts"},
      		{
      			"{#FSNAME}":"\\/vz\\/root\\/409\\/proc\\/sys\\/fs\\/binfmt_misc",
      			"{#FSTYPE}":"binfmt_misc"}]}',0),(23542,1346391442,912731552,'0.298458',0),(23902,1346391442,913194342,'868589568',0),(23482,1346391442,913641604,'1',0),(23663,1346391443,915720694,'0.000000',0),(23783,1346391443,916320170,'0.000000',0),(23423,1346391443,918359603,'1244475392',0),(23784,1346391444,920555567,'0.000000',0),(23664,1346391444,920970744,'0.016626',0),(23544,1346391444,922628816,'1346391444',0),(23964,1346391444,924782093,'891518558208',0),(23665,1346391445,925090834,'0.016626',0),(23785,1346391445,925522246,'0.000000',0),(23545,1346391445,929711368,'1072775168',0),(23903,1346391446,3127196,'238439161577',0);
      ]
      WARNING:  nonstandard use of \\ in a string literal
      LINE 10: ...91442,910839557,'0.000000',0),(23842,1346391442,912319331,'{
                                                                            ^
      HINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
       29846:20120831:093726.062 End of DCmass_proxy_add_history()
      
      

        Activity

        Hide
        Ilyas added a comment -

        log

        Show
        Ilyas added a comment - log
        Hide
        Alexander Vladishev added a comment -

        Please check the PostgreSQL client (dev) version. It should be the same with the PostgreSQL server.

        Show
        Alexander Vladishev added a comment - Please check the PostgreSQL client (dev) version. It should be the same with the PostgreSQL server.
        Hide
        Ilyas added a comment -

        Which actions I need to do for check?

        Please explain what you need.

        Thanks.

        Show
        Ilyas added a comment - Which actions I need to do for check? Please explain what you need. Thanks.
        Hide
        Alexei Vladishev added a comment -

        Try to execute this command on Zabbix server side and post result here:

        rpm -qa | grep -i postgres

        Show
        Alexei Vladishev added a comment - Try to execute this command on Zabbix server side and post result here: rpm -qa | grep -i postgres
        Hide
        Ilyas added a comment -
        1. rpm -qa | grep -i postgres
          postgresql92-9.2-beta3_1PGDG.rhel6.x86_64
          postgresql92-contrib-9.2-beta3_1PGDG.rhel6.x86_64
          postgresql92-libs-9.2-beta3_1PGDG.rhel6.x86_64
          postgresql92-server-9.2-beta3_1PGDG.rhel6.x86_64

        (there are packages from official postgresql RPM repo)

        Show
        Ilyas added a comment - rpm -qa | grep -i postgres postgresql92-9.2-beta3_1PGDG.rhel6.x86_64 postgresql92-contrib-9.2-beta3_1PGDG.rhel6.x86_64 postgresql92-libs-9.2-beta3_1PGDG.rhel6.x86_64 postgresql92-server-9.2-beta3_1PGDG.rhel6.x86_64 (there are packages from official postgresql RPM repo)
        Hide
        Alexander Vladishev added a comment -

        Related issue: ZBX-4376

        Show
        Alexander Vladishev added a comment - Related issue: ZBX-4376
        Hide
        Igors Homjakovs (Inactive) added a comment - - edited

        This issue could be reproduced is the function PQserverVersion() was made unavailable. One of the possible reasons of this issue is missing libpq library or if the older version (<8.0) of this library was used.

        Therefore, It was decided to remove support of older versions of PosgreSQL since documentation says that version 2.0 support v8.1 or later.

        Show
        Igors Homjakovs (Inactive) added a comment - - edited This issue could be reproduced is the function PQserverVersion() was made unavailable. One of the possible reasons of this issue is missing libpq library or if the older version (<8.0) of this library was used. Therefore, It was decided to remove support of older versions of PosgreSQL since documentation says that version 2.0 support v8.1 or later.
        Hide
        Igors Homjakovs (Inactive) added a comment -

        Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-5526

        Show
        Igors Homjakovs (Inactive) added a comment - Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-5526
        Hide
        Igors Homjakovs (Inactive) added a comment - - edited

        Fixed in 2.0.11rc1 r41440, 2.2.2rc1 r41441, 2.3.0 (trunk) r41442

        Show
        Igors Homjakovs (Inactive) added a comment - - edited Fixed in 2.0.11rc1 r41440, 2.2.2rc1 r41441, 2.3.0 (trunk) r41442
        Hide
        Alexander Vladishev added a comment - - edited

        Regression:

        Too many SQL errors with failed connection to the PostgreSQL.

          8366:20140128:173146.978 [Z3005] query failed: [0] result is NULL [set escape_string_warning to off]
          8366:20140128:173146.978 In DBconnect() flag:0
          8366:20140128:173146.978 [Z3001] connection to database 'zabbix' failed: [0] could not connect to server: No such file or directory
                Is the server running locally and accepting
                connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
        
        ...
        

        Alexander Vladishev RESOLVED in r41938 (branches/2.0), r41939 (branches/2.2) and r41940 (trunk)

        Aleksandrs Saveljevs Additionally, I have fixed a typo in the original change log entry in r41975 and r41976. CLOSED.

        Show
        Alexander Vladishev added a comment - - edited Regression: Too many SQL errors with failed connection to the PostgreSQL. 8366:20140128:173146.978 [Z3005] query failed: [0] result is NULL [set escape_string_warning to off] 8366:20140128:173146.978 In DBconnect() flag:0 8366:20140128:173146.978 [Z3001] connection to database 'zabbix' failed: [0] could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? ... Alexander Vladishev RESOLVED in r41938 (branches/2.0), r41939 (branches/2.2) and r41940 (trunk) Aleksandrs Saveljevs Additionally, I have fixed a typo in the original change log entry in r41975 and r41976. CLOSED.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ilyas
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: