Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Diff giving 404 File Not Found Error

Deleted user January 25, 2018

We are seeing 404 File Not Found Errors on some files (not all) on pull requests.

Note we are using IIS as a proxy server.

All other functionality seems to be working, and the error doesn't happen on all files.

There also does not seem to be a clear link i.e. new files added - it happens to existing and new files.

5 answers

0 votes
Jared Romano April 3, 2019

Is there any resolution on this?  I am having the same exact problem.  I followed this: https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-microsoft-internet-information-services-iis-833931378.html guide to setup my reverse proxy.  Everything works but the diff.  It just says 404 - file or directory not found.

 

It works as expected when bypassing the proxy.

Patrick Landolt April 24, 2019

I just got the same problem and found the issue in my reverse proxy (nginx) vhost. In my case only .php files where not working. I had to remove:

location ~ \.php$ {
return 404;
}
Jared Romano April 26, 2019

Thanks for the info Patrick!!! In my case, .cs files were getting blocked by IIS. Your comment got me thinking that maybe IIS was specifically blocking them.  So a quick google search lead me to this link:

https://confluence.atlassian.com/bitbucketserverkb/iis-http-error-404-for-cs-and-config-files-808622176.html

Worked like a charm!

0 votes
Dave Chevell
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2018

Hey Algebris,

 

Your last screenshot seems to show that different behaviour is occurring when you access Bitbucket Server via your IIS reverse proxy, vs. when you bypass the reverse proxy and connect to Bitbucket's listening port directly.

It could be that IIS is blocking certain types of file content as "unsafe", forcing a 404. The 404 message from your last screenshot looks like it came from IIS, not from Bitbucket Server.

Can you bypass IIS and connect to Bitbucket Server directly (i.e. via  alg-ln-bld1v:8060) and test some of diffs that were previously not working?

If you find that these diffs all work correctly when you bypass IIS, you should contact your network administrator with an example of a file that was blocked and see if it contains content or patterns that IIS is blocking. I've seen cases in the past where a reverse proxy was picking up certain string matches and deeming them unsafe, and refusing to load the request for that content, causing similar errors to the ones you're seeing here.

Let me know how you go Algebris!

 

Cheers,

Dave Chevell  

0 votes
Deleted user February 2, 2018

Is there any update on this. There has been no response for 1 week?

0 votes
Deleted user January 26, 2018

I believe this is a different error - please see screenshots.

As mentioned, we are running IIS as a proxy server infront of Bitbucket and have a DNS entry mapped from bitbucket.algebris.lan to alg-ln-bld1v:8060.

We have both JIRA and Confluence running under the same format without issue. And note, this only happens on some files and not others. The utils.cs script below has been in our master branch from the beginning.

ss1.pngss2.png

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 26, 2018

Hi Algebris! Which Bitbucket Server version do you have? It looks like you might be affected by the bug BSERV-10192.

Can you share a screenshot of the message so we can confirm if you're indeed facing that bug?

Best regards!

Ana

Deleted user February 8, 2018

Hi, there are actually other issues as well.

1). certain files cannot be viewed in pull request. For example, the diff of some C# code cannot be viewed.

1.png

But some C# file can be viewed.

2).  Similarly, some SQL file can be viewed in pull request diff, but some others cannot, as shown below.

2.png

 

Can you please urgently help? We haven't had any response for 2 weeks and this is currently blocking our daily work.

Thanks in advance.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events