Migrating from 1.10.1 to 1.16.0

Hi,

i moved my gitea to a new server. On the way to the new server, i also upgraded gitea from 1.10.1 to 1.16.0. From the firtst look everything went fine an there a only some smalls prolems which where fixed fast.
But two problems still remains:

  1. When i try to access the Admin-Page i get error 500
  2. I see all my imported repros from the old server, but if i try to access it i get the error 404. If i create a new repro i can access it…

All files on the new server are in the some place like in the old server. Can somebody provide a hint where the problems is?

If you need some logs, just tell me which one and i will provied it.

Regards
gerribaldi

The first one is a bug which will be fixed in 1.16.2

please provide the logs to investigate the second problem.

Thumb up for No 1

No 2 - i hope this helps. Check for the repro nodered_moekki

Link to Log

Regards

2022/02/14 20:37:18 ...ules/context/repo.go:562:RepoAssignment() [E] Repository 18:/nodered_Moekki has a broken repository on the file system: /home/git/gitea-repositories/nodered_moekki.git Error: no such file or directory

Looks like your repository root path is not right?

No, i check this and everything is looks fine.
image

But if i click on the link for the repro i get this url:
http://git.moekki.eu//nodered_Moekki

In the list of the repros it looks in this way. The first one is working and the second not.
image

It’s obvious not right. All repositories should be under owner name directory. /<owner_name>/<repo_name>.git

It’s now differenz - doesn’t matter if i put it under owner name dir or organization dir.

One thing is strange:
On the new organization xxx with the repro cxy the link is like this http://git.moekki.eu/XXX/cxy

On the “old” repro with the organzitation moekki the link is like is http://nodered_moekki/ Should this normaly http://git.moekki.eu/moekki/nodered_moekki

I don’t know how did you address that. I think the repositories should be moved manually.

You should also check whether ROOT_URL pointed to the right place.

The root_url is the same like befor - i just copied the old app.ini to the new server.

The repositories are moved manuelly to the server and to the right place.

image

If i go with the mouse to the repositorie XXX/cxy it show´s me this link:
http://git.moekki.eu/XXX/cxy - this is working. If i click it, it shows me the repositorie

If i go with the mouse to the repositorie /nodered_Moekki it show´s me this link:
http://git.moekki.eu//nodered_Moekki - this it not working. If i click the link, i got the error 404
But i got no idea how gitea create this link!

I guess if i can fix the link, everything is working

Check your repository table, some records’ owner_name are empty which should be copied from user table’s login_name according owner_id.

You can update it via a SQL after you backup repository table.
UPDATE repository SET owner_name = (SELECT login_name FROM user WHERE user.id = repository.owner_id)

The reason causing this problem because some migrations step failed and ignored.

it’s still not working. The ID was set correct also befor the update. There where no empty tables…

Is it maybe a problem that i perform the update directly from 1.10.1 to 1.16.0?
…and i’m still courios about the strage kind of links…

You should upgarde from 1.10.x → 1.11.x → 1.12.x → … → 1.16.x .

1 Like

OK. So i will restore my last backup. After this i will update like you write…

should upgarde from 1.10.x → 1.11.x → 1.12.x → … → 1.16.x .

Everything is working fine now - Thanks :+1:

@lunny I’m curious to know why you recommended a step by step upgrade in this case while you approved a upgrade that goes directly to the latest version in another case?

@gerribaldi do you remember (or made a note) of the intermediate versions you used during your upgrade? Also if you performed the manual steps recommended in the 1.13.0 and 1.16.4 release notes?

Although upgrade from 1.10 to 1.16 directly should be supported. But a step by step will let you know the detail when encounter upgrade failure. You can clearly know it’s the problem when upgrade from 1.xx to 1.xy which could help to resolve the problem.

In that link you mentioned above, because I know the error he encountered has been fixed by later versions so I said you can continue to upgrade.

1 Like

@dachary
I update to the latest version in the 1.10.x path. After this, i just upgrade like i wrote before. After the last upgrade i try to login for the first time - and it works :slight_smile:

1 Like