hbakkum / rundeck-hipchat-plugin

Sends rundeck notification messages to a HipChat room
Apache License 2.0
15 stars 15 forks source link

Seeing weird error in logs #10

Closed jennyfountain closed 7 years ago

jennyfountain commented 8 years ago

I am seeing this error in my rundeck logs:

com.hbakkum.rundeck.plugins.hipchat.HipChatNotificationPlugin.postNotification(HipChatNotificationPlugin.java:137) ERROR NotificationService: Error sending notification: Notification{eventTrigger='onfailure', type='HipChatNotification', content='{"room":"xx"}'}: class com.hbakkum.rundeck.plugins.hipchat.HipChatNotificationPluginException: Error merging HipChat notification message template: [Expression execution.context.job.username is undefined on line 12, column 17 in hipchat-message.ftl.]. com.hbakkum.rundeck.plugins.hipchat.HipChatNotificationPluginException: Error merging HipChat notification message template: [Expression execution.context.job.username is undefined on line 12, column 17 in hipchat-message.ftl.].

The job does post to the hipchat room so I am not sure exactly why the user isn't being set. Is this a known issue?

hbakkum commented 8 years ago

Hi Jenny,

What version of the plugin and rundeck are you using so that I can try and reproduce?

Thanks, Hayden

jennyfountain commented 8 years ago

2.6.1-1 java 1.8 rundeck-hipchat-plugin-1.5.0.jar

Let me know if you need anything else.

jennyfountain commented 8 years ago

any thoughts?

hbakkum commented 8 years ago

Thanks for the info Jenny and apologies for the delay - will take a look at this today.

hbakkum commented 8 years ago

Hi Jenny,

I've not been able to reproduce this issue with the plugin/rundeck versions you gave. Have you configured rundeck with a different authentication mechanism (ldap, pam, etc)? Or are you just using the default settings for this?

Cheers, Hayden

jennyfountain commented 8 years ago

Hi, Thank you for getting back to me. Yes, we are using ldap.

Thank you!

jennyfountain commented 8 years ago

Any thoughts on this issue? Is it because of ldap?

hbakkum commented 8 years ago

Hey Jenny,

Just got back from holiday - will take a look at this in the next few days.

Cheers, Hayden

hbakkum commented 8 years ago

Hey Jenny,

Have tried this now with ldap authentication and still unable to reproduce. I take it that when your seeing that error in the log file that your also not seeing the username appear in the room notification too?

Is there any other custom configuration in your rundeck installation?

One thing you could try is making a custom build of the plugin and logging out the template model in HipChatNotificationMessageGenerator - you should be able to just replace the 1.5.0 release of the plugin with the snapshot build. You could then send me the logged template model and I could take a look. It may not help uncover the reason for your error, but it could expose another model attribute that is holding the username that you could use in a custom template as a workaround.

Cheers, Hayden