node-imager icon indicating copy to clipboard operation
node-imager copied to clipboard

Mavericks Unhandled 'error' event.

Open bradley opened this issue 11 years ago • 6 comments

When trying to upload an image to s3 on Mavericks I'm seeing

00:23:45 web.1  | events.js:72
00:23:45 web.1  |         throw er; // Unhandled 'error' event
00:23:45 web.1  |               ^
00:23:45 web.1  | Error: read ECONNRESET
00:23:45 web.1  |     at errnoException (net.js:901:11)
00:23:45 web.1  |     at TCP.onread (net.js:556:19)
00:23:45 web.1  | exited with code 8
00:23:45 system | sending SIGTERM to all processes

I've read the other issues on here with similar errors and the solutions seem to be to either ensure that ImageMagick is installed or to set the region for your S3 configuration.

I've tried both.

Any advice here? Im completely lost. Ive reinstalled ImageMagick with homebrew and my config file includes the region:

region: 'us-standard'

bradley avatar Jan 23 '14 06:01 bradley

Fixed this by installing ImageMagick via MacPorts a la: http://www.imagemagick.org/script/binary-releases.php#macosx

Hope this helps someone. Closing.

bradley avatar Jan 23 '14 07:01 bradley

... or not. This still appears to be an issue.

bradley avatar Jan 23 '14 07:01 bradley

ECONNRESET looks like a connection issue. Don't think its related to imagemagick.

madhums avatar Jan 26 '14 11:01 madhums

I'm having this issue as well. @bradley how did you fix it?

matthewpalmer avatar Feb 10 '14 00:02 matthewpalmer

Interestingly, removing

resizeAndCrop: {
        large: {resize: "1000x1000", crop: "900x900"}
      }

from imagerConfig.js fixed the problem.

Edit:

Actually, it is only fixed if you comment out the line. For example, here is a portion of the config file.

variants: {
    items: {
      // keepNames: true,
      resize: {
        mini : "300x200",
        preview: "800x600"
      },
      crop: {
        thumb: "200x200"
      }/*,
      resizeAndCrop: {
        large: {resize: "1000x1000", crop: "900x900"}
      }*/
    },

     gallery: {
      rename: function (filename) {
        return 'MyFileManipulationLogic_' + filename;
      },
      crop: {
        thumb: "100x100"
      }
    }
  },

Edit 2: I'm getting intermittent errors. I now have no idea what's wrong. Here's my config file:

module.exports = {
  variants: {
    items: {
      // keepNames: true,
      crop: {
        thumb: "500x500"
      }
    }
  },

  storage: {
    Local: {
      path: "/var/www/"
    },
    S3: {
      key: 'KEY',
      secret: 'SECRET',
      bucket: 'BUCKET',
      storageClass: 'REDUCED_REDUNDANCY',
      secure: false,
    }
  }
};

I have found that the last config file works the best. Not sure if this helps anyone, or helps to decipher the issue.

matthewpalmer avatar Feb 10 '14 01:02 matthewpalmer

Thanks @matthewpalmer , after removing resizeAndCrop:, all is ok. But this is so strange!

itlodge avatar Apr 29 '14 11:04 itlodge