Share the Knowledge
RSS icon Home icon
  • Errors when installing the Python ‘lxml’ library using pip on Ubuntu

    Posted on August 28th, 2011 webmaster No comments         Print Print

    I thought I’d post this here, this is the second time I ran into this issue on Ubuntu and forgot what I did the first time.

    If you get errors about things missing when you do ‘sudo pip install lxml’ on Ubuntu, you’ll probably need to install the following development packages (source):

    • sudo apt-get install python-dev
    • sudo apt-get install libxml2-dev
    • sudo apt-get install libxslt1-dev

    You may also want to do ‘sudo pip install lxml –upgrade’ if pip tells you that it’s already installed but you know it wasn’t properly installed.

  • Apache 2.2: Partial results are valid but processing is incomplete, unable to stat file (X-Sendfile)

    Posted on June 9th, 2011 webmaster 5 comments         Print Print

    Error Message:

    (70008) Partial results are valid but processing is incomplete: xsendfile: unable to stat file: //server_name/folder/file

    I deployed my code to our development box over the weekend which uses the X-Sendfile module for Apache to serve files but ran into this issue when I tried to download a file.  The X-Sendfile module worked fine on my local machine.  The only difference I could find was our development box was running Windows XP 64-bit and I’m running 32-bit (this is why it’s a good idea to try to have the machines in all your environments to be identical, VMs are great for this).

    I couldn’t find a solution for my exact problem so I decided to check out the source code and searched for the error message “unable to stat file”:

      /* stat (for etag/cache/content-length stuff) */
      if ((rv = apr_file_info_get(&finfo, APR_FINFO_NORM, fd)) != APR_SUCCESS) {
        ap_log_rerror(
          APLOG_MARK,
          APLOG_ERR,
          rv,
          r,
          "xsendfile: unable to stat file: %s",
          translated
          );
        apr_file_close(fd);
        ap_remove_output_filter(f);
        ap_die(HTTP_FORBIDDEN, r);
        return HTTP_FORBIDDEN;
      }
    

    It appears that the apr_file_info_get() function was not returning APR_SUCCESS on our development box for some reason.  I did some research on that function and found an old article that mentions something about one of the arguments may be beyond the OS file system support and would always return APR_INCOMPLETE (http://dev.ariel-networks.com/apr/apr-tutorial/html/apr-tutorial-5.html).

    I put a quick fix/hack to make it work in our environment by simply checking for both APR_SUCCESS and APR_INCOMPLETE and only throw the error when the status is neither of those.

    I simply changed:

    if ((rv = apr_file_info_get(&finfo, APR_FINFO_NORM, fd)) != APR_SUCCESS)
    

    to

    if ((rv = apr_file_info_get(&finfo, APR_FINFO_NORM, fd)) != APR_SUCCESS	  && (rv = apr_file_info_get(&finfo, APR_FINFO_NORM, fd)) != APR_INCOMPLETE)
    

    I then did a compile/build on Windows (this is another story), redeployed the module, and it finally worked!  I also checked the MD5 and SHA-1 hashes of a couple of files served through mod_xsendfile just to make sure it’s working properly and they matched the original hashes.

    You can download the source and the .so file (if you trust me enough :) ) with the fix from here.

  • The application has failed to start because its side-by-side configuration is incorrect

    Posted on July 11th, 2010 webmaster No comments         Print Print

    Error Message:

    The application has failed to start because its side-by-side configuration is incorrect.

    Received this error after submitting an application written in C++ to the Microsoft HPC Server 2008 cluster.  To fix it, simply install the Microsoft Visual C++ 2008 Redistributable Package on the compute nodes.  I recommend you install both the 32-bit and 64-bit versions as you may have some users compiling their applications in 32-bit and some in 64-bit.

    Reference: http://docs.hp.com/en/BA683-90006/ch13s08.html

    Downloads