Re: ONMS do not send notification

Jonathan Heard <[email protected]>
Newsgroups gmane.network.opennms.general
Message-ID <[email protected]>
Hi,

   This seems like it's a problem with the query being sent to Postgres. 
The sequence is called notifynxtid but the SELECT statement has a space 
character in the middle of it: e.g. 'not ifynxtid'

On my database (you can do this if you're on linux with 'su postgres -c 
psql' and '\c opennms'):

opennms=# SELECT * FROM  notifynxtid;
  sequence_name | last_value | start_value | increment_by | 
max_value      | min_value | cache_value | log_cnt | is_cycled | is_called
---------------+------------+-------------+--------------+---------------------+-----------+-------------+---------+-----------+-----------
  notifynxtid   |       1132 |           1 |            1 | 
9223372036854775807 |         1 |           1 |      31 | f         | t

opennms=# SELECT nextval('he llo');
ERROR:  invalid name syntax
LINE 1: SELECT nextval('he llo');
                        ^
opennms=# SELECT nextval('hello');
ERROR:  relation "hello" does not exist
LINE 1: SELECT nextval('hello');

I would suggest that you take a look at 
/etc/opennms/notifd-configuration.xml because there's an attribute which 
this select statement can be configured - perhaps you've inadvertently 
inserted a space?

e.g.

/next-notif-id="SELECT nextval('notifynxtid')"/


HTH
Jonathan

On 03/11/17 14:58, Dinh-Thanh Ngo wrote:
> Hi everyone ,
> I have problem ONMS  do not send notification
> I get in the notifd.log
> 2017-11-03 14:25:26,406 <tel:03142526406> ERROR 
> [Notifd:BroadcastEventProcessor-Thread] 
> o.o.n.n.BroadcastEventProcessor: Failed to get a unique id # for 
> notification, exiting this notification
> org.postgresql.util.PSQLException: ERROR: invalid name syntax
>   Position: 16
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:305) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:291) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:269) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:236) 
> ~[postgresql-9.4.1211.jar:9.4.1211]
>         at 
> com.zaxxer.hikari.pool.ProxyStatement.executeQuery(ProxyStatement.java:111) 
> ~[HikariCP-2.5.1.jar:?]
>         at 
> com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery(HikariProxyStatement.java) 
> ~[HikariCP-2.5.1.jar:?]
>         at 
> org.opennms.netmgt.config.NotificationManager.getNxtId(NotificationManager.java:443) 
> ~[opennms-config-20.1.0.jar:?]
>         at 
> org.opennms.netmgt.config.NotificationManager.getNoticeId(NotificationManager.java:416) 
> ~[opennms-config-20.1.0.jar:?]
>         at 
> org.opennms.netmgt.notifd.BroadcastEventProcessor.scheduleNoticesForEvent(BroadcastEventProcessor.java:524) 
> [opennms-services-20.1.0.jar:?]
>         at 
> org.opennms.netmgt.notifd.BroadcastEventProcessor.onEvent(BroadcastEventProcessor.java:208) 
> [opennms-services-20.1.0.jar:?]
>         at 
> org.opennms.netmgt.eventd.EventIpcManagerDefaultImpl$EventListenerExecutor$2.run(EventIpcManagerDefaultImpl.java:183) 
> [org.opennms.features.events.daemon-20.1.0.jar:?]
> I get in the postgresql-Fri.log
> ERROR:  invalid name syntax at character 16
> STATEMENT:  SELECT nextval('not ifynxtid')
> ERROR:  invalid name syntax at character 16
> STATEMENT:  SELECT nextval('not ifynxtid')
> ERROR:  invalid name syntax at character 16
> STATEMENT:  SELECT nextval('not ifynxtid'
> I need tipps from everyone
> thanks
> Thanh
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
> _______________________________________________
> Please read the OpenNMS Mailing List FAQ:
> http://www.opennms.org/index.php/Mailing_List_FAQ
>
> opennms-discuss mailing list
>
> To *unsubscribe* or change your subscription options, see the bottom of this page:
> https://lists.sourceforge.net/lists/listinfo/opennms-discuss

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.