anlek / mongify

Mongify allows you to map your data from a sql database and into a mongodb document database.
http://github.com/anlek/mongify
MIT License
317 stars 82 forks source link

Remote sqlserver connection error [stack level too deep (SystemStackError)] on Ubuntu #121

Closed kamrankhatti closed 7 years ago

kamrankhatti commented 7 years ago

I am getting error application.rb:34: stack level too deep (SystemStackError) when I try to connect Mongify using remote sqlserver connection, my database.config file contains:

sql_connection do adapter "sqlserver" host "<HOST_IP>" username "USER_NAME" password "PASSWORD" database "DB_NAME" batch_size 10000 end

mongodb_connection do host "localhost" database "DB_NAME" end

When I run mongify check database.config it took a while and then show application.rb:34: stack level too deep (SystemStackError) on console. However when I cancel the process then it show the list of these message

from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:63:inconnection' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:57:in has_connection?' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:63:inconnection' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:57:in has_connection?' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:63:inconnection' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:57:in has_connection?' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:63:inconnection' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:57:in has_connection?' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:63:inconnection' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:57:in has_connection?' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:63:inconnection' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:57:in has_connection?' from /var/lib/gems/1.9.1/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:63:inconnection' `

I installed sqlserver client DBeaver on Ubuntu and connect it using remote with same credentials it connects successfully. So the issues is not on server or with credentials, I am having some hard time to find where I am wrong, any help would be highly appreciated.

Thanks Kamran

anlek commented 7 years ago

Hey @kamrankhatti, I'm sorry but I can't help with sqlserver questions, I have no access to a sqlserver to test. I can tell you that Mongify uses ActiveRecord (from Rails) in the background. Make sure you're using https://github.com/rails-sqlserver/activerecord-sqlserver-adapter to setup your connection.

Good luck, Andrew