There was a problem uploading the avatar. Please try again later.
Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.
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 is for an outdated version of Hipchat Server
This article applies to a version of Hipchat Server which will be deprecated soon. After that period the version will no longer be 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.
問題
When trying to upload an avatar in Hipchat Server administrative interface, the following error message is displayed:
診断
環境
- Hipchat Server 1.2.7 and above
再現手順
- Log into Hipchat Server as an Administrator
Group Admin >> Group Info
に移動します。- Click Browse under Group avatar to select an image, then click Upload new avatar
Verification
Run the SQL command and verify that "storage_location": "local" is included:
DBPASS=$(awk '/"pass"/ {gsub(/[",]/,"");print $2}' /hipchat/config/site.json) && mysql -uroot -p$DBPASS hipchat -e "SELECT metadata FROM groups;
例:
admin@hipchat:~$ DBPASS=$(awk '/"pass"/ {gsub(/[",]/,"");print $2}' /hipchat/config/site.json) && mysql -uroot -p$DBPASS hipchat -e "SELECT metadata FROM groups;"+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+| metadata |+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+| {"storage_location": "local", "perms": {"create_rooms": "admins", "emoticon_admin": "all", "file_sharing": "all", "history_edit_perm": "admins", "guest_access": "none"}, "history_retention": "3", "email_domains": ["example.com"], "trial_expiration": "2017-10-19 02:08:52", "has_signed_in": 1, "email_domain": "example.com", "forgot_password_link_for_directory_users": null} |+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
原因
This is caused by a string in the database which points to an invalid storage location.
ソリューション
- Perform a back up of the Hipchat Server by referring to the Back up and restore Hipchat Server documentation
Access the hipchat database using the command:
DBPASS=$(awk '/"pass"/ {gsub(/[",]/,"");print $2}' /hipchat/config/site.json) && mysql -uroot -p$DBPASS hipchat
Update the metadata column of the hipchat.groups to exclude the "storage_location": "local" parameter. For example:
UPDATE groups SET metadata ='{"perms": {"create_rooms": "admins", "emoticon_admin": "all", "file_sharing": "all", "history_edit_perm": "admins", "guest_access": "none"}, "history_retention": "3", "email_domains": ["wellsfargo.com"], "trial_expiration": "2015-01-19 02:08:52", "has_signed_in": 1, "email_domain": "wellsfargo.com", "forgot_password_link_for_directory_users": null}' WHERE id=1;
Once done, exit the SQL console:
exit
Next, we need to verify that site.json has the correct storage path. Run this query:
cat /hipchat/config/site.json | grep -A1 '"storage":'
You are expected to see an output similar to this:
admin@hipchat:~$ cat /hipchat/config/site.json | grep -A1 '"storage":' "storage": { "path": "/file_store/local"
If your output looks different, please modify the file so it looks like above. Gain the root access first:
sudo dont-blame-hipchat
Modify the file using nano or any text editor of your choice:
nano /hipchat/config/site.json
Once the file is edited, exit using CTRL+X then Y to save same file name.
- Run chef-solo using the command cs.