gitea: ORM fails to connect - Login error with MSSQL

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:

[database]
DB_TYPE  = mssql
HOST     = host\dbinstance
NAME     = gitea
USER     = gitea
PASSWD   = xxxx
SSL_MODE = disable

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 33 (15 by maintainers)

Most upvoted comments

@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:

SELECT DISTINCT 
    local_tcp_port 
FROM sys.dm_exec_connections 
WHERE local_tcp_port IS NOT NULL

which i added to the gitea.ini:

HOST     = my-hostname\MYINSTANCENAME:49555

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!

@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 ? HOST = host\dbinstance:port I just want to find out if my findings will help you out or if our problems have different sources. Obviously in my case I cannot test with a previous version of Gitea as this is my first install.

On the host running Gitea

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. 😦