tobybatch / kimai2

Docker containers for the kimai2 web application including docker-compose and kubernetes/helm deployment.
MIT License
183 stars 96 forks source link

Error 500 When I click on "My profile" #37

Closed VladimirPuidak closed 4 years ago

VladimirPuidak commented 4 years ago

Hey. We used kimai 0.8.1 built on the basis of docker. 10/10/2019 We updated to version kimai / kimai2: apache-debian-1.4.1.

When I click on "My profile" I get an error: My profile

What logs to show me?

Schrolli91 commented 4 years ago

Do all other functions still work or will you get this error on each page?

VladimirPuidak commented 4 years ago

I get this error only on this page.

kevinpapst commented 4 years ago

@organ2 did you test with a SUPER_ADMIN account? Your screenshot shows a very limited user, which is not representative. Login with SUPER_ADMIN, open "Doctor" from the menu and copy&paste the logs here.

VladimirPuidak commented 4 years ago

The log file in the attachment log.txt

Schrolli91 commented 4 years ago

@kevinpapst do you have any idea if this is an kimai issue or still one from the docker image?

kevinpapst commented 4 years ago

Not an Kimai issue.

The mapping file /opt/kimai/config/serializer/App/API.Model.I18n.yml does not exist: It looks as if the code (config folder) was only partially updated. There are files missing and I am not sure what the result is. Maybe the other errors are follow ups (assuming an old cache was used by Symfony).

The other linked #38 issue comes from the same reason, there is an old config loaded with a config key that is no longer supported.

The profile page doesn't load, because the additional Doctrine functions could not be loaded: FUNCTION kimai.strftime does not exist

The avatar in the upper right clearly says that Kimai >= 1.4 is used and it works, so I guess the fixed docker image is used?! I would concentrate on finding out why the config folder is not up-to-date. Actually I have no clue how the docker images work..., so maybe this is a stupid question: but can we check git status of the codebase?

Schrolli91 commented 4 years ago

@organ2 can you try an docker image with kimai 1.3? At the moment we have some issues with the kimai 1.4 images, we're working on that.

@kevinpapst yes a git status should work inside the container

VladimirPuidak commented 4 years ago

@organ2 can you try an docker image with kimai 1.3? At the moment we have some issues with the kimai 1.4 images, we're working on that.

I've updated kimai 0.8.1 to 1.3 on my virtual machine and encountered with same errors. It's erros on my profile page and crashing Kimai when i do export to the pdf file.

kevinpapst commented 4 years ago

Did you change any configs on your end @organ2 ?

tobybatch commented 4 years ago

@organ2 And can you please share your docker command or docker-compose.yml.

VladimirPuidak commented 4 years ago

Did you change any configs on your end @organ2 ?

I didn't change ane configs. I just changed "image: kimai:0.8.1" to "image: kimai/kimai2:apache-debian-1.4.1" in docker-compose.yml. After that I used this command to update Kimai: sudo docker-compose up -d --force-recreate

@organ2 And can you please share your docker command or docker-compose.yml.

My current docker-compose.yml [removed]

Schrolli91 commented 4 years ago

@organ2 have removed your compose file - credentials inside !!!

tobybatch commented 4 years ago

@organ2 I tested your docker compose with my local set up. I deleted your volumes, they make no sense for me to use. My profile does not error.

tobybatch commented 4 years ago

can you send me the full hash of your 1.4.1 tag please?

docker image ls --no-trunc kimai/kimai2:apache-debian-1.4.1

VladimirPuidak commented 4 years ago

@organ2 have removed your compose file - credentials inside !!!

I changed credentials to wrong. Anyway thank you :)

can you send me the full hash of your 1.4.1 tag please?

docker image ls --no-trunc kimai/kimai2:apache-debian-1.4.1

123.txt

tobybatch commented 4 years ago

Can try and re-pull the 1.4.1 tag please, that may me an out of date tag., kimai/kimai2:apache-debian-1.4.1

f9fd679ac4c42dff13131904d22c46064e7b3bb502a70a35da2f5374ba34b496
VladimirPuidak commented 4 years ago

Do you mean re-pull and rebuild docker image or something else? Because I tried and found no git commit with such hash in your repo.

Schrolli91 commented 4 years ago

you have to re-pull the kimai image https://docs.docker.com/compose/reference/pull/

EDIT: btw - thats the hash from the dockerhub image

VladimirPuidak commented 4 years ago

Hello. Sorry for not writing for so long. I re-pulled the kimai image and now the hash of my 1.4.1 image is f9fd679ac4c42dff13131904d22c46064e7b3bb502a70a35da2f5374ba34b496. But i got same error on the page "My profile". What else can i try?

Schrolli91 commented 4 years ago

@organ2 can you try an docker image with kimai 1.3? At the moment we have some issues with the kimai 1.4 images - maybe thats the reason - we're working on that.

VladimirPuidak commented 4 years ago

@organ2 can you try an docker image with kimai 1.3? At the moment we have some issues with the kimai 1.4 images - maybe thats the reason - we're working on that.

I've tried the image 1.3. It didn't help.

Also I installed the docker kimai 1.4.1 on new virtual machine and all works correctly. Is there a problem in my production database?

kevinpapst commented 4 years ago

Did you follow the upgrade guide?

VladimirPuidak commented 4 years ago

Did you follow the upgrade guide?

I just changed the image 0.8.1 to 1.4.1 in the docker-compose.yml and rerun containers.

kevinpapst commented 4 years ago

Do you have a local.yaml in place? If so, read the UPGRADING.md . If not, maybe the database wasn't migrated. Post the contents of the table migration_versions.

VladimirPuidak commented 4 years ago

Do you have a local.yaml in place? If so, read the UPGRADING.md . If not, maybe the database wasn't migrated. Post the contents of the table migration_versions.

Yes, I have a local.yaml. I watched UPGRADING.md, but I understood only that need to give a write access for folder "avatar". local_yml.txt

What information is needed from the table migration_versions? 2019-10-24 18_15_41-dbForge Studio 2019 Express for MySQL - Start Page

kevinpapst commented 4 years ago

You should check at least the role permissions in local.yaml if you need them (or remove them completely). They were changed and you should adapt your config to make sure that you have the correct permission check (see documentation)

I need the contents of the migration_versions table. It should contain something like this (obviously only the first column is important):

Bildschirmfoto 2019-10-24 um 17 24 57
VladimirPuidak commented 4 years ago

Contents of the migration_versions table. migration_versions

kevinpapst commented 4 years ago

All migrations ran successful.

Okay, whatever is going on, this is not a Kimai issue. The log clearly says that the filesystem contents are not correct (missing configs...). You could compare the contents against a current clone.

Sorry, but I am out.

Schrolli91 commented 4 years ago

has you mounted the kimai folder to you host file system?

VladimirPuidak commented 4 years ago

Yes, I have the mounted kimai folder. This is a part of my docker-compose.yaml.

kimai: image: kimai/kimai2:apache-debian-1.4.1 environment:

Schrolli91 commented 4 years ago

I think the mounted config is the problem - maybe an old format? What happens if you remove the config mount? is kimai running correctly then?

VladimirPuidak commented 4 years ago

Yes, the problem is in the old file format. I copied the folder "config" from kevinpapst/kimai2, loaded my local.yaml and restarted docker-compose. All my problems have been gone. Thanks for the help.

Schrolli91 commented 4 years ago

ok, then we can close here?

For further Docker images we try to improve the docs especially for the updating case

VladimirPuidak commented 4 years ago

yes