INtegration Error when calling Create xMatter Event

Not Yet Reviewed

Hi!

Im trying to debug an error, we have a trigger that goes to a switch and then creates an xmatter event:

When checking th activiy log of that action we see this:

"company_name-xmatters-com/default-uid-uid-uid-uid-uid"
Finished running HTTP Trigger script.
"Switch" is running on xMatters Agent "company_name-xmatters-com/default-uid-uid-uid-uid-uid"
"xMatters Create Event - UIM Alert" is running on xMatters Agent "company_name-xmatters-com/default-uid-uid-uid-uid-uid"
> POST https://company_name.xmatters.com/api/xm/1/plans/uid-uid-uid-uid-uid/forms/uid-uid-uid-uid-uid/triggers HTTP/1.1
> Accept: text/plain, application/json, application/*+json, */*
> User-Agent: Xerus (EndpointClient)
> Content-Type: application/json; charset=UTF-8
> X-Trace: 7fa1658f-501c-e5e1-cf3b-8934d1e6bdd8,uid-uid-uid-uid-uid,457f84ea-df8e-4e07-9167-d77bec873b1e
> X-Integration-UUID: uid-uid-uid-uid-uid
> Authorization: Bearer ********
> X-Flow-Trace: uid-uid-uid-uid-uid:1580399876198
> Content-Length: 184
{"properties":{},"recipients":[{"targetName":"dantepaoloni|Android Phone"}],"integrationUUID":"uid-uid-uid-uid-uid","requestId":"uid-uid-uid-uid-uid"}

Caught an error in step "xMatters Create Event - UIM Alert"
Script failed with message: JavaObject[java.lang.InternalError: Should not reach here (java.lang.InternalError)]

When creating the xmatters event, we are sending from the trigger output a single variable, not all of them, so we can test the ticket creation:

alarm -> trigger -> create event  | event status update -> check severity open ticket or close ticket.

We are trying to create an event since the idea is to create a ticket in BMC Helix using this input. Creating the event would allow us to trigger a close when the alarm goes off, sounds about right?

0

Comments

6 comments
Date Votes

Please sign in to leave a comment.

  • Hi Dante,

    It looks like this has been run into before and had to do with the Java version runing on the system.

    Specifically in that case they were running jdk-11.0.5+10 and had to update this to jdk-13.0.1+9

    There may be other issues after this but it should get you beyond the "Should not reach here" error.

     

    Tip: Check the xa.conf file to see if there is anything pointing to a JAVA_HOME in there which may otherwise be overriding the default Java instance on the server.


    Cheers!

    0
  • Hey Francois! thanks! indeed we did have link to a 11.0.5+10, update to 13.0.1 and the error change to something else:

    Script failed with message: JavaObject[org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://MY_DOMAIN.xmatters.com/api/xm/1/plans/uid-uid-uid/forms/uid-uid-uid/triggers": Unable to tunnel through proxy. Proxy returns "HTTP/1.1 502 cannotconnect"; nested exception is java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 502 cannotconnect" (org.springframework.web.client.ResourceAccessException)]

    I check the logs and dind't see any errors when executing the trigger, witch proxy should we check?

    0
  • Dante,

    Can you go to the <install folder>/xa/config folder and look at the contents of the xagent-service.conf file? This should show proxy information if configured. If you MUST go through a proxy, you can specify that information in this file as well which should help.

    This sounds like the agent is having issues with the proxy so knowing if you need one and what's configured should help sort that out.


    Cheers!

    0
  • Hey Thanks! we do have a proxy at the config setup and connects with no problem outside:

    EDIT: we do have the Xmatters agent, not the integration agent. couldn't find that file but at the auth.conf we do have the proxy settings IP/PORT/DOMAIN

     

    2020-01-30 16:47:42,100 63847 [qtp355885103-58] com.xmatters.xagent.socket.ProxyAwareSSLSocketFactory INFO --- Connecting to cablevision.xmatters.com through proxy
    2020-01-30 16:47:58,502 63847 [scheduling-1] com.xmatters.xagent.services.RemoteHyraxService INFO --- Re-establishing websocket connection to xMatters, due to to the gr
    aceful reconnect timeout
    2020-01-30 16:47:58,504 63847 [scheduling-1] com.xmatters.xagent.services.RemoteHyraxService INFO --- Attempting to connect to xMatters websocket: 1
    2020-01-30 16:47:59,024 63847 [Thread-29] com.xmatters.xagent.services.RemoteHyraxService INFO --- Websocket connection to xMatters established.

    We could try if we can reach an specific page? to test and debug. 

     

    0
  • Thanks Dante,

    So it would seem on the surface that the proxy works fine for the heartbeat but when you try to POST to the integration it seems to balk at that...

    Any chance you can externally test a similar POST with payload using a CURL command or something similar? I am supposing this is going to go through the proxy also and should work... I am validating if we're still missing something somewhere.

    Also I was aware you were using the xMatters agent and not the IA :) Can you share where you got the integration code you are using from? I am wondering if the scripts/code for that integration are also needing explicit proxy configs or if they are supposed to infer those from the core configuration.

    Cheers!

    0
  • Hey, no problemo!

    I was checking the activity stream and notice this:

    "Switch" is running on xMatters Agent - local agent
    "xMatters Create Event - UIM Alert" is running on xMatters Agent  - local agent.

    Didn't notice before, is there a way to after the trigger is executed run the "Switch" and "xMatters create event" on the cloud?

    I change the execution of the trigger from agent to cloud and executed from the same server than before and now worked like a charm. So maybe there is something in the code? problem is it's very simple.

    the trigger is based on the example:

    var payload = JSON.parse(request.body);

    with a  bunch of output['variable'] = payload.variable

    and then a console.log and nothing more. Then I Drop a Switch and then "xMatters create event".

     

     

     

    0

Didn't find what you were looking for?

New post