Author Topic: Error message - Bad file descriptor - connect(2)  (Read 13147 times)

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Error message - Bad file descriptor - connect(2)
« on: April 25, 2010, 08:01:06 AM »
Trying to upload images to a SmugMug album and get this error message: 

TIMESTAMP   STATUS   LOCAL_PATH   SERVICE_TYPE      REMOTE_PATH   SIZE   MD5_DIGEST
2010-04-25 10:56:03   [ERROR]   C:\Documents and Settings\BVA\My Documents\Pictures\Catagories\Sports\Lacrosse\RBRHS\2010\20100424_HS_Lacrosse_Holmdel_at_Red_Bank_Regional_game_end\BVA_0157.JPG   SmugMug   C:\Program Files\Camera Bits\Photo Mechanic 4.6\ruby/lib/ruby/1.8/resolv-replace.rb:19:in `original_resolv_initialize': Bad file descriptor - connect(2)

PM version 4.6.2.1
Windows XP Pro SP-latest
Firefox
and recently installed PM on a new lap top, any ideas?
« Last Edit: April 25, 2010, 04:41:13 PM by bvonarx »

Offline abelltx

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Re: Error message - Bad file descriptor - connect(2)
« Reply #1 on: April 26, 2010, 11:14:38 AM »
Same thing for me today. Its very frustrating. Worked fine last week.

Windows Vista Pro 64-bit
PM 4.6.3

Adam

Offline Bill Kelly

  • Software Developer
  • Full Member
  • ***
  • Posts: 131
    • View Profile
    • Camera Bits, Inc.
Re: Error message - Bad file descriptor - connect(2)
« Reply #2 on: April 26, 2010, 04:46:35 PM »
Hi,

Although I'm unable to reproduce the problem locally, it appears to be related to DNS resolution.

We should be able to improve Photo Mechanic's handling of such issues in a future release.  In the meantime, a temporary work-around may be possible.

There is a file called "hosts" within the Windows system.  It is a text file, even though the filename doesn't end in ".txt".

It is possible to modify this file with Notepad, although you may need to have Administrator privileges to do so.

Here is the file location:



I cannot verify the effectiveness of my proposed work-around, since I can't reproduce the problem locally.  But, I suspect that adding the following line to your hosts file may resolve the issue.  (Essentially, a band-aid solution.)



I suggest making a backup copy of your hosts file before modifying it, just in case.  (Note, any line beginning with # is a comment. You'll probably see some pre-existing comment lines similar to those in the image above.  They can be safely ignored.)

You'll need to restart Photo Mechanic for the change to take effect.


Hope this helps,

Bill


Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Re: Error message - Bad file descriptor - connect(2)
« Reply #3 on: April 27, 2010, 06:23:23 AM »
Nice, that seemed to do the trick, funny how PM worked perfectly for years than this happened. I wonder what change caused the problem.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: Error message - Bad file descriptor - connect(2)
« Reply #4 on: April 27, 2010, 07:19:29 AM »
Nice, that seemed to do the trick, funny how PM worked perfectly for years than this happened. I wonder what change caused the problem.

Your ISP's DNS servers were not functioning at the time of the failures.  You probably didn't notice it because your other applications (like web browsers) have DNS caching and use their cached IP address mappings when the DNS server cannot be reached.

-Kirk

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
REturn of The Error message - Bad file descriptor - connect(2)
« Reply #5 on: April 27, 2010, 03:39:28 PM »
Hmm seems to be back, not happy and need to upload a job. How to check if DNS servers are functioning?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: REturn of The Error message - Bad file descriptor - connect(2)
« Reply #6 on: April 27, 2010, 03:59:13 PM »
Hmm seems to be back, not happy and need to upload a job. How to check if DNS servers are functioning?

Are you saying that the host file changes are in place but are not solving the problem anymore?

-Kirk

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Re: Error message - Bad file descriptor - connect(2)
« Reply #7 on: April 27, 2010, 04:51:39 PM »
I made the suggested changes, then successfully uploaded a few batches, went out to shoot this afternoon (did not shut down the pc) came back, edited and when I tried to upload the same error message appeared

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: Error message - Bad file descriptor - connect(2)
« Reply #8 on: April 27, 2010, 05:22:03 PM »
I made the suggested changes, then successfully uploaded a few batches, went out to shoot this afternoon (did not shut down the pc) came back, edited and when I tried to upload the same error message appeared

Try editing your hosts file but set the address for api.smugmug.com to:

173.222.52.79

and restart PM.

-Kirk

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Re: Error message - Bad file descriptor - connect(2)
« Reply #9 on: April 27, 2010, 05:33:48 PM »
That seems to make it work, many thanks

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: Error message - Bad file descriptor - connect(2)
« Reply #10 on: April 27, 2010, 07:28:27 PM »
That seems to make it work, many thanks

Hopefully your ISP's DNS servers will start working again soon.

-Kirk

Offline bvonarx

  • Newcomer
  • *
  • Posts: 41
    • View Profile
Re: Here we go again Error message - Bad file descriptor - connect(2)
« Reply #11 on: May 05, 2010, 06:17:43 PM »
Frustrating news, after making the previous suggested changes and seeing them work for several days I now get:

TIMESTAMP   STATUS   LOCAL_PATH   SERVICE_TYPE      REMOTE_PATH   SIZE   MD5_DIGEST
2010-05-05 21:12:46   [ERROR]   C:\Documents and Settings\BVA\My Documents\Pictures\Catagories\Sports\Lacrosse\Jersey Jam 2010\BVA_0647.JPG   SmugMug   C:\Program Files\Camera Bits\Photo Mechanic 4.6\ruby/lib/ruby/1.8/resolv-replace.rb:19:in `original_resolv_initialize': Bad file descriptor - connect(2)

what's going on? years on no problems and then a rash of errors in the past two weeks, I'm bumming

Downloaded the latest Beta version that seemed to do it, (for now?)
« Last Edit: May 05, 2010, 06:36:10 PM by bvonarx »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24767
    • View Profile
    • Camera Bits, Inc.
Re: Here we go again Error message - Bad file descriptor - connect(2)
« Reply #12 on: May 05, 2010, 07:36:05 PM »
Frustrating news, after making the previous suggested changes and seeing them work for several days I now get:

TIMESTAMP   STATUS   LOCAL_PATH   SERVICE_TYPE      REMOTE_PATH   SIZE   MD5_DIGEST
2010-05-05 21:12:46   [ERROR]   C:\Documents and Settings\BVA\My Documents\Pictures\Catagories\Sports\Lacrosse\Jersey Jam 2010\BVA_0647.JPG   SmugMug   C:\Program Files\Camera Bits\Photo Mechanic 4.6\ruby/lib/ruby/1.8/resolv-replace.rb:19:in `original_resolv_initialize': Bad file descriptor - connect(2)

what's going on? years on no problems and then a rash of errors in the past two weeks, I'm bumming

Downloaded the latest Beta version that seemed to do it, (for now?)


It should be solved for good because of the latest changes in version 4.6.4 of Photo Mechanic.

-Kirk