# JBrowse Error: HTTP 200 when trying to view tracks

**URL:** <https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982>\
**Category:** Uncategorized\
**Tags:** devops-administration, development-tools, galaxy-local\
**Created:** [February 12, 2020, 1:37pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982 "2020-02-12T13:37:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![galaxyForumAcc](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@galaxyForumAcc](https://help.galaxyproject.org/u/galaxyForumAcc)\
**Post date:** [February 12, 2020, 1:37pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/1 "2020-02-12T13:37:32Z")

</div>

I am trying to follow this tutorial here: [Genomic Data Visualisation with JBrowse](https://galaxyproject.github.io/training-material/topics/visualisation/tutorials/jbrowse/tutorial.html)

I am using a local installation of Galaxy v.19.01 and JBrowse 1.16.5+galaxy5. I whitelisted JBrowse and imported the datasets via the links from the tutorial to my history.

JBrows itself seems to run fine, but when I want to look at the results, as soon as I open a track I get the following error messages:

> An error was encountered when displaying this track.  
> Error: HTTP 200 when fetching [http://XXXgalaxy/datasets/f0e0bb0fb5(...)/display/data/raw/6aa7a84(...)\_0.gff.gz](http://XXXgalaxy/datasets/f0e0bb0fb5(...)/display/data/raw/6aa7a84(...)_0.gff.gz) bytes 0-262143

 ![galaxy_errors](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/2/29067cf2f1d908c1284dfcc59e2d96e5a8d32320.png)

I’d be happy for any tips why this happens and how to solve this.

thanks,

---

<div class="post-metadata">

**Author:** ![Seb](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Seb](https://help.galaxyproject.org/u/Seb)\
**Post date:** [October 23, 2020, 7:09am UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/2 "2020-10-23T07:09:34Z")

</div>

Hi,  
got the exact same problem on a fresh installed galaxy server.  
does anybody know how to fix it ?  
regards,  
Seb

---

<div class="post-metadata">

**Author:** ![rbatorsky](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rbatorsky](https://help.galaxyproject.org/u/rbatorsky)\
**Post date:** [October 26, 2020, 8:36pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/3 "2020-10-26T20:36:17Z")

</div>

Same problem here on my galaxy server. This was working for me in Feb and I just noticed the problem now. Galaxy 20.01 and I just upgraded to JBrowse 1.16.9+galaxy0 to see if it would fix the problem.

---

<div class="post-metadata">

**Author:** ![hexylena](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/hexylena/32/4171_2.png) [@hexylena](https://help.galaxyproject.org/u/hexylena)\
**Post date:** [October 27, 2020, 10:38am UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/4 "2020-10-27T10:38:00Z")

</div>

Hi @galaxyForumAcc, @Seb, @rbatorsky!

I’m sorry for the delayed response here, I didn’t notice this issue previously. I’m one of the two devs and maintainers of that tool.

JBrowse can generate this error when range requests do not work properly. JBrowse makes a request to your galaxy for the datasets, but it only requests the portion that you’re viewing with a header like `Range: bytes 0-135`. Given that it is making a range request, JBrowse expects to see a `206 Partial Content` http return code, but instead it sees `200 OK`, as your webserver does not support range requests, and thus returns the whole file.

If you’re using Nginx or Apache, please consider turning on the sendfile mechanism:

- [nginx](https://docs.galaxyproject.org/en/master/admin/nginx.html?highlight=jbrowse#sending-files-with-nginx)
- [apache](https://docs.galaxyproject.org/en/latest/admin/apache.html?highlight=jbrowse#sending-files-with-apache)

Unfortunately this means JBrowse does not always work nicely with development servers, and works best under a proper webserver.

I’ve tested the `honour-range` option [from uwsgi](https://uwsgi-docs.readthedocs.io/en/latest/Options.html#honour-range) but it seems to have [some issues](https://github.com/unbit/uwsgi/issues/1638) so I have to recommend nginx or apache with sendfile.

Sorry for not seeing this sooner!

---

<div class="post-metadata">

**Author:** ![rbatorsky](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rbatorsky](https://help.galaxyproject.org/u/rbatorsky)\
**Post date:** [October 27, 2020, 3:54pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/5 "2020-10-27T15:54:49Z")

</div>

Thank you @hexylena for your helpful reply. This sounds like the right direction for me, since I switched from http to uwsgi protocol in the last year and it might be the cause, since in that timeframe JBrowse stopped working for me. I am using apache as a proxy.

~~However, I switched back from uwsgi to http in both galaxy.yml and my apache config and enabled XSendFile in both places as explained [here](https://docs.galaxyproject.org/en/latest/admin/apache.html), and I’m still seeing the same HTTP 200 error in JBrowse.~~

Edit to add: I made a mistake and had not enabled xsendfile in galaxy.yml. When I do that, I get the error from JBrowse.  
`Not Found The requested URL /datasets/ab50e8da6b53023e/display/ was not found on this server.`

I will keep plugging at this.

A note: I am not able to add the user that runs apache to the galaxy group because of the way the users is set up on my server. This has always been the case for me, even earlier this year when JBrowse was working. I set the umask of the user that runs galaxy to 0022 so that files created are readable by everyone. Do you think that a permissions error could cause this?

Thank you again for any tips.

---

<div class="post-metadata">

**Author:** ![hexylena](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/hexylena/32/4171_2.png) [@hexylena](https://help.galaxyproject.org/u/hexylena)\
**Post date:** [October 27, 2020, 4:26pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/6 "2020-10-27T16:26:44Z")

</div>

Hi @rbatorsky!

> I am not able to add the user that runs apache to the galaxy group because of the way the users is set up on my server.

ah this can be possibly the cause, if the apache server cannot read the file, then it can’t serve it. are other datasets visible when you access them in galaxy? Or is it just datasets with jbrowse?

---

<div class="post-metadata">

**Author:** ![rbatorsky](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rbatorsky](https://help.galaxyproject.org/u/rbatorsky)\
**Post date:** [October 27, 2020, 5:31pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/7 "2020-10-27T17:31:14Z")

</div>

Thank you again @hexylena. You’re right, this last bit is a permissions problem. To test I used chmod to open up permissions for a single dataset and then I could see it in JBrowse. I haven’t noticed this problem outside of JBrowse, e.g. I can preview Fastq files and see html from FastQC.

In order to see the display, I needed to `chmod o+r` for the .dat files associated with the file I was trying to view and the .dat file associated with the JBrowse job, then `chmod o+rx dataset_850_files` for the files associated with the JBrowse job.

I’ll work on getting my apache user set up so it can be part of the galaxy group. That should fix things.

Thanks again.

---

<div class="post-metadata">

**Author:** ![hexylena](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/hexylena/32/4171_2.png) [@hexylena](https://help.galaxyproject.org/u/hexylena)\
**Post date:** [October 27, 2020, 6:03pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/8 "2020-10-27T18:03:21Z")

</div>

@rbatorsky that’s great to hear! I’m glad it could be solved for you.

---

<div class="post-metadata">

**Author:** ![Seb](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Seb](https://help.galaxyproject.org/u/Seb)\
**Post date:** [November 3, 2020, 12:56pm UTC](https://help.galaxyproject.org/t/jbrowse-error-http-200-when-trying-to-view-tracks/2982/9 "2020-11-03T12:56:40Z")

</div>

thank you @hexylena for this help!  
it works using the corresponding apache configuration here!
