bitnami / vms

Bitnami VMs
https://bitnami.com
Other
203 stars 42 forks source link

[Redmine] Mysql2 error Unknown column 'roles.default_time_entry_activity_id' #1391

Closed paincoder closed 5 months ago

paincoder commented 6 months ago

We are trying to migrate bitnami redmine version from 4.2.3-3 (windows) to 5.1.0 (aws debian).

We encountered the below error after database migration is done, when I tried to open issue details page: image

I, [2024-01-24T09:24:34.639886 #240559] INFO -- : [c95baa9a-2553-4306-826a-64c5b21aaa3c] Rendered layout layouts/base.html.erb (Duration: 97.4ms | Allocations: 61719) I, [2024-01-24T09:24:34.640311 #240559] INFO -- : [c95baa9a-2553-4306-826a-64c5b21aaa3c] Completed 200 OK in 172ms (Views: 90.2ms | ActiveRecord: 31.9ms | Allocations: 88284) I, [2024-01-24T09:24:38.426255 #240559] INFO -- : [6733bddb-7979-4643-9523-58dc9d1483b1] Started GET "/issues/12114" for xx.xx.xx.xxx at 2024-01-24 09:24:38 +0000 I, [2024-01-24T09:24:38.426926 #240559] INFO -- : [6733bddb-7979-4643-9523-58dc9d1483b1] Processing by IssuesController#show as HTML I, [2024-01-24T09:24:38.426974 #240559] INFO -- : [6733bddb-7979-4643-9523-58dc9d1483b1] Parameters: {"id"=>"12114"} I, [2024-01-24T09:24:38.430428 #240559] INFO -- : [6733bddb-7979-4643-9523-58dc9d1483b1] Current user: XX.XXX (id=149) I, [2024-01-24T09:24:38.464367 #240559] INFO -- : [6733bddb-7979-4643-9523-58dc9d1483b1] Completed 500 Internal Server Error in 37ms (ActiveRecord: 11.4ms | Allocations: 12798) F, [2024-01-24T09:24:38.465162 #240559] FATAL -- : [6733bddb-7979-4643-9523-58dc9d1483b1]
[6733bddb-7979-4643-9523-58dc9d1483b1] ActiveRecord::StatementInvalid (Mysql2::Error: Unknown column 'roles.default_time_entry_activity_id' in 'where clause'): [6733bddb-7979-4643-9523-58dc9d1483b1]
[6733bddb-7979-4643-9523-58dc9d1483b1] app/models/time_entry_activity.rb:68:in sort' [6733bddb-7979-4643-9523-58dc9d1483b1] app/models/time_entry_activity.rb:68:indefault_activity_id' [6733bddb-7979-4643-9523-58dc9d1483b1] app/models/time_entry.rb:110:in initialize' [6733bddb-7979-4643-9523-58dc9d1483b1] app/controllers/issues_controller.rb:114:inblock (2 levels) in show' [6733bddb-7979-4643-9523-58dc9d1483b1] app/controllers/issues_controller.rb:110:in show' [6733bddb-7979-4643-9523-58dc9d1483b1] lib/redmine/sudo_mode.rb:61:insudo_mode' I, [2024-01-24T09:24:56.497736 #240559] INFO -- : [443675d9-4966-4d61-9021-93f31d8acd15] Started GET "/" for xx.xx.xx.xxx at 2024-01-24 09:24:56 +0000 I, [2024-01-24T09:24:56.498369 #240559] INFO -- : [443675d9-4966-4d61-9021-93f31d8acd15] Processing by WelcomeController#index as HTML

The error comes from this code: image

Can you help us if possible?

Thanks & Regards, Ye

jotamartos commented 6 months ago

Hi @paincoder,

Thank you for using Bitnami. That's a specific error of the application so we suggest you contact the Redmine's support team to get more information about how to resolve it.

Thanks

paincoder commented 6 months ago

Hi jotamartos,

Thank you for your comment. I checked with Redmine team already. Here is their reply. image

Regards, Ye

jotamartos commented 6 months ago

We take the files from the upstream project and only install and configure the application. I understand you are following the guide to upgrade redmine and you are running the "db:migrate" command, right?

https://docs.bitnami.com/general/apps/redmine/administration/upgrade/

If that's the case, you can verify that the file exists by running these commands

cd /opt/bitnami/redmine
sudo find . | grep add_default_time_entry_activity_to_roles
paincoder commented 6 months ago

Hi @jotamartos

Thanks for your comment. I will check and update you back.

Regards, Ye

paincoder commented 5 months ago

Hi @jotamartos

Can you help me about this vulnerability? Can you provide the solution if we can fix? Or if we cannot, may I have confirmation the reason which is not required to fix?

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

Plugin | DNS Name | Synopsis | Description | Solution | Vulnerability Priority Rating | CPE | CVE | Patch Publication Date | Plugin Output | CVSS V2 Base Score | CVSS V3 Base Score | First Discovered | Last Observed | Vuln Publication Date | Plugin Publication Date | Plugin Modification Date | Check Type | Version | Plugin Name |   -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- 33851 | xxxxx.xxx.xx.com | Some daemon processes on the remote host are associated with programs that have been installed manually. | Some daemon processes on the remote host are associated with programs that have been installed manually. System administration best practice dictates that an operating system's native package management tools be used to manage software installation, updates, and removal whenever possible. | Use packages supplied by the operating system vendor whenever possible. And make sure that manual software installation agrees with your organization's acceptable use and security policies. | N/A | Plugin Output: The following running daemons are not managed by dpkg : /opt/bitnami/apache/bin/httpd /opt/bitnami/ruby/bin/ruby /usr/sbin/dhclient | 2.1 | 3.1 | Jan 4, 2024 04:03:24 +08 | Jan 22, 2024 05:03:26 +08 | N/A | Aug 8, 2008 12:00:00 +08 | Nov 27, 2023 12:00:00 +08 | local | 1.25 | Network daemons not managed by the package system

Thanks & Regards, Ye

jotamartos commented 5 months ago

Plugin Output: The following running daemons are not managed by dpkg : /opt/bitnami/apache/bin/httpd /opt/bitnami/ruby/bin/ruby /usr/sbin/dhclient

We do not use the system packages to install the different components of the solution. As you can see, the Apache and Ruby binaries are inside the /opt/bitnami directory that is where we install all the components. You can skip this issue as this is expected when using the Bitnami solutions.

github-actions[bot] commented 5 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 5 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

paincoder commented 5 months ago

Plugin Output: The following running daemons are not managed by dpkg : /opt/bitnami/apache/bin/httpd /opt/bitnami/ruby/bin/ruby /usr/sbin/dhclient

We do not use the system packages to install the different components of the solution. As you can see, the Apache and Ruby binaries are inside the /opt/bitnami directory that is where we install all the components. You can skip this issue as this is expected when using the Bitnami solutions.

Thank you for your reply. I was travellling. Sorry for delay.