Uploading files in Hipchat Server fails with error "Could not find bucket"
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
This version of Hipchat Server is no longer supported
This article applies to a version of Hipchat Server which is beyond the Atlassian End of Life policy, and is no longer supported.
You should upgrade to a more recent version of Hipchat Server as soon as you can to take advantage of new features, and security and bug fixes. If possible, you should also consider deploying Hipchat Data Center instead.
問題
Files fail to be upload through Hipchat and the following appears in the /var/log/hipchat/coral.log:
2016-01-19T04:42:33.963698+00:00 hipchat coral-2:/user/95/share/file#REQaz0Knm ALERT: 500 error processing request /user/95/share/file : Exception("Could not find bucket in
{'JP': 'files', 'US': 'files', 'AP': 'files', 'AU': 'files', 'BR': 'files', 'EU': 'files'}for given location: local",)
2016-01-19T04:42:33.963801+00:00 hipchat coral-2:/user/95/share/file#REQaz0Knm ERROR: Sending API error: 500 - An internal error occurred. Please try again later.
診断
The problem is present after an upgrade from an old version of Hipchat Server to a recent version.
原因
A parameter in the Hipchat database points to an invalid storage path causing file uploads to fail.
ソリューション
Update the metadata column in the groups table to remove "storage_location": "local" from the JSON. For example, if the query return the following:
MariaDB [hipchat]> SELECT metadata FROM groups;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| metadata |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| {"perms": {"create_rooms": "all", "profile_edit": "all", "hipconnect": "all", "manage_room_integrations": "all", "guest_access": "none"}, "invite_key": "7ef2244da4d352f577fae105115053a7", "history_retention": "3", "has_signed_in": 1, "storage_location":"local"} |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
Run this query:
UPDATE groups SET metadata='{"perms": {"create_rooms": "all", "profile_edit": "all", "hipconnect": "all", "manage_room_integrations": "all", "guest_access": "none"}, "invite_key": "7ef2244da4d352f577fae105115053a7", "history_retention": "3", "has_signed_in": 1}';