Quantcast

'400 Bad Request' error when loading organism

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

'400 Bad Request' error when loading organism

Tom Harrop
Hi all,

I'm trying to troubleshoot an issue with our instance of apollo 2.0.6.

When users try to load one particular organism, the main (jbrowse)
window remains blank and the track list doesn't load. Sometimes
"Loading..." appears in the "Tracks" tab and sometimes the tab remains
blank. The strange thing is that apollo was running fine for this
organism, and it appears to have stopped working without any changes on
our part.

When I look in the browser console I see an HTTP 400 error (bad request)
for the following url:

http://[OUR SERVER
ADDRESS]/16630218091458342262/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0

I downloaded some genomes (FASTA + GFF) from NCBI and loaded them into
apollo and they work normally. I also tried recreating the problematic
organism from scratch in a new directory using only the GFF3 and FASTA
files. After adding the new organism through the apollo web interface,
the same problem exists. I think it must be a problem with either my
GFF3 or FASTA file, but I have run both through validation tools and
they appear to be OK.

Here is trackList.json after running prepare-refseqs.pl,
flatfile-to-json.pl and generate-names.pl:

{
    "tracks" : [
       {
          "seqType" : "dna",
          "key" : "Reference sequence",
          "storeClass" : "JBrowse/Store/Sequence/StaticChunked",
          "chunkSize" : 20000,
          "urlTemplate" : "seq/{refseq_dirpath}/{refseq}-",
          "label" : "DNA",
          "type" : "SequenceTrack",
          "category" : "Reference sequence"
       },
       {
          "style" : {
             "className" : "feature"
          },
          "key" : "MAKER genome annotation",
          "storeClass" : "JBrowse/Store/SeqFeature/NCList",
          "trackType" : "CanvasFeatures",
          "urlTemplate" : "tracks/maker/{refseq}/trackData.json",
          "compress" : 0,
          "type" : "CanvasFeatures",
          "label" : "maker"
       }
    ],
    "names" : {
       "url" : "names/",
       "type" : "Hash"
    },
    "formatVersion" : 1
}


Here is the head of my GFF3 file:

##gff-version 3
##date 2017-04-27
scaffold3|size1021231    maker    gene    51364    60154 .    +    .    
ID=Vvul000001;Name=Vvul000001;
scaffold3|size1021231    maker    mRNA    51364    60154 .    +    .
ID=Vvul000001-mRNA-1;Name=Vvul000001-mRNA-1;Parent=Vvul000001;_AED=0.06;_eAED=0.06;_QI=743|1|0.5|1|1|1|2|0|205;
scaffold3|size1021231    maker    exon    51364    52499 .    +    .
ID=Vvul000001-mRNA-1:exon:2122;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    exon    59933    60154 .    +    .
ID=Vvul000001-mRNA-1:exon:2123;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    CDS    52107    52499 .    +    0    
ID=Vvul000001-mRNA-1:cds;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    CDS    59933    60154 .    +    0    
ID=Vvul000001-mRNA-1:cds;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    gene    74188    85897 .    +    .    
ID=Vvul000002;Name=Vvul000002;
scaffold3|size1021231    maker    mRNA    74188    85897 .    +    .
ID=Vvul000002-mRNA-1;Name=Vvul000002-mRNA-1;Parent=Vvul000002;_AED=0.18;_eAED=0.18;_QI=390|1|1|1|1|1|5|779|262;

I'd appreciate any suggestions for troubleshooting this problem. Please
let me know if more info is required.

Thanks,

Tom Harrop





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

nathandunn


Tom,

I would try one of two things:

1 - see what happens if you have an incognito / private window (or if you try it on another browser)
2 - in the database call:  

   delete from preference where client_token = ‘16630218091458342262' ;


If that doesn’t work, the tomcat / jetty server logs (typically, but not always in a file called catalina.out) that would very helpful in pinpointing a solution. 

Let us know how it goes.

Thanks,

Nathan Dunn, PhD
Berkeley Bioinformatics Open-source Projects (BBOP)
Environmental Genomics and Systems Biology, Lawrence Berkeley National Laboratory
[hidden email]


On Apr 30, 2017, at 4:09 PM, Tom Harrop <[hidden email]> wrote:

Hi all,

I'm trying to troubleshoot an issue with our instance of apollo 2.0.6.

When users try to load one particular organism, the main (jbrowse) window remains blank and the track list doesn't load. Sometimes "Loading..." appears in the "Tracks" tab and sometimes the tab remains blank. The strange thing is that apollo was running fine for this organism, and it appears to have stopped working without any changes on our part.

When I look in the browser console I see an HTTP 400 error (bad request) for the following url:

<a href="http://[our" class="">http://[OUR SERVER ADDRESS]/16630218091458342262/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0

I downloaded some genomes (FASTA + GFF) from NCBI and loaded them into apollo and they work normally. I also tried recreating the problematic organism from scratch in a new directory using only the GFF3 and FASTA files. After adding the new organism through the apollo web interface, the same problem exists. I think it must be a problem with either my GFF3 or FASTA file, but I have run both through validation tools and they appear to be OK.

Here is trackList.json after running prepare-refseqs.pl, flatfile-to-json.pl and generate-names.pl:

{
  "tracks" : [
     {
        "seqType" : "dna",
        "key" : "Reference sequence",
        "storeClass" : "JBrowse/Store/Sequence/StaticChunked",
        "chunkSize" : 20000,
        "urlTemplate" : "seq/{refseq_dirpath}/{refseq}-",
        "label" : "DNA",
        "type" : "SequenceTrack",
        "category" : "Reference sequence"
     },
     {
        "style" : {
           "className" : "feature"
        },
        "key" : "MAKER genome annotation",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "trackType" : "CanvasFeatures",
        "urlTemplate" : "tracks/maker/{refseq}/trackData.json",
        "compress" : 0,
        "type" : "CanvasFeatures",
        "label" : "maker"
     }
  ],
  "names" : {
     "url" : "names/",
     "type" : "Hash"
  },
  "formatVersion" : 1
}


Here is the head of my GFF3 file:

##gff-version 3
##date 2017-04-27
scaffold3|size1021231    maker    gene    51364    60154 .    +    .    ID=Vvul000001;Name=Vvul000001;
scaffold3|size1021231    maker    mRNA    51364    60154 .    +    . ID=Vvul000001-mRNA-1;Name=Vvul000001-mRNA-1;Parent=Vvul000001;_AED=0.06;_eAED=0.06;_QI=743|1|0.5|1|1|1|2|0|205;
scaffold3|size1021231    maker    exon    51364    52499 .    +    . ID=Vvul000001-mRNA-1:exon:2122;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    exon    59933    60154 .    +    . ID=Vvul000001-mRNA-1:exon:2123;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    CDS    52107    52499 .    +    0    ID=Vvul000001-mRNA-1:cds;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    CDS    59933    60154 .    +    0    ID=Vvul000001-mRNA-1:cds;Parent=Vvul000001-mRNA-1;
scaffold3|size1021231    maker    gene    74188    85897 .    +    .    ID=Vvul000002;Name=Vvul000002;
scaffold3|size1021231    maker    mRNA    74188    85897 .    +    . ID=Vvul000002-mRNA-1;Name=Vvul000002-mRNA-1;Parent=Vvul000002;_AED=0.18;_eAED=0.18;_QI=390|1|1|1|1|1|5|779|262;

I'd appreciate any suggestions for troubleshooting this problem. Please let me know if more info is required.

Thanks,

Tom Harrop




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

Tom Harrop
Hi Nathan,

Thanks for the reply.

When I load apollo in a different browser or a private window, the
client_token changes but the same problem occurs.

This error gets logged to /var/log/messages and catalina.out:

May  4 16:38:06 thehive server[8889]: INFO: Error parsing HTTP request header
May  4 16:38:06 thehive server[8889]: Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
May  4 16:38:06 thehive server[8889]: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
May  4 16:38:06 thehive server[8889]: at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:189)
May  4 16:38:06 thehive server[8889]: at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:992)
May  4 16:38:06 thehive server[8889]: at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
May  4 16:38:06 thehive server[8889]: at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
May  4 16:38:06 thehive server[8889]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
May  4 16:38:06 thehive server[8889]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
May  4 16:38:06 thehive server[8889]: at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
May  4 16:38:06 thehive server[8889]: at java.lang.Thread.run(Thread.java:748)

Cheers,

Tom




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

nathandunn

Hmm, I have not seen that one before.    Some questions:

- How many individual sequences / scaffolds / chromosomes are you loading for this organism?
- Does the organism show up in the organism tab? 
- Can you type in the organism common name and verify that it works (you may have to make the organism public, first)?

<a href="http://[our" class="">http://[OUR SERVER ADDRESS]/Organism%20Common%20Name/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0

e.g.,

<a href="http://[our" class="">http://[OUR SERVER ADDRESS]/Honeybee/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0

This should work for the ID as well. 

- Also, if you create a new organism with a different simple name from the same data, do you see anything else in the catalina.out when you hit “add"?  

- Also, is there anything in the javascript console, either during loading or otherwise?

- Are there sequences associated with that organism:   
    
    select count(s) from sequence s join organism o on o.id = s.organism_id where o.common_name = 'Honeybee' ;
 

Nathan

On May 3, 2017, at 9:45 PM, Tom Harrop <[hidden email]> wrote:

Hi Nathan,

Thanks for the reply.

When I load apollo in a different browser or a private window, the client_token changes but the same problem occurs.

This error gets logged to /var/log/messages and catalina.out:

May  4 16:38:06 thehive server[8889]: INFO: Error parsing HTTP request header
May  4 16:38:06 thehive server[8889]: Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
May  4 16:38:06 thehive server[8889]: java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
May  4 16:38:06 thehive server[8889]: at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:189)
May  4 16:38:06 thehive server[8889]: at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:992)
May  4 16:38:06 thehive server[8889]: at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
May  4 16:38:06 thehive server[8889]: at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
May  4 16:38:06 thehive server[8889]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
May  4 16:38:06 thehive server[8889]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
May  4 16:38:06 thehive server[8889]: at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
May  4 16:38:06 thehive server[8889]: at java.lang.Thread.run(Thread.java:748)

Cheers,

Tom



This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

Tom Harrop
Hi Nathan,

Thanks for the detailed reply. I've tried what you suggested and answered your questions below. Sorry, it's a huge wall of text.

Could it have anything to do with the pipe characters in the scaffold names, which get propagated to directory names in the data/tracks directory? I can't work out why that would suddenly fall over when it was working previously, but the fasta files for the working organisms that I got from NCBI don't have "|" in the scaffold names.

Cheers,

Tom

- How many individual sequences / scaffolds / chromosomes are you loading for this organism?
684

- Does the organism show up in the organism tab?
Yes

- Can you type in the organism common name and verify that it works (you may have to make the organism public, first)?
Hmm. I made the problematic "Test" organism public. Now, if I open a new private browser in Chromium (i.e. not logged into apollo) and go to the URL http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/index.html, I get the old jbrowse window. When I say "old jbrowse", I mean jbrowse with the "Available tracks" pane on the left, not apollo with the "Annotations", "Tracks" etc. tabs in a pane on the right and the jbrowse pane on the left.

The console has a 401  (Unauthorized) error to ../Test/AnnotationEditorService (not a surprise, since I'm not logged in).

I can also get to old jbrowse by going to our main apollo URL (http://thehive.otago.ac.nz:8080/apollo-2.0.6) and clicking "Browse public genomes".

Now, in this unlogged-in old jbrowse window, my annotation track *is* visible in "Available tracks", and I can activate it and view annotations in Chromium.

In contrast, when I do exactly the same in Firefox, when I try to turn on the annotation track in the old jbrowse window, I get the red "Error" box saying "Server returned an HTTP 400 error", and the following in the console:

XML Parsing Error: no root element found
Location: <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/data/tracks/maker/scaffold100|size496982/trackData.json">http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/data/tracks/maker/scaffold100|size496982/trackData.json
Line Number 1, Column 1:

All the other testing I'm reporting here was done in a private window in Chromium. Firefox is my "main" browser so I'm testing in Chromium to avoid any plugins etc. I have installed in Firefox.

In Chromium, clicking the jbrowse "Login" button gets me the following error:

GET http://thehive.otago.ac.nz:8080/apollo-2.0.6/auth/login?targetUri=/annotato…maker&highlight=&organism=15&clientToken=743292682522170121342&format=null 400 (Bad Request)
showAnnotatorPanel @ AnnotTrack.js:4369
onClick @ main.js:452
_onClick @ _ButtonMixin.js:58
(anonymous) @ lang.js:373
__onClick @ _ButtonMixin.js:45
(anonymous) @ lang.js:373

Also, going to the main URL and logging in gets me this error:

annotator-0.js:3261 Uncaught TypeError: Cannot read property 'f' of undefined
    at YHb.$Hb [as fc] (annotator-0.js:3261)
    at gs (annotator-0.js:2292)
    at us.vs [as dc] (annotator-0.js:3258)
    at XMLHttpRequest.eval (annotator-0.js:2110)
    at bh (annotator-0.js:1490)
    at fh (annotator-0.js:2017)
    at XMLHttpRequest.eval (annotator-0.js:2652)
$Hb @ annotator-0.js:3261
gs @ annotator-0.js:2292
vs @ annotator-0.js:3258
(anonymous) @ annotator-0.js:2110
bh @ annotator-0.js:1490
fh @ annotator-0.js:2017
(anonymous) @ annotator-0.js:2652
annotator-0.js:369 GET <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/743292682522170121342/jbrowse/index.html?loc=scaffold100|size496982%3A1..299200&amp;tracklist=0">http://thehive.otago.ac.nz:8080/apollo-2.0.6/743292682522170121342/jbrowse/index.html?loc=scaffold100|size496982%3A1..299200&tracklist=0 400 (Bad Request)
dl @ annotator-0.js:369
T6 @ annotator-0.js:1053
WCb @ annotator-0.js:3207
zCb @ annotator-0.js:3095
sDb @ annotator-0.js:3261
gs @ annotator-0.js:2292
vs @ annotator-0.js:3258
(anonymous) @ annotator-0.js:2110
bh @ annotator-0.js:1490
fh @ annotator-0.js:2017
(anonymous) @ annotator-0.js:2652


annotator-0.js:369 GET <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/885159162372172868473/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&amp;tracklist=0">http://thehive.otago.ac.nz:8080/apollo-2.0.6/885159162372172868473/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0 400 (Bad Request)

And going to http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/index.html **after** logging in through the main URL gets me the same error.

- Also, if you create a new organism with a different simple name from the same data, do you see anything else in the catalina.out when you hit “add"? 
This appears in /var/log/messages when we add a new organism:

    May 05 16:24:24 thehive server: 2017-05-05 16:24:24,532 [http-bio-8080-exec-38] INFO apollo.UserController - updateTrackListPreference
    May 05 16:24:24 thehive server: 2017-05-05 16:24:24,534 [http-bio-8080-exec-38] INFO apollo.UserController - Added userOrganismPreference false
    May 05 16:24:24 thehive server: 2017-05-05 16:24:24,550 [http-bio-8080-exec-32] ERROR errors.GrailsExceptionResolver - StaleObjectStateException occurred when processing request: [GET] /apollo-2.0.6/annotator/getAppState
    May 05 16:24:24 thehive server: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.bbop.apollo.UserOrganismPreference#438]. Stacktrace follows:
    May 05 16:24:24 thehive server: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.bbop.apollo.UserOrganismPreference#438]
    May 05 16:24:24 thehive server: at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
    May 05 16:24:24 thehive server: at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    May 05 16:24:24 thehive server: at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    May 05 16:24:24 thehive server: at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    May 05 16:24:24 thehive server: at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    May 05 16:24:24 thehive server: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    May 05 16:24:24 thehive server: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    May 05 16:24:24 thehive server: at java.lang.Thread.run(Thread.java:748)

- Also, is there anything in the javascript console, either during loading or otherwise?
Not really—when I load apollo, I get this:

This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.gl/zmWq3m.

When I login and go to a working organism, I get this

[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
xhr @ xhr.js:176
dojo.xhr @ xhr.js:615
dojo.rawXhrPost.dojo.xhrPost @ xhr.js:652
getPermission @ AnnotTrack.js:4926
setViewInfo @ AnnotTrack.js:192
(anonymous) @ GenomeView.js:2229
(anonymous) @ lang.js:375
(anonymous) @ GenomeView.js:2255
(anonymous) @ Browser.js:1699
(anonymous) @ lang.js:375
runFactory @ dojo.js:1104
execModule @ dojo.js:1232
(anonymous) @ dojo.js:1270
guardCheckComplete @ dojo.js:1247
checkComplete @ dojo.js:1265
onLoadCallback @ dojo.js:1431
onLoad @ dojo.js:1684

annotator-0.js:3261 Uncaught TypeError: Cannot read property 'f' of undefined
    at YHb.$Hb [as fc] (annotator-0.js:3261)
    at gs (annotator-0.js:2292)
    at us.vs [as dc] (annotator-0.js:3258)
    at XMLHttpRequest.eval (annotator-0.js:2110)
    at bh (annotator-0.js:1490)
    at fh (annotator-0.js:2017)
    at XMLHttpRequest.eval (annotator-0.js:2652)
$Hb @ annotator-0.js:3261
gs @ annotator-0.js:2292
vs @ annotator-0.js:3258
(anonymous) @ annotator-0.js:2110
bh @ annotator-0.js:1490
fh @ annotator-0.js:2017
(anonymous) @ annotator-0.js:2652
main.js:79 loaded WebApollo plugin
main.js:40 plugin HideTracksButton constructor
xhr.js:176 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
xhr @ xhr.js:176
dojo.xhr @ xhr.js:615
dojo.rawXhrPost.dojo.xhrPost @ xhr.js:652
getPermission @ AnnotTrack.js:4926
setViewInfo @ AnnotTrack.js:192
(anonymous) @ GenomeView.js:2229
(anonymous) @ lang.js:375
(anonymous) @ GenomeView.js:2255
(anonymous) @ Browser.js:1699
(anonymous) @ lang.js:375
runFactory @ dojo.js:1104
execModule @ dojo.js:1232
(anonymous) @ dojo.js:1270
guardCheckComplete @ dojo.js:1247
checkComplete @ dojo.js:1265
onLoadCallback @ dojo.js:1431
onLoad @ dojo.js:1684
AnnotTrack.js:315 Registering embedded system with ApolloGwt-2.0.
AnnotTrack.js:383 connection established

And when I switch to the problem organism I get this:

annotator-0.js:369 GET <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/86386887411751775611059522395/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&amp;tracklist=0">http://thehive.otago.ac.nz:8080/apollo-2.0.6/86386887411751775611059522395/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0 400 (Bad Request)
dl  @   annotator-0.js:369
T6  @   annotator-0.js:1053
WCb @   annotator-0.js:3207
zCb @   annotator-0.js:3095
aPb @   annotator-0.js:3261
gs  @   annotator-0.js:2292
vs  @   annotator-0.js:3258
(anonymous) @   annotator-0.js:2110
bh  @   annotator-0.js:1490
fh  @   annotator-0.js:2017
(anonymous) @   annotator-0.js:2652

- Are there sequences associated with that organism:   
    
    select count(s) from sequence s join organism o on o.id = s.organism_id where o.common_name = 'Honeybee' ;
I forgot to do this when I was getting the logs. I'll have to wait to check that next week if it's important, because I don't have admin access to the box that runs apollo.





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

nathandunn

Wall of text is good.   A lot of helpful details. 

Is it possible to re-create a portion of your list using sequence without pipes?  

Between Java, SQL, Groovy, Javascript, URI, etc. there are a lot of ways it could fail, so I’m not surprised its failing.        

- Are there sequences associated with that organism:   
    
    select count(s) from sequence s join organism o on o.id = s.organism_id where o.common_name = 'Honeybee' ;
I forgot to do this when I was getting the logs. I'll have to wait to check that next week if it's important, because I don't have admin access to the box that runs apollo.

Just a reminder. 


Nathan

On May 4, 2017, at 10:05 PM, Tom Harrop <[hidden email]> wrote:

Hi Nathan,

Thanks for the detailed reply. I've tried what you suggested and answered your questions below. Sorry, it's a huge wall of text.

Could it have anything to do with the pipe characters in the scaffold names, which get propagated to directory names in the data/tracks directory? I can't work out why that would suddenly fall over when it was working previously, but the fasta files for the working organisms that I got from NCBI don't have "|" in the scaffold names.

Cheers,

Tom

- How many individual sequences / scaffolds / chromosomes are you loading for this organism?
684

- Does the organism show up in the organism tab?
Yes

- Can you type in the organism common name and verify that it works (you may have to make the organism public, first)?
Hmm. I made the problematic "Test" organism public. Now, if I open a new private browser in Chromium (i.e. not logged into apollo) and go to the URL http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/index.html, I get the old jbrowse window. When I say "old jbrowse", I mean jbrowse with the "Available tracks" pane on the left, not apollo with the "Annotations", "Tracks" etc. tabs in a pane on the right and the jbrowse pane on the left.

The console has a 401  (Unauthorized) error to ../Test/AnnotationEditorService (not a surprise, since I'm not logged in).

I can also get to old jbrowse by going to our main apollo URL (http://thehive.otago.ac.nz:8080/apollo-2.0.6) and clicking "Browse public genomes".

Now, in this unlogged-in old jbrowse window, my annotation track *is* visible in "Available tracks", and I can activate it and view annotations in Chromium.

In contrast, when I do exactly the same in Firefox, when I try to turn on the annotation track in the old jbrowse window, I get the red "Error" box saying "Server returned an HTTP 400 error", and the following in the console:

XML Parsing Error: no root element found
Location: <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/data/tracks/maker/scaffold100|size496982/trackData.json">http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/data/tracks/maker/scaffold100|size496982/trackData.json
Line Number 1, Column 1:

All the other testing I'm reporting here was done in a private window in Chromium. Firefox is my "main" browser so I'm testing in Chromium to avoid any plugins etc. I have installed in Firefox.

In Chromium, clicking the jbrowse "Login" button gets me the following error:

GET http://thehive.otago.ac.nz:8080/apollo-2.0.6/auth/login?targetUri=/annotato…maker&highlight=&organism=15&clientToken=743292682522170121342&format=null 400 (Bad Request)
showAnnotatorPanel @ AnnotTrack.js:4369
onClick @ main.js:452
_onClick @ _ButtonMixin.js:58
(anonymous) @ lang.js:373
__onClick @ _ButtonMixin.js:45
(anonymous) @ lang.js:373

Also, going to the main URL and logging in gets me this error:

annotator-0.js:3261 Uncaught TypeError: Cannot read property 'f' of undefined
    at YHb.$Hb [as fc] (annotator-0.js:3261)
    at gs (annotator-0.js:2292)
    at us.vs [as dc] (annotator-0.js:3258)
    at XMLHttpRequest.eval (annotator-0.js:2110)
    at bh (annotator-0.js:1490)
    at fh (annotator-0.js:2017)
    at XMLHttpRequest.eval (annotator-0.js:2652)
$Hb @ annotator-0.js:3261
gs @ annotator-0.js:2292
vs @ annotator-0.js:3258
(anonymous) @ annotator-0.js:2110
bh @ annotator-0.js:1490
fh @ annotator-0.js:2017
(anonymous) @ annotator-0.js:2652
annotator-0.js:369 GET <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/743292682522170121342/jbrowse/index.html?loc=scaffold100|size496982%3A1..299200&amp;tracklist=0">http://thehive.otago.ac.nz:8080/apollo-2.0.6/743292682522170121342/jbrowse/index.html?loc=scaffold100|size496982%3A1..299200&tracklist=0 400 (Bad Request)
dl @ annotator-0.js:369
T6 @ annotator-0.js:1053
WCb @ annotator-0.js:3207
zCb @ annotator-0.js:3095
sDb @ annotator-0.js:3261
gs @ annotator-0.js:2292
vs @ annotator-0.js:3258
(anonymous) @ annotator-0.js:2110
bh @ annotator-0.js:1490
fh @ annotator-0.js:2017
(anonymous) @ annotator-0.js:2652


annotator-0.js:369 GET <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/885159162372172868473/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&amp;tracklist=0">http://thehive.otago.ac.nz:8080/apollo-2.0.6/885159162372172868473/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0 400 (Bad Request)

And going to http://thehive.otago.ac.nz:8080/apollo-2.0.6/Test/jbrowse/index.html **after** logging in through the main URL gets me the same error.

- Also, if you create a new organism with a different simple name from the same data, do you see anything else in the catalina.out when you hit “add"? 
This appears in /var/log/messages when we add a new organism:

    May 05 16:24:24 thehive server: 2017-05-05 16:24:24,532 [http-bio-8080-exec-38] INFO apollo.UserController - updateTrackListPreference
    May 05 16:24:24 thehive server: 2017-05-05 16:24:24,534 [http-bio-8080-exec-38] INFO apollo.UserController - Added userOrganismPreference false
    May 05 16:24:24 thehive server: 2017-05-05 16:24:24,550 [http-bio-8080-exec-32] ERROR errors.GrailsExceptionResolver - StaleObjectStateException occurred when processing request: [GET] /apollo-2.0.6/annotator/getAppState
    May 05 16:24:24 thehive server: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.bbop.apollo.UserOrganismPreference#438]. Stacktrace follows:
    May 05 16:24:24 thehive server: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.bbop.apollo.UserOrganismPreference#438]
    May 05 16:24:24 thehive server: at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
    May 05 16:24:24 thehive server: at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
    May 05 16:24:24 thehive server: at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
    May 05 16:24:24 thehive server: at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
    May 05 16:24:24 thehive server: at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
    May 05 16:24:24 thehive server: at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
    May 05 16:24:24 thehive server: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    May 05 16:24:24 thehive server: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    May 05 16:24:24 thehive server: at java.lang.Thread.run(Thread.java:748)

- Also, is there anything in the javascript console, either during loading or otherwise?
Not really—when I load apollo, I get this:

This page includes a password or credit card input in a non-secure context. A warning has been added to the URL bar. For more information, see https://goo.gl/zmWq3m.

When I login and go to a working organism, I get this

[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
xhr @ xhr.js:176
dojo.xhr @ xhr.js:615
dojo.rawXhrPost.dojo.xhrPost @ xhr.js:652
getPermission @ AnnotTrack.js:4926
setViewInfo @ AnnotTrack.js:192
(anonymous) @ GenomeView.js:2229
(anonymous) @ lang.js:375
(anonymous) @ GenomeView.js:2255
(anonymous) @ Browser.js:1699
(anonymous) @ lang.js:375
runFactory @ dojo.js:1104
execModule @ dojo.js:1232
(anonymous) @ dojo.js:1270
guardCheckComplete @ dojo.js:1247
checkComplete @ dojo.js:1265
onLoadCallback @ dojo.js:1431
onLoad @ dojo.js:1684

annotator-0.js:3261 Uncaught TypeError: Cannot read property 'f' of undefined
    at YHb.$Hb [as fc] (annotator-0.js:3261)
    at gs (annotator-0.js:2292)
    at us.vs [as dc] (annotator-0.js:3258)
    at XMLHttpRequest.eval (annotator-0.js:2110)
    at bh (annotator-0.js:1490)
    at fh (annotator-0.js:2017)
    at XMLHttpRequest.eval (annotator-0.js:2652)
$Hb @ annotator-0.js:3261
gs @ annotator-0.js:2292
vs @ annotator-0.js:3258
(anonymous) @ annotator-0.js:2110
bh @ annotator-0.js:1490
fh @ annotator-0.js:2017
(anonymous) @ annotator-0.js:2652
main.js:79 loaded WebApollo plugin
main.js:40 plugin HideTracksButton constructor
xhr.js:176 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
xhr @ xhr.js:176
dojo.xhr @ xhr.js:615
dojo.rawXhrPost.dojo.xhrPost @ xhr.js:652
getPermission @ AnnotTrack.js:4926
setViewInfo @ AnnotTrack.js:192
(anonymous) @ GenomeView.js:2229
(anonymous) @ lang.js:375
(anonymous) @ GenomeView.js:2255
(anonymous) @ Browser.js:1699
(anonymous) @ lang.js:375
runFactory @ dojo.js:1104
execModule @ dojo.js:1232
(anonymous) @ dojo.js:1270
guardCheckComplete @ dojo.js:1247
checkComplete @ dojo.js:1265
onLoadCallback @ dojo.js:1431
onLoad @ dojo.js:1684
AnnotTrack.js:315 Registering embedded system with ApolloGwt-2.0.
AnnotTrack.js:383 connection established

And when I switch to the problem organism I get this:

annotator-0.js:369 GET <a class="moz-txt-link-freetext" href="http://thehive.otago.ac.nz:8080/apollo-2.0.6/86386887411751775611059522395/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&amp;tracklist=0">http://thehive.otago.ac.nz:8080/apollo-2.0.6/86386887411751775611059522395/jbrowse/index.html?loc=scaffold100|size496982%3A0..496982&tracklist=0 400 (Bad Request)
dl  @   annotator-0.js:369
T6  @   annotator-0.js:1053
WCb @   annotator-0.js:3207
zCb @   annotator-0.js:3095
aPb @   annotator-0.js:3261
gs  @   annotator-0.js:2292
vs  @   annotator-0.js:3258
(anonymous) @   annotator-0.js:2110
bh  @   annotator-0.js:1490
fh  @   annotator-0.js:2017
(anonymous) @   annotator-0.js:2652

- Are there sequences associated with that organism:   
    
    select count(s) from sequence s join organism o on o.id = s.organism_id where o.common_name = 'Honeybee' ;
I forgot to do this when I was getting the logs. I'll have to wait to check that next week if it's important, because I don't have admin access to the box that runs apollo.




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

Tom Harrop

Hi Nathan,

I've created a new test organism after removing the pipe characters from the fasta file and the GFF. This seems to solve the problem. I think the pipes were output by the Celera assembler because they're in everything downstream of the initial assembly...

Do you have any advice to fix this? Create a new organism and copy the annotations over from the broken one?

I’ve downloaded the ~100 user annotations as GFF with the web API, but I can’t see how to upload them again to the user annotation track of the new organism.

I have also mapped RNAseq reads and tBLASTn-ed a couple of proteomes against the broken fasta. Avoiding having to rerun those would also be nice, but it's less critical than keeping user annotations.

Thanks again for the help,

Tom




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

nathandunn

Tom,

We tried testing with pipes in our scaffold names and we didn’t experience problems in either 2.0.6 or master.  

Our thoughts are:

1 - try regenerating your JBrowse reference sequence data from your original FASTA (with the pipes) without the tracks and see if that works when creating a new organism.  If that works, it is pretty easy to reload annotations using the tools/data/add_transcripts_from_gff3_to_annotations.pl script.  Conversely, you *might* be able to replace the sequence directory with the new one. 
2 - send us your problematic FASTA (or atleast the headers) and we can see if we can’t reproduce the problem.  Might just a funny character somewhere on the headers.

Thanks,

Nathan

On May 17, 2017, at 8:40 PM, Tom Harrop <[hidden email]> wrote:

Hi Nathan,

I've created a new test organism after removing the pipe characters from the fasta file and the GFF. This seems to solve the problem. I think the pipes were output by the Celera assembler because they're in everything downstream of the initial assembly...

Do you have any advice to fix this? Create a new organism and copy the annotations over from the broken one?

I’ve downloaded the ~100 user annotations as GFF with the web API, but I can’t see how to upload them again to the user annotation track of the new organism.

I have also mapped RNAseq reads and tBLASTn-ed a couple of proteomes against the broken fasta. Avoiding having to rerun those would also be nice, but it's less critical than keeping user annotations.

Thanks again for the help,

Tom



This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

Tom Harrop
Hi Nathan,

1 - Yes, I've re-run prepare-refseqs.pl for the FASTA with and without
pipes; it works only on the file with pipes removed. I've managed to get
most of the user annotations re-uploaded to the new organism with
add_features_from_gff3_to_annotations.pl, although there were two "(No
such file or directory)" errors so I'll have to manually re-do these
annotations.

2 - I've sent the headers from the not-working FASTA to you directly. I
can't see anything weird other than the pipe character. On the other
hand, if the pipes *were* the problem, I really don't understand why it
worked for several weeks and then fell over.

Thanks for the help, it's a relief to have it running again!

Tom





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

Deepak Unni
Hi Tom,

Could you tell us which version of Tomcat are you using on your machine?

Thanks,

Deepak


On Thu, May 18, 2017 at 7:48 PM, Tom Harrop <[hidden email]> wrote:
Hi Nathan,

1 - Yes, I've re-run prepare-refseqs.pl for the FASTA with and without pipes; it works only on the file with pipes removed. I've managed to get most of the user annotations re-uploaded to the new organism with add_features_from_gff3_to_annotations.pl, although there were two "(No such file or directory)" errors so I'll have to manually re-do these annotations.

2 - I've sent the headers from the not-working FASTA to you directly. I can't see anything weird other than the pipe character. On the other hand, if the pipes *were* the problem, I really don't understand why it worked for several weeks and then fell over.

Thanks for the help, it's a relief to have it running again!

Tom





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.





--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia




This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: '400 Bad Request' error when loading organism

nathandunn

Tom,

There was an associated error with Tomcat 8.5.8+ and encoding of pipes in sequences (thanks to Deepak for figuring that out).   We have since fixed that in master (https://github.com/GMOD/Apollo/pull/1607).

So, I think you options are:

1 - use your existing server and downgrade tomcat to 8.0.X

2 - upgrade your deployment to the most recent version of master

3 - apply the patch from the pull request and redeploy: https://github.com/GMOD/Apollo/pull/1607

That should fix it.

Nathan

On May 19, 2017, at 7:26 AM, Deepak Unni <[hidden email]> wrote:

Hi Tom,

Could you tell us which version of Tomcat are you using on your machine?

Thanks,

Deepak


On Thu, May 18, 2017 at 7:48 PM, Tom Harrop <[hidden email]> wrote:
Hi Nathan,

1 - Yes, I've re-run prepare-refseqs.pl for the FASTA with and without pipes; it works only on the file with pipes removed. I've managed to get most of the user annotations re-uploaded to the new organism with add_features_from_gff3_to_annotations.pl, although there were two "(No such file or directory)" errors so I'll have to manually re-do these annotations.

2 - I've sent the headers from the not-working FASTA to you directly. I can't see anything weird other than the pipe character. On the other hand, if the pipes *were* the problem, I really don't understand why it worked for several weeks and then fell over.

Thanks for the help, it's a relief to have it running again!

Tom





This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.





--
Research Analyst
S104A Animal Science Research Center,
University of Missouri, Columbia



This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.






This list is for the Apollo Annotation Editing Tool. Info at http://genomearchitect.org/
If you wish to unsubscribe from the Apollo List: 1. From the address with which you subscribed to the list, send a message to [hidden email] | 2. In the subject line of your email type: unsubscribe apollo | 3. Leave the message body blank.

Loading...