iconara / bigshift

A tool for moving tables from Redshift to BigQuery
BSD 3-Clause "New" or "Revised" License
65 stars 10 forks source link

Bad file descriptor - not a socket file descriptor ruby #11

Closed liminghui closed 8 years ago

liminghui commented 8 years ago

Hi I have download the version v0.3.2,but there's an error,

C:\Ruby23-x64\bin>bigshift --gcp-credentials C:\Ruby23-x64\VuclipDataFlow-a90c46 2bd10f.json --aws-credentials C:\Ruby23-x64\aws.json --rs-credentials C:\Ruby23- x64\rs.json --rs-database vuclip --rs-table events143504 --bq-dataset apsalar -- bq-table events143504 --s3-bucket tobigquery --s3-prefix load --cs-bucket loadda ta --max-bad-records 3 --steps unload,transfer,load,cleanup --compression D, [2016-08-22T17:37:31.910800 #6580] DEBUG -- host: *_.redshift.amplitude.com D, [2016-08-22T17:37:31.911800 #6580] DEBUG -- port: 5439 D, [2016-08-22T17:37:31.912800 #6580] DEBUG --username : _* D, [2016-08-22T17:37:31.912800 #6580] DEBUG -- database_name: * D, [2016-08-22T17:37:31.912800 #6580] DEBUG -- password: ** D, [2016-08-22T17:37:31.913800 #6580] DEBUG -- : 508 C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bigshift-0.3.2/lib/bigshift/cli.rb:225:in for_fd': Bad file descriptor - not a socket file descriptor (Errno::EBADF) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bigshift-0.3.2/lib/bigshift/ cli.rb:225:inrs_connection' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bigshift-0.3.2/lib/bigshift/ cli.rb:174:in redshift_unloader' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bigshift-0.3.2/lib/bigshift/ cli.rb:51:inunload' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bigshift-0.3.2/lib/bigshift/ cli.rb:29:in run' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/bigshift-0.3.2/bin/bigshift: 6:in<top (required)>' from C:/Ruby23-x64/bin/bigshift:23:in load' from C:/Ruby23-x64/bin/bigshift:23:in

'

I have print the host.port,username,password,database_name,and there are all correct.

using: Windows 7 Bigshift 3.2.0 Ruby 2.3.1 (x64)

iconara commented 8 years ago

Closing due to lack of context. If you have any more information or some way of replicating the issue feel free to open the issue again.

satygupta commented 5 years ago

Hi,

I am getting the same error. I have installed 0.4.0 version on windows 7.

I have Ruby+Devkit 2.5.3-1 (x64) installed and pg-1.1.4-x64-mingw32

the error is D, [2019-02-13T14:52:26.826793 #11316] DEBUG -- : Setup complete D, [2019-02-13T14:52:26.827793 #11316] DEBUG -- : Running unload Traceback (most recent call last): 7: from C:/Ruby25-x64/bin/bigshift:23:in <main>' 6: from C:/Ruby25-x64/bin/bigshift:23:inload' 5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bigshift-0.4.0/bin/bigshift:6:in <top (required)>' 4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bigshift-0.4.0/lib/bigshift/cli.rb:30:inrun' 3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bigshift-0.4.0/lib/bigshift/cli.rb:59:in unload' 2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bigshift-0.4.0/lib/bigshift/cli.rb:194:inredshift_unloader' 1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bigshift-0.4.0/lib/bigshift/cli.rb:239:in create_rs_connection' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bigshift-0.4.0/lib/bigshift/cli.rb:239:infor_fd': Bad file descriptor - not a socket file descriptor (Errno::EBADF)

When I use interactive ruby for checking for the line socket = Socket.for_fd(rs_connection.socket)

I get below error Traceback (most recent call last): 3: from C:/Ruby25-x64/bin/irb.cmd:19:in <main>' 2: from (irb):11 1: from (irb):11:infor_fd' TypeError (no implicit conversion of PG::Connection into Integer)

Regards, sat