You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
root@2fc6e5abbbd2:/usr/src/app# tsql -C
Compile-time settings (established with the "configure" script)
Version: freetds v1.00.27
freetds.conf directory: /usr/local/etc
MS db-lib source compatibility: no
Sybase binary compatibility: no
Thread safety: yes
iconv library: yes
TDS version: 7.3
iODBC: no
unixodbc: no
SSPI "trusted" logins: no
Kerberos: no
OpenSSL: yes
GnuTLS: no
MARS: no
Description
I don't know why this issue is happing, can somebody give me a hint ?
here my irb:
opt = {:dataserver=>"10.10.10.10:1433", :username=>"myUser", :password=>"myPass", :port=>1433, :database=>"myDB"}
opt[:message_handler] = Proc.new { |m| puts m.message }
client = TinyTds::Client.new opt
Exception `TinyTds::Error' at /usr/local/bundle/gems/tiny_tds-2.1.3/lib/tiny_tds/client.rb:60 - Adaptive Server connection failed (10.10.10.10:1433)
TinyTds::Error: Adaptive Server connection failed (10.10.10.10:1433)
from /usr/local/bundle/gems/tiny_tds-2.1.3/lib/tiny_tds/client.rb:60:in `connect'
from /usr/local/bundle/gems/tiny_tds-2.1.3/lib/tiny_tds/client.rb:60:in `initialize'
from (irb):111:in `new'
from (irb):111
from /usr/local/bin/irb:11:in `<main>'
client.execute("SELECT * FROM [myTable]").each{|res| p res }
TinyTds::Error: closed connection
from (irb):122:in `execute'
from (irb):122
from /usr/local/bin/irb:11:in `<main>'
client.close
=> true
client = TinyTds::Client.new opt
Changed database context to 'myDB'.
=> #<TinyTds::Client:0x000055cd6bce0fc0 @message_handler=#<Proc:0x000055cd6bd41fa0@(irb):83>, @query_options={:as=>:hash, :symbolize_keys=>false, :cache_rows=>true, :timezone=>:local, :empty_sets=>true}>
client.execute("SELECT * FROM [myDB]").each{|res| p res }
=> {"ID"=>1, "MDT_ID"=>1...........}
why I need to initialize my client twice ? I can reproduce it, but doesn't know how to debug and I wouldn't implement a workaround with '2.time do' or 'begin rescue retry'
Would be nice if somebody can help.
Thanks a lot
The text was updated successfully, but these errors were encountered:
Hm, it seems much more likely that this is some sort of networking config problem than an issue with tiny_tds itself. For the first connection timeout, how long does that take to happen. The default login timeout is 60 seconds, is it before or after that point?
Environment
k8s 1.16
BaseContainer: ruby2.4
stable/freetds-1.00.27.tar.gz
gem 'tiny_tds', '2.1.3'
Description
I don't know why this issue is happing, can somebody give me a hint ?
here my irb:
why I need to initialize my client twice ? I can reproduce it, but doesn't know how to debug and I wouldn't implement a workaround with '2.time do' or 'begin rescue retry'
Would be nice if somebody can help.
Thanks a lot
The text was updated successfully, but these errors were encountered: