Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Internal Server Error 500 whe navigating to "/projects" page

Alex Currie
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 23, 2019

Hello,

I recently installed the self-hosted Bitbucket Server, connected to SQL Server database which all seemed to go fine, and can access the Bitbucket server. I logged in and created a first project as prompted, and upon clicking "Create Project," was redirected to the "Projects" page (servername:7990/projects) but got a 500 error.

I checked the database and the project appears in the database "dbo.project" table so I imagine the database credentials/connection is working fine. Upon checking some logs I see several WARN and ERROR log items:
2019-05-23 09:09:46,338 WARN [http-nio-7990-exec-9] d.currie @1CP3QV6x549x320x0 vjjbni  (*ip address*) "GET /projects HTTP/1.1" c.a.bitbucket.json.JsonRenderer Failed to marshal com.atlassian.bitbucket.util.PageImpl to JSON
com.atlassian.cache.CacheException: com.atlassian.bitbucket.avatar.AvatarLoadException: The avatar image cannot be read.
...
Caused by: com.atlassian.bitbucket.avatar.AvatarLoadException: The avatar image cannot be read.
...
Caused by: java.nio.file.AccessDeniedException: D:\...\bitbucket\shared\data\avatars\projects\1\original.png

I also see several more vague NullPointerException errors:
2019-05-23 09:09:46,353 ERROR [http-nio-7990-exec-9] d.currie @1CP3QV6x549x320x0 vjjbni (*ip address*) "GET /projects HTTP/1.1" o.a.c.c.C.[.[.[/].[springMvc] Servlet.service() for servlet [springMvc] threw exception
java.lang.NullPointerException: null

2019-05-23 09:09:46,353 ERROR [http-nio-7990-exec-9] o.a.c.c.C.[.[.[/].[default] Servlet.service() for servlet [default] in context with path [] threw exception [Request processing failed; nested exception is com.google.template.soy.tofu.SoyTofuException: When evaluating "to_json($projectPage, ['avatarSize': avatarSize('small')])": While computing function "to_json($projectPage, ['avatarSize': avatarSize('small')])": null] with root cause
java.lang.NullPointerException: null


My hunch based on these errors is there are some permissions issues to the server data directory, but the "atlbitbucket" or "Atlassian Bitbucket" user does have "Full control" access to D:\...\bitbucket and all sub-directories.

I noticed that inside D:\...\bitbucket\shared\data\avatars, the "projects" directory did not exist, so I added the projects\1 directories and threw a png file named "original.png" in there which did not fix the issue.

Another interesting piece is that if I try to create a new project and upload a custom avatar, I get another error message preventing the creation of the project:
"The existing PROJECT avatar could not be removed, preventing the new avatar from being stored."

I can provide more in-depth log information if needed

 

Product version/system info:

atlassian-bitbucket 6.2.0 64-bit

git 2.16.2 64-bit

os: Windows Server 2012 R2 64-bit

db: SQL Server 2016

1 answer

1 accepted

0 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 28, 2019

Hello Alex and welcome to the Community.

Thank you for providing the information you’re seeing along with the steps you took and the logs you scrubbed and reported. You definitely have a permission issue at hand within your Bitbucket directory. Here are a couple of steps I would perform to attempt to resolve the issue:

  1. Restore your Bitbucket instance (Or at least the application directory) from backups and ensure permissions are correct
  2. Ensure your atlbitbucket account has admin access and is an owner of the Bitbucket directory. (This should be the account the Bitbucket service is running as).
    1. Windows |Takeown
    2. How to manually reset folder and file permissions in Windows Explorer
  3. Upgrade your Bitbucket instance to 6.3 using an Administrative account which has access to the Bitbucket application paths.

If you’re still having issues after running through the above steps then please let us know if you’re seeing new errors or the same ones when attempting to access your projects.

Regards,
Stephen Sifers

Alex Currie
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 28, 2019

Hi Stephen, thanks so much for the response,

I actually fixed this earlier today and meant to provide an update but had not gotten around to it.

It turns out that the windows atlbitbucket user did in fact have access to the bitbucket server installation/data directory, but it did not have permissions to the parent folder which was manually created (not set up by bitbucket on installation).

My apologies, and thanks again for addressing this.

Alex

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events