{"action":"created","issue":{"url":"https://api.github.com/repos/processone/ejabberd/issues/2295","repository_url":"https://api.github.com/repos/processone/ejabberd","labels_url":"https://api.github.com/repos/processone/ejabberd/issues/2295/labels{/name}","comments_url":"https://api.github.com/repos/processone/ejabberd/issues/2295/comments","events_url":"https://api.github.com/repos/processone/ejabberd/issues/2295/events","html_url":"https://github.com/processone/ejabberd/issues/2295","id":299301741,"node_id":"MDU6SXNzdWUyOTkzMDE3NDE=","number":2295,"title":"MSSQL database connection configuration","user":{"login":"brobaniuc","id":29709387,"node_id":"MDQ6VXNlcjI5NzA5Mzg3","avatar_url":"https://avatars0.githubusercontent.com/u/29709387?v=4","gravatar_id":"","url":"https://api.github.com/users/brobaniuc","html_url":"https://github.com/brobaniuc","followers_url":"https://api.github.com/users/brobaniuc/followers","following_url":"https://api.github.com/users/brobaniuc/following{/other_user}","gists_url":"https://api.github.com/users/brobaniuc/gists{/gist_id}","starred_url":"https://api.github.com/users/brobaniuc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brobaniuc/subscriptions","organizations_url":"https://api.github.com/users/brobaniuc/orgs","repos_url":"https://api.github.com/users/brobaniuc/repos","events_url":"https://api.github.com/users/brobaniuc/events{/privacy}","received_events_url":"https://api.github.com/users/brobaniuc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cromain","id":743187,"node_id":"MDQ6VXNlcjc0MzE4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/743187?v=4","gravatar_id":"","url":"https://api.github.com/users/cromain","html_url":"https://github.com/cromain","followers_url":"https://api.github.com/users/cromain/followers","following_url":"https://api.github.com/users/cromain/following{/other_user}","gists_url":"https://api.github.com/users/cromain/gists{/gist_id}","starred_url":"https://api.github.com/users/cromain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cromain/subscriptions","organizations_url":"https://api.github.com/users/cromain/orgs","repos_url":"https://api.github.com/users/cromain/repos","events_url":"https://api.github.com/users/cromain/events{/privacy}","received_events_url":"https://api.github.com/users/cromain/received_events","type":"User","site_admin":false},"assignees":[{"login":"cromain","id":743187,"node_id":"MDQ6VXNlcjc0MzE4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/743187?v=4","gravatar_id":"","url":"https://api.github.com/users/cromain","html_url":"https://github.com/cromain","followers_url":"https://api.github.com/users/cromain/followers","following_url":"https://api.github.com/users/cromain/following{/other_user}","gists_url":"https://api.github.com/users/cromain/gists{/gist_id}","starred_url":"https://api.github.com/users/cromain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cromain/subscriptions","organizations_url":"https://api.github.com/users/cromain/orgs","repos_url":"https://api.github.com/users/cromain/repos","events_url":"https://api.github.com/users/cromain/events{/privacy}","received_events_url":"https://api.github.com/users/cromain/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/processone/ejabberd/milestones/33","html_url":"https://github.com/processone/ejabberd/milestone/33","labels_url":"https://api.github.com/repos/processone/ejabberd/milestones/33/labels","id":3452482,"node_id":"MDk6TWlsZXN0b25lMzQ1MjQ4Mg==","number":33,"title":"ejabberd 18.09","description":"","creator":{"login":"cromain","id":743187,"node_id":"MDQ6VXNlcjc0MzE4Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/743187?v=4","gravatar_id":"","url":"https://api.github.com/users/cromain","html_url":"https://github.com/cromain","followers_url":"https://api.github.com/users/cromain/followers","following_url":"https://api.github.com/users/cromain/following{/other_user}","gists_url":"https://api.github.com/users/cromain/gists{/gist_id}","starred_url":"https://api.github.com/users/cromain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cromain/subscriptions","organizations_url":"https://api.github.com/users/cromain/orgs","repos_url":"https://api.github.com/users/cromain/repos","events_url":"https://api.github.com/users/cromain/events{/privacy}","received_events_url":"https://api.github.com/users/cromain/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":2,"state":"open","created_at":"2018-06-26T10:45:45Z","updated_at":"2018-07-02T14:16:00Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2018-02-22T10:37:53Z","updated_at":"2018-07-02T14:17:08Z","closed_at":null,"author_association":"NONE","body":"> What version of ejabberd are you using?\r\n\r\n18.01\r\n\r\n\r\n> What operating system (version) are you using?\r\n\r\nRed Hat 7\r\n\r\n\r\n> How did you install ejabberd (source, package, distribution)?\r\n\r\nPackage\r\n\r\n\r\n> What did not work as expected? Are there error messages in the log? What\r\n> was the unexpected behavior? What was the expected result?\r\n\r\nHere is the specific error in the ejabberd.log \r\n```\r\n2018-02-22 05:23:10.243 [info] <0.371.0>@ejabberd_sql:connecting:329 odbc connection failed:\r\n** Reason: connection_closed\r\n** Retry after: 30 seconds\r\n2018-02-22 05:23:10.243 [warning] <0.371.0>@ejabberd_sql:handle_info:404 unexpected info in connecting: {#Ref<0.3997689971.81788929.3983>,{error,connection_closed}}\r\n2018-02-22 05:23:10.243 [error] <0.93.0> Lager event handler error_logger_lager_h exited with reason {'EXIT',{{badmatch,[<0.414.0>,{<0.371.0>,{connect,[1,1,2,2,2,1,2,\"DSN=ejabberd;UID=ejabberd;PWD=password**\"],on,off},5000},{state,#Port<0.21370>,{<0.371.0>,#Ref<0.3997689971.81788929.3983>},<0.371.0>,undefined,on,undefined,undefined,off,connecting,undefined,0,[#Port<0.21366>,#Port<0.21367>],undefined,undefined},timeout,<0.371.0>,[{gen,do_call,4,[{file,\"gen.erl\"},{line,169}]},{gen_server,call,3,[{file,\"gen_server.erl\"},{line,210}]},{odbc,call,3,[{file,\"odbc.erl\"},{line,874}]},{odbc,connect,...},...]]},...}}\r\n```\r\nThe configuration i used for odbc connection is:\r\n```\r\nsql_type: odbc\r\nsql_server: \"DSN=ejabberd;UID=ejabberd;PWD=password***\"\r\n```\r\n\r\nand also i have set the:\r\n```\r\n## Set odbc to be used by default for all modules\r\ndefault_db: odbc\r\n```\r\n\r\nI suppose ia m doing something wrong, just that i can not figure out what.\r\nHere is the content of odbc.ini: \r\nThis file was not created with the installation of Freetds and unixODBC, so I added manually.\r\n```\r\n[ejabberdDev]\r\nDriver  = FreeTDS\r\nDescription = Any Description\r\nTrace = No\r\nServer = servername\r\nPort = 1433\r\nTDS version = 0.95\r\nDatabase = databasename\r\n```\r\n\r\nAnd the content of odbcinst.ini\r\n```\r\n[PostgreSQL]\r\nDescription=ODBC for PostgreSQL\r\nDriver=/usr/lib/psqlodbcw.so\r\nSetup=/usr/lib/libodbcpsqlS.so\r\nDriver64=/usr/lib64/psqlodbcw.so\r\nSetup64=/usr/lib64/libodbcpsqlS.so\r\nFileUsage=1\r\n\r\n[MySQL]\r\nDescription=ODBC for MySQL\r\nDriver=/usr/lib/libmyodbc5.so\r\nSetup=/usr/lib/libodbcmyS.so\r\nDriver64=/usr/lib64/libmyodbc5.so\r\nSetup64=/usr/lib64/libodbcmyS.so\r\nFileUsage=1\r\n\r\n[ODBC Driver 13 for SQL Server]\r\nDescription=Microsoft ODBC Driver 13 for SQL Server\r\nDriver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2\r\nUsageCount=1\r\n\r\n[ODBC Data Sources]\r\nejabberdDev = MSSQL Server\r\n\r\n[ejabberdDev]\r\nDriver          = /usr/lib64/libtdsodbc.so.0\r\nDescription     = MSSQL Server\r\nTrace           = No\r\nServer          = servername\r\nDatabase        = databasename\r\nPort            = 1433\r\nTDS_Version     = 7.1\r\n\r\n[Default]\r\nDriver          = /usr/lib64/libtdsodbc.so.0\r\n\r\n[FreeTDS]\r\nDescription     = Freetds v 0.95\r\nDriver          = /lib64/libtdsodbc.so.o\r\n```\r\n\r\nI also mention that connecting directly from linux machine to the database works well, Also works well to interrogate the database.\r\n\r\nThanks, \r\n"},"comment":{"url":"https://api.github.com/repos/processone/ejabberd/issues/comments/401820241","html_url":"https://github.com/processone/ejabberd/issues/2295#issuecomment-401820241","issue_url":"https://api.github.com/repos/processone/ejabberd/issues/2295","id":401820241,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTgyMDI0MQ==","user":{"login":"zinid","id":1095902,"node_id":"MDQ6VXNlcjEwOTU5MDI=","avatar_url":"https://avatars3.githubusercontent.com/u/1095902?v=4","gravatar_id":"","url":"https://api.github.com/users/zinid","html_url":"https://github.com/zinid","followers_url":"https://api.github.com/users/zinid/followers","following_url":"https://api.github.com/users/zinid/following{/other_user}","gists_url":"https://api.github.com/users/zinid/gists{/gist_id}","starred_url":"https://api.github.com/users/zinid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zinid/subscriptions","organizations_url":"https://api.github.com/users/zinid/orgs","repos_url":"https://api.github.com/users/zinid/repos","events_url":"https://api.github.com/users/zinid/events{/privacy}","received_events_url":"https://api.github.com/users/zinid/received_events","type":"User","site_admin":false},"created_at":"2018-07-02T14:17:08Z","updated_at":"2018-07-02T14:17:08Z","author_association":"MEMBER","body":"@cromain but you can alwasy set `sql_type: odbc` and configure all those manually. Is there a need to complicate things by adding more options?"}}
{"actor":{"display_login":"zinid"}}