1.1.0 can't start again when I use SQLite #457

Closed
opened 2025-11-02 03:24:08 -06:00 by GiteaMirror · 12 comments
Owner

Originally created by @papiorasu on GitHub (Mar 10, 2017).

  • Gitea version (or commit ref):1.1.0
  • Git version:
  • Operating system: Windows 7 pro / 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:

Description

A database file of SQLite not exists:
The file of the default is generated, and Gitea starts.

A database file of SQLite exists:
The service of Gitea does not start. (system error 1067)

System error 1067 is MySQL error.
I think that Gitea choose a database unlike setting.

Originally created by @papiorasu on GitHub (Mar 10, 2017). - Gitea version (or commit ref):1.1.0 - Git version: - Operating system: Windows 7 pro / Windows Server 2012 R2 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description **A database file of SQLite not exists:** The file of the default is generated, and Gitea starts. **A database file of SQLite exists:** The service of Gitea does not start. (system error 1067) System error 1067 is MySQL error. I think that Gitea choose a database unlike setting.
GiteaMirror added the issue/duplicate label 2025-11-02 03:24:08 -06:00
Author
Owner

@lunny commented on GitHub (Mar 10, 2017):

@andreynering maybe you can confirm this one.

@lunny commented on GitHub (Mar 10, 2017): @andreynering maybe you can confirm this one.
Author
Owner

@pgaskin commented on GitHub (Mar 10, 2017):

Not happening to me

@pgaskin commented on GitHub (Mar 10, 2017): Not happening to me
Author
Owner

@lunny commented on GitHub (Mar 11, 2017):

@papiorasu please give more detail since @geek1011 and I cannot reproduce it.

@lunny commented on GitHub (Mar 11, 2017): @papiorasu please give more detail since @geek1011 and I cannot reproduce it.
Author
Owner

@pgaskin commented on GitHub (Mar 11, 2017):

@papiorasu could you show your config file?

@pgaskin commented on GitHub (Mar 11, 2017): @papiorasu could you show your config file?
Author
Owner

@papiorasu commented on GitHub (Mar 11, 2017):

I see.
I am using gitea at the company so I will present it on Monday.

@papiorasu commented on GitHub (Mar 11, 2017): I see. I am using gitea at the company so I will present it on Monday.
Author
Owner

@papiorasu commented on GitHub (Mar 13, 2017):

APP_NAME = Gitea: Git with a cup of tea
RUN_USER = PAPIORASU$
RUN_MODE = prod

[database]
DB_TYPE  = sqlite3
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = gitea
PASSWD   = 
SSL_MODE = disable
PATH     = C:/gitea/data/gitea.sqlite3

[repository]
ROOT = C:/gitea/gitea-repositories

[server]
SSH_DOMAIN       = localhost
HTTP_PORT        = 3000
ROOT_URL         = http://localhost:3000/
DISABLE_SSH      = false
SSH_PORT         = 22
LFS_START_SERVER = false
OFFLINE_MODE     = false

[mailer]
ENABLED = false

[service]
REGISTER_EMAIL_CONFIRM     = false
ENABLE_NOTIFY_MAIL         = false
DISABLE_REGISTRATION       = false
ENABLE_CAPTCHA             = false
REQUIRE_SIGNIN_VIEW        = false
DEFAULT_KEEP_EMAIL_PRIVATE = false
NO_REPLY_ADDRESS           = noreply.example.org

[picture]
DISABLE_GRAVATAR        = false
ENABLE_FEDERATED_AVATAR = false

[session]
PROVIDER = file

[log]
MODE      = file
LEVEL     = Info
ROOT_PATH = C:/gitea/log

[security]
INSTALL_LOCK = true
SECRET_KEY   = 34T7KAqOzV

And MySQL is not installed in my environment.

Furthermore I did a more detailed test.
I tested whether it can be started with 1.0.2 and 1.1.0.

 

Gitea Version

1.0.2

1.1.0

Generate Database Version

1.0

1/30

30/30

1.0.2

2/30

1/30

1.1.0

2/30

2/30

I prepared a database that is running (generated by 1.0) and newly generated one (generated by 1.0.2 and 1.1.0).
This is the number of times an error occurred after starting the service 30 times.

I used the following files.
Gitea-1.0.2-windows-4.0-amd64.exe
Gitea-1.1.0-windows-4.0-amd64.exe

@papiorasu commented on GitHub (Mar 13, 2017): <pre>APP_NAME = Gitea: Git with a cup of tea RUN_USER = PAPIORASU$ RUN_MODE = prod [database] DB_TYPE = sqlite3 HOST = 127.0.0.1:3306 NAME = gitea USER = gitea PASSWD = SSL_MODE = disable PATH = C:/gitea/data/gitea.sqlite3 [repository] ROOT = C:/gitea/gitea-repositories [server] SSH_DOMAIN = localhost HTTP_PORT = 3000 ROOT_URL = http://localhost:3000/ DISABLE_SSH = false SSH_PORT = 22 LFS_START_SERVER = false OFFLINE_MODE = false [mailer] ENABLED = false [service] REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false DISABLE_REGISTRATION = false ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false DEFAULT_KEEP_EMAIL_PRIVATE = false NO_REPLY_ADDRESS = noreply.example.org [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false [session] PROVIDER = file [log] MODE = file LEVEL = Info ROOT_PATH = C:/gitea/log [security] INSTALL_LOCK = true SECRET_KEY = 34T7KAqOzV</pre> And MySQL is not installed in my environment. Furthermore I did a more detailed test. I tested whether it can be started with 1.0.2 and 1.1.0. <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=312 style='width:234.0pt;margin-left:-.05pt;border-collapse:collapse;mso-yfti-tbllook: 1184;mso-padding-alt:0mm 4.95pt 0mm 4.95pt'> <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:15.0pt'> <td width=157 nowrap colspan=2 rowspan=2 style='width:118.0pt;border-top: windowtext;border-left:windowtext;border-bottom:black;border-right:black; border-style:solid;border-width:1.0pt;mso-border-top-alt:windowtext; mso-border-left-alt:windowtext;mso-border-bottom-alt:black;mso-border-right-alt: black;mso-border-style-alt:solid;mso-border-width-alt:.5pt;padding:0mm 4.95pt 0mm 4.95pt; height:15.0pt'> <p class=MsoNormal align=center style='text-align:center;mso-pagination:widow-orphan'><span style='font-size:11.0pt;font-family:"Meiryo UI";color:black;mso-font-kerning: 0pt'> <span lang=EN-US><o:p></o:p></span></span></p> </td> <td width=155 nowrap colspan=2 style='width:116.0pt;border:solid windowtext 1.0pt; border-left:none;mso-border-top-alt:solid windowtext .5pt;mso-border-bottom-alt: solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding: 0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=center style='text-align:center;mso-pagination:widow-orphan'><span class=SpellE><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI"; color:black;mso-font-kerning:0pt'>Gitea</span></span><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black;mso-font-kerning: 0pt'> Version<o:p></o:p></span></p> </td> </tr> <tr style='mso-yfti-irow:1;height:15.0pt'> <td width=72 nowrap style='width:54.25pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>1.0.2<o:p></o:p></span></p> </td> <td width=82 nowrap style='width:61.75pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>1.1.0<o:p></o:p></span></p> </td> </tr> <tr style='mso-yfti-irow:2;height:15.0pt'> <td width=80 rowspan=3 style='width:60.0pt;border:solid windowtext 1.0pt; border-top:none;mso-border-left-alt:solid windowtext .5pt;mso-border-bottom-alt: solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt;padding: 0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=center style='text-align:center;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>Generate Database Version<o:p></o:p></span></p> </td> <td width=77 nowrap style='width:58.0pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>1.0<o:p></o:p></span></p> </td> <td width=72 nowrap style='width:54.25pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>1/30<o:p></o:p></span></p> </td> <td width=82 nowrap style='width:61.75pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>30/30<o:p></o:p></span></p> </td> </tr> <tr style='mso-yfti-irow:3;height:15.0pt'> <td width=77 nowrap style='width:58.0pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>1.0.2<o:p></o:p></span></p> </td> <td width=72 nowrap style='width:54.25pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>2/30<o:p></o:p></span></p> </td> <td width=82 nowrap style='width:61.75pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>1/30<o:p></o:p></span></p> </td> </tr> <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes;height:15.0pt'> <td width=77 nowrap style='width:58.0pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>1.1.0<o:p></o:p></span></p> </td> <td width=72 nowrap style='width:54.25pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>2/30<o:p></o:p></span></p> </td> <td width=82 nowrap style='width:61.75pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; mso-border-bottom-alt:solid windowtext .5pt;mso-border-right-alt:solid windowtext .5pt; padding:0mm 4.95pt 0mm 4.95pt;height:15.0pt'> <p class=MsoNormal align=left style='text-align:left;mso-pagination:widow-orphan'><span lang=EN-US style='font-size:11.0pt;font-family:"Meiryo UI";color:black; mso-font-kerning:0pt'>2/30<o:p></o:p></span></p> </td> </tr> </table> I prepared a database that is running (generated by 1.0) and newly generated one (generated by 1.0.2 and 1.1.0). This is the number of times an error occurred after starting the service 30 times. I used the following files. Gitea-1.0.2-windows-4.0-amd64.exe Gitea-1.1.0-windows-4.0-amd64.exe
Author
Owner

@lunny commented on GitHub (Mar 13, 2017):

Are you running a windows service?

@lunny commented on GitHub (Mar 13, 2017): Are you running a windows service?
Author
Owner

@papiorasu commented on GitHub (Mar 13, 2017):

Yes. I referred to Gitea 's blog.
https://docs.gitea.io/en-us/windows-service/

@papiorasu commented on GitHub (Mar 13, 2017): Yes. I referred to Gitea 's blog. https://docs.gitea.io/en-us/windows-service/
Author
Owner

@papiorasu commented on GitHub (Mar 16, 2017):

I confirmed that Gitea can be started by changing the "Version" table of the used SQLite database.
I changed "Version" from 15 to 22.
In the case of a newly created database, this process was performed automatically by Gitea.
However, Gitea of Ver.1.1.0 has not executed this processing in my used database.
So I manually fixed the database. And Gitea started.

The above-mentioned problem that does not start "30/30 times" has been solved.
However, the problems caused by Windows services remain.

@papiorasu commented on GitHub (Mar 16, 2017): I confirmed that Gitea can be started by changing the "Version" table of the used SQLite database. I changed "Version" from 15 to 22. In the case of a newly created database, this process was performed automatically by Gitea. However, Gitea of Ver.1.1.0 has not executed this processing in my used database. So I manually fixed the database. And Gitea started. The above-mentioned problem that does not start "30/30 times" has been solved. However, the problems caused by Windows services remain.
Author
Owner

@lunny commented on GitHub (Mar 16, 2017):

So what's the issue it is?

@lunny commented on GitHub (Mar 16, 2017): So what's the issue it is?
Author
Owner

@papiorasu commented on GitHub (Mar 16, 2017):

First, It is a bug that Gitea has failed to change the "Version" of the used database.

Second, Windows services often do not start up.
I think this is the same as Issue 821.
Windows 7 Fails to start as a service, Web command works https://github.com/go-gitea/gitea/issues/821
I do not know the cause of this issue.

@papiorasu commented on GitHub (Mar 16, 2017): First, It is a bug that Gitea has failed to change the "Version" of the used database. Second, Windows services often do not start up. I think this is the same as Issue 821. **Windows 7 Fails to start as a service, Web command works** https://github.com/go-gitea/gitea/issues/821 I do not know the cause of this issue.
Author
Owner

@lunny commented on GitHub (Mar 16, 2017):

So let's discuss there.

@lunny commented on GitHub (Mar 16, 2017): So let's discuss there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#457