Giter VIP home page Giter VIP logo

Comments (8)

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

@mjducharme
Not entirely impossible, yet I believe something else will be going wrong here. What is the output of the debugger of the webservice for the corresponding request?
(Admin --> Webservices --> GenericTicketConnectorSOAP --> Debugger)

from python-otrs.

mjducharme avatar mjducharme commented on July 28, 2024

I will check on Monday when I have access to the server again, but I was checking the debugger all through the process. If I recall correctly, it is logging everything to the debugger except for that one request that results in the internal server error. I figured the Internal Server Error was preventing the debugger from completing the process, through some kind of exception that they haven't programmed into their logging. Either way, the Internal Server Error HTML page is being fed back to your script instead of an XML response which is causing the script to error out in parsing the XML (because it's not XML). I cannot get you more details until Monday unfortunately.

from python-otrs.

mjducharme avatar mjducharme commented on July 28, 2024

OK I just checked, I was wrong, the debugger is logging it; however, the debugger is not logging the final two sections, "Outgoing data before mapping" and "Returning provider data to remote system". The debugger output is pasted here:

Request Details
Communication sequence started (2016-04-29 16:21:00, debug)

$VAR1 = {
'CONTENT_LENGTH' => '630',
'CONTENT_TYPE' => 'text/xml;charset=utf-8',
'CONTEXT_DOCUMENT_ROOT' => '/opt/otrs/bin/cgi-bin/',
'CONTEXT_PREFIX' => '/otrs/',
'DOCUMENT_ROOT' => '/var/www/html',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'HTTP_ACCEPT_ENCODING' => 'identity',
'HTTP_CONNECTION' => 'close',
'HTTP_HOST' => 'localhost',
'HTTP_USER_AGENT' => 'Python-urllib/2.7',
'MOD_PERL' => 'mod_perl/2.0.9dev',
'MOD_PERL_API_VERSION' => '2',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin',
'PATH_INFO' => '/Webservice/GenericTicketConnector',
'PATH_TRANSLATED' => '/var/www/html/Webservice/GenericTicketConnector',
'QUERY_STRING' => '',
'REMOTE_ADDR' => '127.0.0.1',
'REMOTE_PORT' => '33386',
'REQUEST_METHOD' => 'POST',
'REQUEST_SCHEME' => 'http',
'REQUEST_URI' => '/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnector',
'SCRIPT_FILENAME' => '/opt/otrs/bin/cgi-bin/nph-genericinterface.pl',
'SCRIPT_NAME' => '/otrs/nph-genericinterface.pl',
'SERVER_ADDR' => '127.0.0.1',
'SERVER_ADMIN' => 'root@localhost',
'SERVER_NAME' => 'localhost',
'SERVER_PORT' => '80',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'SERVER_SIGNATURE' => '',
'SERVER_SOFTWARE' => 'Apache/2.4.6 (CentOS) PHP/5.4.16 mod_perl/2.0.9dev Perl/v5.16.3',
'UNIQUE_ID' => 'VyPQPG7GLsfdjp33ioVobAAAAAg'
};

Received data by provider from remote system (2016-04-29 16:21:00, debug)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://www.otrs.org/TicketConnector/">
soapenv:Header/
soapenv:Body

text/plain0Event: SUMMARY
Cleared by: CLEARID
At: STATECHANGE
Device: DEVICE
Component: COMPONENT
Severity: SEVERITY
Message:

MESSAGE

Reopen: REOPENURLUTF8[zenoss] CLEAR: DEVICE CLEARSUMMARY

cfSW5N56PWtTtJyEvSz3P9CHAgobE8dd621384/soapenv:Body
/soapenv:Envelope

Detected operation 'TicketUpdate' (2016-04-29 16:21:00, debug)

No data provided

Incoming data before mapping (2016-04-29 16:21:00, debug)

$VAR1 = {
'Article' => {
'Body' => 'Event: SUMMARY
Cleared by: CLEARID
At: STATECHANGE
Device: DEVICE
Component: COMPONENT
Severity: SEVERITY
Message:

MESSAGE

Reopen: REOPENURL',
'Charset' => 'UTF8',
'MimeType' => 'text/plain',
'Subject' => '[zenoss] CLEAR: DEVICE CLEARSUMMARY',
'TimeUnit' => '0'
},
'SessionID' => 'cfSW5N56PWtTtJyEvSz3P9CHAgobE8dd',
'TicketID' => '621384'
};

from python-otrs.

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

Hmm, not too helpful for me at least. Can you intercept the request (with
feedly or something similar) and post both the intercepted request and the
working equivalent when you post it directly (i.e. without the use of
python-otrs)?

On Mon, May 2, 2016 at 3:56 PM, Michael Ducharme [email protected]
wrote:

OK I just checked, I was wrong, the debugger is logging it; however, the
debugger is not logging the final two sections, "Outgoing data before
mapping" and "Returning provider data to remote system". The debugger
output is pasted here:

Request Details
Communication sequence started (2016-04-29 16:21:00, debug)

$VAR1 = {
'CONTENT_LENGTH' => '630',
'CONTENT_TYPE' => 'text/xml;charset=utf-8',
'CONTEXT_DOCUMENT_ROOT' => '/opt/otrs/bin/cgi-bin/',
'CONTEXT_PREFIX' => '/otrs/',
'DOCUMENT_ROOT' => '/var/www/html',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'HTTP_ACCEPT_ENCODING' => 'identity',
'HTTP_CONNECTION' => 'close',
'HTTP_HOST' => 'localhost',
'HTTP_USER_AGENT' => 'Python-urllib/2.7',
'MOD_PERL' => 'mod_perl/2.0.9dev',
'MOD_PERL_API_VERSION' => '2',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin',
'PATH_INFO' => '/Webservice/GenericTicketConnector',
'PATH_TRANSLATED' => '/var/www/html/Webservice/GenericTicketConnector',
'QUERY_STRING' => '',
'REMOTE_ADDR' => '127.0.0.1',
'REMOTE_PORT' => '33386',
'REQUEST_METHOD' => 'POST',
'REQUEST_SCHEME' => 'http',
'REQUEST_URI' => '/otrs/
nph-genericinterface.pl/Webservice/GenericTicketConnector',
'SCRIPT_FILENAME' => '/opt/otrs/bin/cgi-bin/nph-genericinterface.pl',
'SCRIPT_NAME' => '/otrs/nph-genericinterface.pl',
'SERVER_ADDR' => '127.0.0.1',
'SERVER_ADMIN' => 'root@localhost',
'SERVER_NAME' => 'localhost',
'SERVER_PORT' => '80',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'SERVER_SIGNATURE' => '',
'SERVER_SOFTWARE' => 'Apache/2.4.6 (CentOS) PHP/5.4.16 mod_perl/2.0.9dev
Perl/v5.16.3',
'UNIQUE_ID' => 'VyPQPG7GLsfdjp33ioVobAAAAAg'
};

Received data by provider from remote system (2016-04-29 16:21:00, debug)

xmlns="http://www.otrs.org/TicketConnector/">
soapenv:Header/
soapenv:Body
text/plain0Event: SUMMARY
Cleared by: CLEARID
At: STATECHANGE
Device: DEVICE
Component: COMPONENT
Severity: SEVERITY
Message:

MESSAGE

Reopen: REOPENURLUTF8[zenoss] CLEAR: DEVICE CLEARSUMMARY
cfSW5N56PWtTtJyEvSz3P9CHAgobE8dd621384/soapenv:Body
/soapenv:Envelope

Detected operation 'TicketUpdate' (2016-04-29 16:21:00, debug)

No data provided

Incoming data before mapping (2016-04-29 16:21:00, debug)

$VAR1 = {
'Article' => {
'Body' => 'Event: SUMMARY
Cleared by: CLEARID
At: STATECHANGE
Device: DEVICE
Component: COMPONENT
Severity: SEVERITY
Message:

MESSAGE

Reopen: REOPENURL',
'Charset' => 'UTF8',
'MimeType' => 'text/plain',
'Subject' => '[zenoss] CLEAR: DEVICE CLEARSUMMARY',
'TimeUnit' => '0'
},
'SessionID' => 'cfSW5N56PWtTtJyEvSz3P9CHAgobE8dd',
'TicketID' => '621384'
};


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#12 (comment)

from python-otrs.

mjducharme avatar mjducharme commented on July 28, 2024

Found and fixed the problem, it is a bug in OTRS, not your code. There was a typo in a perl file that only affects TicketUpdate (not TicketCreate) where TimeUnit is being specified:

/opt/otrs/Kernel/GenericInterface/Operation/Ticket/TicketUpdate.pm

Line 14 should say:

use Kernel::System::VariableCheck qw(IsArrayRefWithData IsHashRefWithData IsStringWithData);

In the relased version it instead says:

use Kernel::System::VariableCheck qw(IsArrayRefWithData IsHashRefWithData IsString);

IsStringWithData is used to process incoming TimeUnit data and so the typo causes the internal server error when TimeUnit is used.

from python-otrs.

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

@mjducharme
Thanks for the thorough investigation.
Will you report this issue?
And can I close this issue here?

from python-otrs.

mjducharme avatar mjducharme commented on July 28, 2024

I reported it last night and they fixed it a few hours after I reported it. Their fix is here:

OTRS/otrs@f7c3826

from python-otrs.

ewsterrenburg avatar ewsterrenburg commented on July 28, 2024

Ok, good to know :)

from python-otrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.