Error/7:1 3 FIF

Help
Dan Field
2013-11-12
2013-11-12
  • Dan Field
    Dan Field
    2013-11-12

    Hi. I've installed iipserver from EPEL on a fairly vanilla Centos6 box but I can't for the life of me get it to serve up a JP2.

    From my workstation:

    macdanosx:~ dof$ curl "http://ottawa.wyddfa.llgc.org.uk/iipsrv?FIF=/tmp/4.jp2&wid=200&cvt=jpeg"
    Error/7:1 3 FIF
    

    The server and the file in question:

    [root@ottawa tmp]# file /tmp/4.jp2 
    /tmp/4.jp2: JPEG 2000 image data
    [root@ottawa tmp]# ls -al /tmp/4.jp2 
    -rwxr-xr-x. 1 apache apache 247678 Nov 12 15:03 /tmp/4.jp2
    

    I've tried stracing the running fcgi process and it sits waiting for a request like so:

    [root@ottawa tmp]# strace -p 27207
    Process 27207 attached - interrupt to quit
    accept(0,
    

    Then after I send a HTTP request:

    {sa_family=AF_FILE, NULL}, [2]) = 3
    select(4, [3], NULL, NULL, {2, 0})      = 1 (in [3], left {1, 999964})
    read(3, "\1\1\0\1\0\10\0\0\0\1\0\0\0\0\0\0\1\4\0\1\2\374\0\0\17QHTTP_U"..., 8192) = 804
    write(3, "\1\6\0\1\0\324\4\0Server: iipsrv/1.0\r\nCach"..., 248) = 248
    shutdown(3, 1 /* send */)               = 0
    select(4, [3], NULL, NULL, {2, 0})      = 1 (in [3], left {1, 999543})
    read(3, "", 1024)                       = 0
    close(3)                                = 0
    accept(0,
    

    Configs are as standard

    [root@ottawa tmp]# cat /etc/httpd/conf.d/iipsrv.conf 
    ScriptAlias /iipsrv /usr/libexec/iipsrv/iipsrv.fcgi
    
    # Set our environment variables for the IIP server
    DefaultInitEnv VERBOSITY "10"
    DefaultInitEnv LOGFILE "/var/log/httpd/iipsrv.log"
    DefaultInitEnv MAX_IMAGE_CACHE_SIZE "10"
    DefaultInitEnv JPEG_QUALITY "50"
    DefaultInitEnv MAX_CVT "3000"
    # Define the idle timeout as unlimited and the number of
    # processes we want
    FcgidIdleTimeout -1
    FcgidMaxProcessesPerClass 1
    
    <Directory /usr/libexec/iipsrv/>
        <IfModule mod_authz_core.c>
            # Apache 2.4
            Require all granted
        </IfModule>
        <IfModule !mod_authz_core.c>
            # Apache 2.2
            Order allow,deny
            Allow from All
        </IfModule>
    </Directory>
    

    And here's fcgid

    [root@ottawa tmp]# cat /etc/httpd/conf.d/fcgid.conf 
    # This is the Apache server configuration file for providing FastCGI support
    # through mod_fcgid
    #
    # Documentation is available at
    # http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    
    LoadModule fcgid_module modules/mod_fcgid.so
    
    # Use FastCGI to process .fcg .fcgi & .fpl scripts
    AddHandler fcgid-script fcg fcgi fpl
    
    # Sane place to put sockets and shared memory file
    FcgidIPCDir /var/run/mod_fcgid
    FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm
    

    But the log file has never been created

    [root@ottawa tmp]# ls -al /var/log/httpd/iipsrv.log
    ls: cannot access /var/log/httpd/iipsrv.log: No such file or directory
    

    I've tried touching the log file but it still doesn't get anything written to it.

    I've run out of ideas. Has anyone else got any?

     
    Last edit: Dan Field 2013-11-12
  • Ruven
    Ruven
    2013-11-12

    OK, for the log file, make sure the apache process has write access to /var/log/httpd/iipsrv.log as /var/log/httpd/ may be owned by root preventing the iipsrv process to write.

    The distributed EPEL version of the server does not include JPEG2000 as J2K support is provided via the Kakadu library, which is not open source. If you want to read JP2 files, you will have to get a copy of the Kakadu library and compile iipsrv yourself. I'll try to create a binary package for EPEL including this when I do the next full release.

     
  • Dan Field
    Dan Field
    2013-11-12

    Ahhh that would make a lot of sense! I completely forgot about the kakadu dependancy.
    Thanks Ruven.

     


Anonymous


Cancel   Add attachments