6

I have a nginx server running on debian wheezy. I have working OTRS installation. But our old perl-fcgi wrapper was interferring with some other important process so we desided to choose fcgiwrap package: http://www.haschmi.de/de/otrs/otrs-on-nginx.html

So I removed the old wrapper and installed the new one. The old wrapper had

fastcgi_pass 127.0.0.1:8999;

and the new one

fastcgi_pass unix:/var/run/fcgiwrap.socket;

Here is the complete config

server {
   listen ip:80;

    server_name support.test.com;

    root /opt/otrs/var/httpd/htdocs;

    index index.html;
    location /otrs-web {
        gzip on;
        alias /opt/otrs/var/httpd/htdocs;
    }

   location ~ ^/otrs/(.*\.pl)(/.*)?$ {
   #try_files $uri =404;
    gzip off;
    fastcgi_pass unix:/var/run/fcgiwrap.socket;
    fastcgi_index index.pl;
    fastcgi_param SCRIPT_FILENAME /opt/otrs/bin/fcgi-bin/$1;


    fastcgi_param QUERY_STRING $query_string;
    fastcgi_param REQUEST_METHOD $request_method;
    fastcgi_param CONTENT_TYPE $content_type;
    fastcgi_param CONTENT_LENGTH $content_length;
    fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    fastcgi_param SERVER_SOFTWARE nginx;
    fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    fastcgi_param REQUEST_URI $request_uri;
    fastcgi_param DOCUMENT_URI $document_uri;
    fastcgi_param DOCUMENT_ROOT $document_root;
    fastcgi_param SERVER_PROTOCOL $server_protocol;
    fastcgi_param REMOTE_ADDR $remote_addr;
    fastcgi_param REMOTE_PORT $remote_port;
    fastcgi_param SERVER_ADDR $server_addr;
    fastcgi_param SERVER_PORT $server_port;
    fastcgi_param SERVER_NAME $server_name;
   }
}

When I visit our OTRS everything works. But as son as I submit the login form I get

An error occurred while reading CGI reply (no response received)

Any ideas what is wrong? How can I solve this?

DarkLeafyGreen
  • 69,338
  • 131
  • 383
  • 601
  • 1
    Did you check for errors in your nginx error log? The new fcgi wrapper is running with the same user of the older one, or with a different one? If the user is different, then it may be a permissions problem. –  Sep 02 '12 at 14:43
  • Yes same error, same user. We desided against otrs and for a custom ticket system now. – DarkLeafyGreen Oct 01 '12 at 13:53

1 Answers1

8

The current Ubuntu reps (12.04) do not include a proper fcgiwrap version.

You need to compile fcgiwrap directly from https://github.com/gnosek/fcgiwrap and use -f option to run the wrapper. It will cause the err_log to be redirected to server error.log. To change fcgiwrap startup options edit /etc/init.d/fcgiwrap and uncomment/modify the following line:

DAEMON_OPTS="-f" 

Restart fcgiwrap after this:

service fcgiwrap restart
Kirill Kay
  • 787
  • 1
  • 7
  • 16
  • I had to remove the old version as well. ls -l $(locate fcgiwrap | grep bin ) -rwxr-xr-x 1 root root 135483 Aug 8 20:43 /usr/local/sbin/fcgiwrap -rwxr-xr-x 1 root root 19064 May 1 2011 /usr/sbin/fcgiwrap mv /usr/sbin/fcgiwrap /usr/sbin/fcgiwrap.20110501 cp /usr/local/sbin/fcgiwrap /usr/sbin/fcgiwrap – Keith John Hutchison Aug 08 '16 at 11:27