elsiklab / jbrowse_elasticsearch

A JBrowse plugin for generating an elasticsearch database and an express.js adaptor for the Names API
6 stars 0 forks source link

Failed to load resource: ElasticSearch/main #9

Closed Raito92 closed 5 years ago

Raito92 commented 5 years ago

Hello, I'm trying to install the ElasticSearch plugin for my JBrowse. Everything worked fine, I installed the pre-required ElasticSearch tool, the npm and cpanm modules. I continued with the setup by loading all the files in the required folders, doing bash setup.sh, then performing bin/generate-elastic-search.pl with no errors. I followed the istructions here. Then, I added the plugins line at the top of my trackList.json file (the first two lines were put by default)... "elasticIndexName" : "", "elasticSearchUrl" : "http://localhost:3000", "formatVersion" : 1, "names" : { "type" : "Hash", "url" : "names/" }, "plugins": ["ElasticSearch"],

When I run my JBrowse, I get this error: https://i.ibb.co/yXfngZQ/x.png

I set my firewall properly according to the setup suggested on the Elasticsearch website... and also installed an API which turned out to be required.

sudo firewall-cmd --new-zone=elasticsearch --permanent sudo firewall-cmd --reload sudo firewall-cmd --zone=elasticsearch --add-source=10.150.2.3/32 --permanent sudo firewall-cmd --zone=elasticsearch --add-port=9200/tcp --permanent sudo firewall-cmd --reload

And when I do 'npm start' that's what I get

https://i.ibb.co/z8sQhF9/npm.png

I seem to get some errors after running bash setup.sh but I'm not sure whether they are relevant or not => https://i.ibb.co/x5JhMSX/Errors-installation.png It said: It says: 'Successfully installed jbrowse_elasticsearch-1.0'

What may the problem be? Thanks in advance!

cmdcolin commented 5 years ago

The error with "Failed to load resource: ElasticSearch/main" which means the plugin is not installed properly by jbrowse, and so it is unrelated if npm start is not working

I know this is tough but this plugin is kind of advanced, it requires multiple moving pieces (jbrowse, jbrowse plugin system, jbrowse perl data loader, the perl data loader in this module, npm middleware, and elasticsearch daemon), and it is hard to document completely. It is helpful to be sort of experienced with this tech stack to have intuition to solve the issues or else it will be hard to get setup. This plugin tries to make it easy if everything is kind of in the right place, but if not, it's hard to debug issues.

Steps you need

Then reload jbrowse in your web browser. if it still has that error about failing to load resource then something is weird and i need more information.

Aspie96 commented 5 years ago

"elasticSearchUrl" : "http://localhost:3000",

You need to replace "localhost" with the IP of your server if the client is another machine.

I set my firewall properly according to the setup suggested on the Elasticsearch website... and also installed an API which turned out to be required.

You need to open the 3000 port as well.

ensure it is a dev version or github clone

Yeah, this is important.

From your commandline, it looks like it is trying to launch /jbrowse1/bin/www. Make sure you are in the correct folder.

cmdcolin commented 5 years ago

I personally wouldn't open up ports but it's not necessarily bad, I just think it's easier to do reverse proxy (which means, forward a request to for example http://yourwebsite/elasticsearch to http://localhost:3000 which is done internally). That way no port opening is needed. As I said above, this is an advanced plugin and I can't document all setups because there is an insane diversity of them available. Thank you @Aspie96 for your tips also!

Please close this issue when it is resolved

cmdcolin commented 5 years ago

Maybe close for now, I think the issues were basically at least explained or elaborated on. I would probably just leave the README instructions as is