objectrocket / ansible-hadoop

Ansible playbooks for deploying Hortonworks Data Platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

500 error from Ambari API when registering alert_targets with the Ambari server

magglass1 opened this issue · comments

If you run the task "Register the alert_targets with the Ambari server" more than once you get a 500 error like the following on subsequent runs:

failed: [master03] => {"content": "{\n "status": 500,\n "message": "Exception [EclipseLink-4002](Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException\nInternal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint \"alert_target_target_name_key\"\nError Code: 0\nCall: INSERT INTO alert_target (target_id, DESCRIPTION, is_global, notification_type, PROPERTIES, target_name) VALUES (?, ?, ?, ?, ?, ?)\n\tbind => [6 parameters bound]\nQuery: DataModifyQuery(sql=\"INSERT INTO alert_target_states (target_id, alert_state) VALUES (?, ?)\")"\n}", "content_length": "622", "content_type": "text/plain;charset=ISO-8859-1", "failed": true, "redirected": false, "server": "Jetty(7.6.7.v20120910)", "set_cookie": "AMBARISESSIONID=xxx;Path=/", "status": 500}
msg: Status code was not [200, 201, 202]