Gitea 1.6.2 failed to start after restart with error Invalid object name 'SYS.INDEXES' #2982

Closed
opened 2025-11-02 04:56:05 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @eMuonTau on GitHub (Feb 27, 2019).

  • Gitea version (or commit ref):gitea-1.6.2-windows-4.0-amd64
  • Git version: 2.21.0.windows.1
  • Operating system: Windows Server 2012 R2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    2019/02/27 19:59:03 [I] Log Mode: File(Info)
    2019/02/27 19:59:03 [I] XORM Log Mode: File(Info)
    2019/02/27 19:59:03 [I] Cache Service Enabled
    2019/02/27 19:59:03 [I] Session Service Enabled
    2019/02/27 19:59:03 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: mssql: Invalid object name 'SYS.INDEXES'.

Description

This happened after i restarted my server. If there is any other way that i can provide more info please let me know.

Screenshots

Originally created by @eMuonTau on GitHub (Feb 27, 2019). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref):gitea-1.6.2-windows-4.0-amd64 - Git version: 2.21.0.windows.1 - Operating system: Windows Server 2012 R2 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: 2019/02/27 19:59:03 [I] Log Mode: File(Info) 2019/02/27 19:59:03 [I] XORM Log Mode: File(Info) 2019/02/27 19:59:03 [I] Cache Service Enabled 2019/02/27 19:59:03 [I] Session Service Enabled 2019/02/27 19:59:03 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: mssql: Invalid object name 'SYS.INDEXES'. ## Description This happened after i restarted my server. If there is any other way that i can provide more info please let me know. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/confirmedissue/stale labels 2025-11-02 04:56:05 -06:00
Author
Owner

@techknowlogick commented on GitHub (Feb 27, 2019):

Hi @Noderino, first thing is you'll likely want to upgrade to the latest version as we've fixed some major security vulnerabilities, also the DB library has been updated which might solve the problem.

Are you able to connect directly to MSSQL to run queries manually against it?

@techknowlogick commented on GitHub (Feb 27, 2019): Hi @Noderino, first thing is you'll likely want to upgrade to the latest version as we've fixed some major security vulnerabilities, also the DB library has been updated which might solve the problem. Are you able to connect directly to MSSQL to run queries manually against it?
Author
Owner

@eMuonTau commented on GitHub (Feb 27, 2019):

Yes i can connect to MSSQL without a problem. I also tried to replace gitea.exe with newer versions and latest but i am still getting same error.

@eMuonTau commented on GitHub (Feb 27, 2019): Yes i can connect to MSSQL without a problem. I also tried to replace gitea.exe with newer versions and latest but i am still getting same error.
Author
Owner

@eMuonTau commented on GitHub (Feb 27, 2019):

This is the log before first "Invalid object name" error.

2019/01/29 18:45:40 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials
2019/01/29 18:45:40 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials
2019/01/29 18:46:15 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials
2019/01/29 18:46:15 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials
2019/02/27 13:10:07 [I] Log Mode: File(Info)
2019/02/27 13:10:07 [I] XORM Log Mode: File(Info)
2019/02/27 13:10:07 [I] Cache Service Enabled
2019/02/27 13:10:07 [I] Session Service Enabled
2019/02/27 13:10:08 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: Unable to open tcp connection with host '127.0.0.1:1433': dial tcp 127.0.0.1:1433: connectex: No connection could be made because the target machine actively refused it.
2019/02/27 13:11:07 [I] Log Mode: File(Info)
2019/02/27 13:11:07 [I] XORM Log Mode: File(Info)
2019/02/27 13:11:07 [I] Cache Service Enabled
2019/02/27 13:11:07 [I] Session Service Enabled
2019/02/27 13:11:22 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: mssql: Invalid object name 'SYS.INDEXES'.

@eMuonTau commented on GitHub (Feb 27, 2019): This is the log before first "Invalid object name" error. 2019/01/29 18:45:40 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials 2019/01/29 18:45:40 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials 2019/01/29 18:46:15 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials 2019/01/29 18:46:15 [...routers/repo/http.go:137 HTTP()] [E] invalid credentials 2019/02/27 13:10:07 [I] Log Mode: File(Info) 2019/02/27 13:10:07 [I] XORM Log Mode: File(Info) 2019/02/27 13:10:07 [I] Cache Service Enabled 2019/02/27 13:10:07 [I] Session Service Enabled 2019/02/27 13:10:08 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: Unable to open tcp connection with host '127.0.0.1:1433': dial tcp 127.0.0.1:1433: connectex: No connection could be made because the target machine actively refused it. 2019/02/27 13:11:07 [I] Log Mode: File(Info) 2019/02/27 13:11:07 [I] XORM Log Mode: File(Info) 2019/02/27 13:11:07 [I] Cache Service Enabled 2019/02/27 13:11:07 [I] Session Service Enabled 2019/02/27 13:11:22 [...itea/routers/init.go:60 GlobalInit()] [E] Failed to initialize ORM engine: sync database struct error: mssql: Invalid object name 'SYS.INDEXES'.
Author
Owner

@lunny commented on GitHub (Feb 28, 2019):

Which version of your database?

@lunny commented on GitHub (Feb 28, 2019): Which version of your database?
Author
Owner

@eMuonTau commented on GitHub (Feb 28, 2019):

SQL Server 2014

@eMuonTau commented on GitHub (Feb 28, 2019): SQL Server 2014
Author
Owner

@eMuonTau commented on GitHub (Mar 8, 2019):

@lunny Do you mean version number in dbo.version table? It is 74

@eMuonTau commented on GitHub (Mar 8, 2019): @lunny Do you mean version number in dbo.version table? It is 74
Author
Owner

@lunny commented on GitHub (Mar 8, 2019):

@Noderino No. I means your SQL Server.

@lunny commented on GitHub (Mar 8, 2019): @Noderino No. I means your SQL Server.
Author
Owner

@stale[bot] commented on GitHub (May 7, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (May 7, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (May 21, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (May 21, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2982