Summary

During an integration attempt between Aqua and JFrog Artifactory,  we used the OOTB webhook.groovy from our documentation, created/modified an image/TAG,  yet nothing happened on the Aqua side. 


Problem

The webhook does not work. There is a very good chance of getting this error message when we check the JFrog Artifactory Server STDOUT messages: 

java.lang.NullPointerException: Cannot invoke method openConnection() on null object


Cause

This problem is due to the groovy plugin configuration.


Solution

We can fix this by modifying the webhook.groovy file as follows: 

  1. Update line 630 from:


def urlConn = new URL(hostname).openConnection().connect()

 

to:


def urlConn = new URL(hostname).openConnection()

 

2.  Stop the Artifactory before the change and start it again after you make the change.  It will not load the updated file. It will create a swap (tmp) file instead.


NOTES: Here are some issues that our customers face when trying to integrate JFrog Artifactory with Aqua.


  • When I click test connection, it fails, and I see the following: 

    • After checking with the customer for the full Integration screen, we received the following: 
      (which means that they did not chose the correct Integration and they left it with the default:  “Docker Registry…”.) 

  • This illustrates that they did not chose the correct Integration and they left it with the default:  “Docker Registry…”.

 

  • In this case, the customer chose the correct Integration type, but he still received this failure:
  • This shows that the test failed in a different location. This demonstrates that they should have configured the ‘insecure-registry’ flag for their Docker, as they are using HTTP.


  • After making this correction, we get the following after clicking the test connection:
  • This is just a UI BUG. As of version 4.2.19233, it works correctly as expected.

After using the integration again, the customer applies the webhook groovy settings. 
Depending upon how one starts the Artifactory, an error might still be received.