-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
ORM fails to connect - Login error with MSSQL #10258
Comments
@commel can you connect to DB host? |
What's your MSSQL server version? |
Which latest version you can work with this MSSQL instance? |
@lunny: Gitea 1.10.3 works fine |
Just in case. Try:
|
@guillep2k thanks, i gave it a try, sadly that notation does not work either with 1.10.3 or 1.11 |
I have the same issue. Gitea can not connect to our MS SQL express database.
Git-Version: 2.25.0 I connection through MS SQL Server Management Studio is possible. I tried in the app.ini from Gitea the host-string "machinename\dbinstance", ".\dbinstance" and also th tip with the escaped "". Nothing works. |
I think this should be a configuration problem, because CI with mssql integration tests succeed. |
Which configuration is set on CI with mssql integration? So we can check our configuration on mssql and server side. |
But why it is woking with the previous version of gitea under 1.11.0 |
I think it maybe related with we have upgraded mssql driver on v1.11.0 |
1.11 also doesn't start with PostgreSQL 10 on the same machine. (CentOS 7) |
I'm using PostgreSQL 9.6.16 on CentOS 7 and 1.11 works fine for me. I'm using:
|
Just wanted to let you know that the problem remains with the newest updates of Gitea 1.11.3. The current update of the 1.10-branch to 1.10.6 still works. |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
gitea 1.10 branch use:
gitea >= 1.11 use:
so an update may help? |
@commel can you test current master for us? |
Sure, happy to help. Just tried the master binary from 05/11/2020 12:51:35 AM +00:00, but this one still has the same problem. :-( |
thanks for testing ... |
@commel Some users could fix this issue by changing the connection string escaping the backslash (e.g. |
just downloaded and launched v1.12. Using MSSQL 2016 with named instance is having the same issue. Using the IP or escaping the backslash didn't help. |
Have you tried with
The first version should work if the instance name is not the default from SQL Server (e.g. not I know you've already tried with SQL Management Studio, but that test is indeterminate because it tries different routes (named pipes, etc.), and we want to check only if this particular route works. |
I just did and it works just fine. Compared to your guess above (and that might help you), my SQL Server is not on localhost and this is not a SQLEXPRESS edition. |
Did you run |
On the host running Gitea |
@jeffest Since you're not the OP of the issue, let me ask a couple of questions:
Finally... it would be great if you could use a tool like Wireshark to spy the network and check if a connection is being attempted or not even that (you can repeat the |
@guillep2k, it's a brand new instance and, btw, I'm brand new to Gitea. |
Here is what I get in Gitea's log : From the UI, with "forced" Windows Authentication I get the following message :
With login/password I get the following:
This leads me to another possibility. The server I'm trying to connect to is hosting multiple versions of SQL Server. The default instance is SQL Server 2014, then I have named instances for 2008, 2012 and 2016. I was wondering if the MSSQL driver was compatible with the dynamic port assignment technique used by SQL Server. |
@guillep2k, I think my assumption above is correct. The driver only connects to SQL Server on port 1433 which in my case is the default SQL Server instance (i.e. not the one I target). I've checked the logs on that server and I saw the failed login attempts for user 'gitea'. |
@commel, can you please try to obtain the port number used by your instance of SQL Server and try to put that port number in Gitea's ini file ? |
@jeffest Good hunting! I'd never have thought of a multiple instances scenario. 👍 |
@jeffest Great Catch! That did it! The company server in fact has multiple SQL server instances running. I have no direct access to the server itself to find the port so I connected with MSSQL Management Studio and queries the master database with:
which i added to the gitea.ini:
I was able to successfully connect. Then I upgraded to my last tried version (to verify this is the fix and not some update from a later version), which was 1.11.3. Then I've upgraded to 1.11.5. All running now, thank you very much, everybody, specially @lunny, @guillep2k and @jeffest! |
Gitea version (or commit ref): 1.11.0 release
Git version: 2.24.0.windows.1
Operating system: Windows Server 2019 Datacenter Version 1809
Database (use
[x]
):Can you reproduce the bug at https://try.gitea.io:
Log gist:
https://gist.github.com/commel/4f0d03f6f82b25688fb32f1cf2f2a8e8
Description
Starting gitea fails with 1.11.0, the log claims that the password to the MSSQL server is incorrect. Login and Deploy with same config works on previous releases 1.10.3 and 1.9.6. Login with the gitea credentials also work on MSSMS.
This is the configuration:
The text was updated successfully, but these errors were encountered: