Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error connecting to SQL2014 -> ConnectionError: Connection is closed. #1

Closed
stephan-simondshealth-com-au opened this issue Jul 19, 2016 · 6 comments

Comments

@stephan-simondshealth-com-au

On Win2012 R2 Server

Using this config:

"connectionString": { 
    "name": "mssql",
    "user": "svc_user_dev",
    "password": "abcdef",
    "server": "locallhost\\SQLEXPRESS",
    "database": "MyAwesomeApp-Dev"
},

I'm getting this error

2016-07-19T11:51:41.953Z - error: Error occured during reporter init ConnectionE
rror: Connection is closed.
at D:\Deploy\dev\NodeJS\node_modules\mssql\lib\main.js:1519:17
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
From previous event:
at Array.reduce (native)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
ConnectionError: Connection is closed.
at D:\Deploy\dev\NodeJS\node_modules\mssql\lib\main.js:1519:17
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
From previous event:
at Array.reduce (native)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)

Any ideas?

@pofider
Copy link
Contributor

pofider commented Jul 19, 2016

Please let me know which version of jsreport you have

@pofider
Copy link
Contributor

pofider commented Jul 19, 2016

Also please make sure your TCP/IP protocol is enabled in the SQL Server Configuration Manager

@pofider
Copy link
Contributor

pofider commented Jul 19, 2016

Maybe you can also change locallhost with your computer name, if it doesn't help.

I tried it on my windows and I'm able to connect, however I see some issues with the latest version UI which I'll quickly fix

@stephan-simondshealth-com-au
Copy link
Author

Hi Thanks for the prompt reply. I'm no AU timezone, so enjoying my morning coffee now. Hence my delayed response.

Here is my config:

  • Clean install, the latest version. (See screenshot)
    image
  • Node Version: v6.2.1
  • TCP/IP is enabled. (Manually enabled after default SQL Express install using chocolatey)
  • Tried localhost, (local), 127.0.0.1, MACHINENAME, etc. (Multiple slashes, single slashes)
  • I can connect using the same username / pwd (copy-pasted) using "SQL Server Management Studio"
  • I tried increasing the tedious version to 1.14.0 as their latest version (7.4 ??) includes SQL2014 support. But that didn't help either
  • I changed the port to 5488 to make sure jsreport was using the config I was editing.

Questions:

  • Does the database need to exist already? (I tried both btw)

Thanks for your help !

@pofider
Copy link
Contributor

pofider commented Jul 20, 2016

And I'm in Europe, so another timezone delay :)

@stephan-simondshealth-com-au
Copy link
Author

Hi Jan,

Yeah, it's a good excuse isn't it :-) :-)

Good news, its working now.
For future reference:

It was the combination of:

  • The "SQL Server Browser" which wasn't running and
  • encrypt option wasn't set.

I did try both, but not at the same time until now.
Also, the "encrypt" option kept being mentioned for Azure SQL, so wasn't sure whether I needed it.

Awesome work,
Thanks for the quick replies!

As a token of my appreciation, I'm happy to send you a draft for updating the help pages to include these tips. I can also take the hint if you decide to thankfully decline or not to add them :-) :-)

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants