Пропадают настройки при выключении сервера.
-
Виктор, вроде нашел в чем проблема, точней первую ошибку после которой он начинает пробрасывать запросы.
Не хватает кавычки в первом UPDATE.
вот кусок лога:LOG: database system was interrupted; last known up at 2010-02-08 16:12:21 MSK LOG: database system was not properly shut down; automatic recovery in progress LOG: redo starts at E6/F0E62E40 LOG: record with zero length at E6/F1611F24 LOG: redo done at E6/F1611EE4 LOG: last completed transaction was at log time 2010-02-08 16:12:12.672469+03 LOG: autovacuum launcher started LOG: database system is ready to accept connections >>>>>>>>>>>>>>> ERROR: unterminated quoted string at or near "'N 00" at character 328 #вот в этом месте STATEMENT: UPDATE object_properties SET name='Entire Network',status=4,is_deleted=0,inherit_access_rights=1,last_modified=1265634909,status_calc_alg=0,status_prop_alg=0,status_fix ed_val=1,status_shift=0,status_translation='01020304',status_single_threshold=75,status_thresholds='503C2814',comments='',is_system=0,location_type=0,latitude='N 00[/b] ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: DELETE FROM acl WHERE object_id=1 ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: SELECT object_id FROM object_properties WHERE object_id=2 ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: DELETE FROM container_members WHERE container_id=2 ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: DELETE FROM acl WHERE object_id=2 ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: SELECT object_id FROM object_properties WHERE object_id=11 ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: SELECT id FROM templates WHERE id=11 ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: INSERT INTO templates (id,version,enable_auto_apply,apply_filter) VALUES (11,65536,0,'#00') ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: DELETE FROM dct_node_map WHERE template_id=11 ERROR: current transaction is aborted, commands ignored until end of transaction blockкак исправить сие ?
-
Sdelaju vecherom patch i vilozu. Spasibo

Viktor
-
Ochen' stranno - vrode kak ispravlena uze eta oshibka. Sravnite pozalujsta fail src/server/core/netobj.cpp s prilozennim. Esli oni ne sovpadajut, zamenite na prilozennij i peresoberite server.
-
пересобрал с Вашим файлом netobj.cpp - проблема сохранилась. вот кусок лога pg_sql:
LOG: received smart shutdown request
LOG: autovacuum launcher shutting down
LOG: shutting down
LOG: database system is shut down
LOG: database system was shut down at 2010-02-11 10:47:49 MSK
LOG: autovacuum launcher started
LOG: database system is ready to accept connections
ERROR: unterminated quoted string at or near "'N 00" at character 328
STATEMENT: UPDATE object_properties SET name='Entire Network',status=4,is_deleted=0,inherit_access_rights=1,last_modified=1265874505,status_calc_alg=0,status_prop_alg=0,status_fixed_val=1,status_shift=0,status_translation='01020304',status_single_threshold=75,status_thresholds='503C2814',comments='',is_system=0,location_type=0,latitude='N 00
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DELETE FROM acl WHERE object_id=1
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: SELECT object_id FROM object_properties WHERE object_id=2
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DELETE FROM container_members WHERE container_id=2
ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: DELETE FROM acl WHERE object_id=2 -
Poprobujte zapustit' server s kljucom -D 9 (togda budet pisat'sja mnogo debug informacii, vkljuchaja i sql zaprosi) i prislat' log servera pered vipolneniem etogo sql zaprosa (vkljuchaja i sam zapros).
I kakaja versija PostgreSQL i operacionki? -
версия линукса и postgres :
[root@monitor local]# /usr/local/pgsql/bin/postgres --version
postgres (PostgreSQL) 8.3.3
[root@monitor local]# uname -a
Linux monitor.int.rapida.ru 2.6.25-14.fc9.i686 #1 SMP Thu May 1 06:28:41 EDT 2008 i686 i686 i386 GNU/Linux
[root@monitor local]#файл лога прикреплен. Ошибка возникает в самом первом запросе, сразу после старта сервера. т.е. первая строчка в логе.
-
-
теперь вот такая ошибка :
11-Feb-2010 15:39:25] Log file opened
[11-Feb-2010 15:39:25] Platform subagent "/usr/local/netxms/lib/libnsm_linux.so" successfully loaded
[11-Feb-2010 15:39:25] Database driver "/usr/local/netxms/lib/libnxddr_pgsql.so" loaded and initialized successfully
[11-Feb-2010 15:39:33] Listening for SNMP traps on UDP socket 0.0.0.0:162
[11-Feb-2010 15:39:33] NetXMS Server started
[11-Feb-2010 15:39:33] Listening for client connections on TCP socket 0.0.0.0:4701
[11-Feb-2010 15:42:33] SQL query failed (Query = "UPDATE object_properties SET name='Подключение по л▒',status=0,is_deleted=0,inherit_access_rights=1,last_modified=1265892116,status_calc_alg=0,status_prop_alg=0,status_fixed_val=1,status_shift=0,status_translation='01020304',status_single_threshold=75,status_thresholds='503C2814',comments='',is_system=0,location_type=0,latitude**='0.000000',longitude='0.000000' WHERE object_id=1374"): ERROR: unterminated quoted string at or near "'Подключение по л"
LINE 1: UPDATE object_properties SET name='Подключение по л**
^
[11-Feb-2010 15:42:33] SQL query failed (Query = "SELECT id FROM interfaces WHERE id=1374"): ERROR: current transaction is aborted, commands ignored until end of transaction block
[11-Feb-2010 15:42:33] SQL query failed (Query = "INSERT INTO interfaces (id,ip_addr,ip_netmask,node_id,if_type,if_index,mac_addr,synthetic_mask,required_polls) VALUES (1374,'192.168.5.12','255.255.255.0',1103,6,65539,'00304866C4E3',0,0)"): ERROR: current transaction is aborted, commands ignored until end of transaction block
[11-Feb-2010 15:42:33] SQL query failed (Query = "DELETE FROM acl WHERE object_id=1374"): ERROR: current transaction is aborted, commands ignored until end of transaction block
[11-Feb-2010 15:42:33] SQL query failed (Query = "SELECT object_id FROM object_properties WHERE object_id=1531"): ERROR: current transaction is aborted, commands ignored until end -
Poprobujte zamenit' src/server/dbdrv/pgsql/pgsql.cpp na prilozennij.
A v kakoj kodirovke sdelana baza? Esli zamena pgsql.cpp ne pomozet i kodirovka bazi ne UTF8, poprobujte sozdat' bazu s UTF8 kodirovkoj.
-
-
-
A kakie oshibki ostalis' v loge?
-
Вы не поверите , но старые, но мало. т.е. они не блокирую прохождение других sql запросов (не знаю, скорей всего после сборки с новым pgsql.cpp)
нынешний лог в полном составе (т.е. больше не растет и ошибок больше нет) ошибки генерит только при старте сервера и выглядит вот так :[12-Feb-2010 09:34:18] Log file opened [12-Feb-2010 09:34:18] Platform subagent "/usr/local/netxms/lib/libnsm_linux.so" successfully loaded [12-Feb-2010 09:34:18] Database driver "/usr/local/netxms/lib/libnxddr_pgsql.so" loaded and initialized successfully [12-Feb-2010 09:35:00] Listening for SNMP traps on UDP socket 0.0.0.0:162 [12-Feb-2010 09:35:00] NetXMS Server started [12-Feb-2010 09:35:00] Listening for client connections on TCP socket 0.0.0.0:4701 [12-Feb-2010 09:38:03] SQL query failed (Query = "UPDATE object_properties SET name='Подключение по л<D0>',status=0,is_deleted=0,inherit_access_rights=1,last_modified=1265956683,status_calc_alg=0,status_prop_alg=0,status_fixed_val=1,status_shift=0,status_translation='01020304',status_single_threshold=75,status_thresholds='503C2814',comments='',is_system=0,location_type=0,latitude='0.000000',longitude='0.000000' WHERE object_id=1374"): ERROR: unterminated quoted string at or near "'Подключение по л" LINE 1: UPDATE object_properties SET name='Подключение по л ^ [12-Feb-2010 09:38:03] SQL query failed (Query = "SELECT id FROM interfaces WHERE id=1374"): ERROR: current transaction is aborted, commands ignored until end of transaction block [12-Feb-2010 09:38:03] SQL query failed (Query = "INSERT INTO interfaces (id,ip_addr,ip_netmask,node_id,if_type,if_index,mac_addr,synthetic_mask,required_polls) VALUES (1374,'192.168.5.12','255.255.255.0',1103,6,65539,'00304866C4E3',0,0)"): ERROR: current transaction is aborted, commands ignored until end of transaction block [12-Feb-2010 09:38:03] SQL query failed (Query = "DELETE FROM acl WHERE object_id=1374"): ERROR: current transaction is aborted, commands ignored until end of transaction block [12-Feb-2010 09:38:03] SQL query failed (Query = "SELECT object_id FROM object_properties WHERE object_id=1638"): ERROR: current transaction is aborted, commands ignored until end of transaction block [12-Feb-2010 09:38:03] SQL query failed (Query = "SELECT id FROM interfaces WHERE id=1638"): ERROR: current transaction is aborted, commands ignored until end of transaction block [12-Feb-2010 09:38:03] SQL query failed (Query = "INSERT INTO interfaces (id,ip_addr,ip_netmask,node_id,if_type,if_index,mac_addr,synthetic_mask,required_polls) VALUES (1638,'192.168.2.4','255.255.255.0',373,6,65539,'003005989DE8',0,0)"): ERROR: current transaction is aborted, commands ignored until end of transaction block [12-Feb-2010 09:38:03] SQL query failed (Query = "DELETE FROM acl WHERE object_id=1638"): ERROR: current transaction is aborted, commands ignored until end of transaction block
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