GenericTicketConnectorREST returning HTTP 500

Moderator: crythias

Locked
possebon
Znuny newbie
Posts: 34
Joined: 25 Sep 2014, 20:03
Znuny Version: 6.0.15

GenericTicketConnectorREST returning HTTP 500

Post by possebon »

Hi all,

I'm using OTRS 5.0.12 version and I'm trying to implement a Python script that uses the GenericTicketConnectorREST. I also tried the GenericTicketConnectorSOAP and the issue is the same.

Here there are some screenshots about the OTRS and Apache Logs

http://imgur.com/a/RWHUO

And here is my Apache conf file

Code: Select all

<VirtualHost *:80>
    Alias /otrs-web/ "/opt/otrs/var/httpd/htdocs/"
    Alias / "/opt/otrs/bin/cgi-bin/"

    ServerAdmin webmaster@mainroute.com.br
    ServerName otrs.domain.com 

    ErrorLog logs/otrs.domain.com-error_log
    CustomLog logs/otrs.domain.com-access_log common

    DocumentRoot /opt/otrs/bin/cgi-bin/


    # Setup environment and preload modules
    Perlrequire /opt/otrs/scripts/apache2-perl-startup.pl

    # Reload Perl modules when changed on disk
    PerlModule Apache2::Reload
    PerlInitHandler Apache2::Reload


    <Location />
        ErrorDocument 403 /index.pl
        DirectoryIndex index.pl
        AddHandler  perl-script .pl .cgi
        PerlResponseHandler ModPerl::Registry
        Options +ExecCGI
        PerlOptions +ParseHeaders
        PerlOptions +SetupEnv
    
        <IfModule mod_version.c>
            <IfVersion < 2.4>
                Order allow,deny
                Allow from all
            </IfVersion>
            <IfVersion >= 2.4>
                Require all granted
            </IfVersion>
        </IfModule>
        <IfModule !mod_version.c>
            Order allow,deny
            Allow from all
        </IfModule>
     </Location>


    # mod_perl2 options for GenericInterface
    <Location /otrs/nph-genericinterface.pl>
        LogLevel debug
	PerlOptions -ParseHeaders
    </Location>


</VirtualHost>

<Directory "/opt/otrs/bin/cgi-bin/">
    AllowOverride None
    Options +ExecCGI -Includes

    LogLevel debug

    <IfModule mod_version.c>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
    </IfModule>
    <IfModule !mod_version.c>
        Order allow,deny
        Allow from all
    </IfModule>

    <IfModule mod_filter.c>
        <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json
         </IfModule>
    </IfModule>

</Directory>

<Directory "/opt/otrs/var/httpd/htdocs/">
    AllowOverride None

    <IfModule mod_version.c>
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
    </IfModule>
    <IfModule !mod_version.c>
        Order allow,deny
        Allow from all
    </IfModule>

    <IfModule mod_filter.c>
        <IfModule mod_deflate.c>
            AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json
         </IfModule>
    </IfModule>

    # Make sure CSS and JS files are read as UTF8 by the browsers.
    AddCharset UTF-8 .css
    AddCharset UTF-8 .js

    # Set explicit mime type for woff fonts since it is relatively new and apache may not know about it.
    AddType application/font-woff .woff

</Directory>

<IfModule mod_headers.c>
    # Cache css-cache for 30 days
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css-cache">
        <FilesMatch "\.(css|CSS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache css thirdparty for 4 hours, including icon fonts
    <Directory "/opt/otrs/var/httpd/htdocs/skins/*/*/css/thirdparty">
        <FilesMatch "\.(css|CSS|woff|svg)$">
            Header set Cache-Control "max-age=14400 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache js-cache for 30 days
    <Directory "/opt/otrs/var/httpd/htdocs/js/js-cache">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=2592000 must-revalidate"
        </FilesMatch>
    </Directory>

    # Cache js thirdparty for 4 hours
    <Directory "/opt/otrs/var/httpd/htdocs/js/thirdparty/">
        <FilesMatch "\.(js|JS)$">
            Header set Cache-Control "max-age=14400 must-revalidate"
        </FilesMatch>
    </Directory>
</IfModule>

# Limit the number of requests per child to avoid excessive memory usage
MaxRequestsPerChild 4000

I googled and found that this issue could be related with the HTTP header being messed up, but I could not find any applicable solution to it.

I found here in forum, something related with PerlOptions -ParseHeaders at Apache conf file, but the solution is already what I have on my Apache.

Some help on this?

Thanks in advance,

Fernando Possebon
possebon
Znuny newbie
Posts: 34
Joined: 25 Sep 2014, 20:03
Znuny Version: 6.0.15

[SOLVED] Re: GenericTicketConnectorREST returning HTTP 500

Post by possebon »

I found what was wrong at my Apache conf file.

My file was this:

Code: Select all

     <Location /otrs/nph-genericinterface.pl>
         LogLevel debug
	       PerlOptions -ParseHeaders
     </Location>
Considering that I'm not using /otrs/ at my URL, I had to change to this:

Code: Select all

    <Location /nph-genericinterface.pl>
        LogLevel debug
        PerlOptions -ParseHeaders
    </Location>
Locked