Content
View differences
Updated by Marc Schöning over 8 years ago
This morning, I had to restart the openproject service, because the landing page just showed: “Powered by OpenProject”, no other page was visible. After restart, I was able to log in successfully, I created a test user and some groups, added the groups to projects and so on. Finally, I deleted the test user, which was not attached to any group or project. Now, I went back to a project and tried to display the work packages, but I just got a red box:
" Your query is erroneous and could not be processed.
An internal error has occured."
This happens for every project now.
I found this in the production log:
W, \[2018-02-02T08:21:50.987652 \#14262\] WARN — : Creating scope :order\_by\_name. Overwriting existing method Sprint.order\_by\_name.
W, \[2018-02-02T08:21:51.102450 \#14260\] WARN — : Creating scope :order\_by\_name. Overwriting existing method Sprint.order\_by\_name.
E, \[2018-02-02T08:31:12.110317 \#14260\] ERROR — : 2018-02-02T08:31:12+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (0 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:31:22.274750 \#14260\] ERROR — : 2018-02-02T08:31:22+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (1 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:31:47.413936 \#14260\] ERROR — : 2018-02-02T08:31:47+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (2 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:33:17.605457 \#14260\] ERROR — : 2018-02-02T08:33:17+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (3 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:37:02.633234 \#14333\] ERROR — : Grape rescuing from error: API::Errors::InternalError
Original error: \#\<ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.hierarchy\_paths’ doesn’t exist: SELECT DISTINCT \`work\_packages\`.\`id\`, CONCAT\_WS(‘,’, hierarchy\_paths.path, work\_packages.id) AS alias\_0 FROM \`work\_packages\` LEFT OUTER JOIN \`statuses\` ON \`statuses\`.\`id\` = \`work\_packages\`.\`status\_id\` LEFT OUTER JOIN \`projects\` ON \`projects\`.\`id\` = \`work\_packages\`.\`project\_id\` LEFT OUTER JOIN \`relations\` ON \`relations\`.\`to\_id\` = \`work\_packages\`.\`id\` AND (\`relations\`.\`hierarchy\` \!= 0) AND \`relations\`.\`relates\` = 0 AND \`relations\`.\`duplicates\` = 0 AND \`relations\`.\`follows\` = 0 AND \`relations\`.\`blocks\` = 0 AND \`relations\`.\`includes\` = 0 AND \`relations\`.\`requires\` = 0 LEFT OUTER JOIN
hierarchy\_paths
ON
hierarchy\_paths.work\_package\_id = work\_packages.id WHERE \`work\_packages\`.\`project\_id\` IN (SELECT DISTINCT \`projects\`.\`id\` FROM \`projects\` INNER JOIN \`enabled\_modules\` ON \`projects\`.\`id\` = \`enabled\_modules\`.\`project\_id\` AND \`enabled\_modules\`.\`name\` IN (‘work\_package\_tracking’) AND \`projects\`.\`status\` = 1 WHERE \`projects\`.\`status\` = 1) AND ((projects.id IN (3)) AND (statuses.is\_closed=0)) ORDER BY CONCAT\_WS(‘,’, hierarchy\_paths.path, work\_packages.id) LIMIT 20 OFFSET 0\>
Stacktrace:
Now, everytime, I try to display the work packages, I get the:
Original error: \#\<ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.hierarchy\_paths’ doesn’t exist:
error.
" Your query is erroneous and could not be processed.
An internal error has occured."
This happens for every project now.
I found this in the production log:
W, \[2018-02-02T08:21:50.987652 \#14262\] WARN — : Creating scope :order\_by\_name. Overwriting existing method Sprint.order\_by\_name.
W, \[2018-02-02T08:21:51.102450 \#14260\] WARN — : Creating scope :order\_by\_name. Overwriting existing method Sprint.order\_by\_name.
E, \[2018-02-02T08:31:12.110317 \#14260\] ERROR — : 2018-02-02T08:31:12+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (0 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:31:22.274750 \#14260\] ERROR — : 2018-02-02T08:31:22+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (1 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:31:47.413936 \#14260\] ERROR — : 2018-02-02T08:31:47+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (2 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:33:17.605457 \#14260\] ERROR — : 2018-02-02T08:33:17+0100: \[Worker(host:linuxsrv pid:14260)\] Job DeleteUserJob (id=172) FAILED (3 prior attempts) with ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.two\_factor\_authentication\_devices’ doesn’t exist: SHOW FULL FIELDS FROM \`two\_factor\_authentication\_devices\`
E, \[2018-02-02T08:37:02.633234 \#14333\] ERROR — : Grape rescuing from error: API::Errors::InternalError
Original error: \#\<ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.hierarchy\_paths’ doesn’t exist: SELECT DISTINCT \`work\_packages\`.\`id\`, CONCAT\_WS(‘,’, hierarchy\_paths.path, work\_packages.id) AS alias\_0 FROM \`work\_packages\` LEFT OUTER JOIN \`statuses\` ON \`statuses\`.\`id\` = \`work\_packages\`.\`status\_id\` LEFT OUTER JOIN \`projects\` ON \`projects\`.\`id\` = \`work\_packages\`.\`project\_id\` LEFT OUTER JOIN \`relations\` ON \`relations\`.\`to\_id\` = \`work\_packages\`.\`id\` AND (\`relations\`.\`hierarchy\` \!= 0) AND \`relations\`.\`relates\` = 0 AND \`relations\`.\`duplicates\` = 0 AND \`relations\`.\`follows\` = 0 AND \`relations\`.\`blocks\` = 0 AND \`relations\`.\`includes\` = 0 AND \`relations\`.\`requires\` = 0 LEFT OUTER JOIN
hierarchy\_paths
ON
hierarchy\_paths.work\_package\_id = work\_packages.id WHERE \`work\_packages\`.\`project\_id\` IN (SELECT DISTINCT \`projects\`.\`id\` FROM \`projects\` INNER JOIN \`enabled\_modules\` ON \`projects\`.\`id\` = \`enabled\_modules\`.\`project\_id\` AND \`enabled\_modules\`.\`name\` IN (‘work\_package\_tracking’) AND \`projects\`.\`status\` = 1 WHERE \`projects\`.\`status\` = 1) AND ((projects.id IN (3)) AND (statuses.is\_closed=0)) ORDER BY CONCAT\_WS(‘,’, hierarchy\_paths.path, work\_packages.id) LIMIT 20 OFFSET 0\>
Stacktrace:
Now, everytime, I try to display the work packages, I get the:
Original error: \#\<ActiveRecord::StatementInvalid: Mysql2::Error: Table ‘openproject.hierarchy\_paths’ doesn’t exist:
error.