[SOLVED] Connecting I-doIT with OTRS - Help!

Moderator: crythias

Post Reply
rtsmith2329
Znuny newbie
Posts: 16
Joined: 06 Jul 2016, 19:08
Znuny Version: 5.0.16
Real Name: Richard Smith

[SOLVED] Connecting I-doIT with OTRS - Help!

Post by rtsmith2329 »

Apologies for cross-posting this - I have asked this question on the I-doit forum as well, but thought that OTRS users might be better equipped to help.

Dear all,

I'm hoping someone can help me here. I'm using the ReferenceIdoitObjects module for OTRS and appear to have successfully installed it, except that when I click on the 'Reference i-doit objects' button in OTRS, I just get the 'Loading...' message. I have followed the installation instructions.

I turned on Fiddler to try and work out exactly what the issue is and I got the following response when the module tried to call over to the i-doit server via the API proxy I set up:
Headers:

Code: Select all

Request URL: https://{my.idoit.fqdn}/index.php?api=jsonrpc
Request Method: OPTIONS
Status Code: 200
Query Url
api: jsonrpc
Request Headers
Access-Control-Request-Method: POST
Origin: http://{my.otrs.fqdn}
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
Access-Control-Request-Headers: accept, content-type
Accept: */*
Referer: http://{my.otrs.fqdn}/otrs/index.pl?Action=AgentReferenceIDoitObjects;TicketID=3
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: en-US,en;q=0.8
Response Headers
Date: Wed, 06 Jul 2016 16:44:07 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.11
Set-Cookie: PHPSESSID=rqnelm3a6vl0v1kheop31binb7; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Length: 257
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json 
Response:

Code: Select all

{"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid request","data":{"error":"This is not a JSON-RPC. The content-type should be application\/json, request method should be \"post\" and the http body should be a valid json-rpc 2.0 package."}},"id":0}
Is there something I've misconfigured? I believe I followed the README.md file closely, please let me know if any additional information is needed.
Last edited by rtsmith2329 on 13 Jul 2016, 19:06, edited 1 time in total.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Connecting I-doIT with OTRS - Help!

Post by crythias »

The response message indicates that the request was not properly formatted. Either OTRS isn't directed to provide the request in a json format, or OTRS isn't able to do it.

Or, alternatively, I-doIT is denying that the request is properly formatted.

Nonetheless, this is not a core OTRS function and appears to be entirely within the realm of the vendor of the add-on.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rtsmith2329
Znuny newbie
Posts: 16
Joined: 06 Jul 2016, 19:08
Znuny Version: 5.0.16
Real Name: Richard Smith

Re: Connecting I-doIT with OTRS - Help!

Post by rtsmith2329 »

I figured it out. Our i-doit instance is set to require authentication from JSON-RPC calls, which are not included in the JS files in the module. I unchecked this option and it works. As this is a test environment this is fine for now, but I may need to hard-code authentication at a later date when we move into production.
Post Reply