Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Luca Guariento
    @lguariento
    I think it's too long though
    Andrew Hankinson
    @ahankinson
    can you reduce the logging? we don't need debug
    Luca Guariento
    @lguariento
    I don't seem to get any error...
    INFO - 2015-08-10 14:42:16.534; [ HMS] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null path=/admin/cores params={schema=schema.xml&dataDir=data&name=HMS&indexInfo=false&action=CREATE&collection=&shard=&wt=json&instanceDir=/srv/webapps/BassCulture/solr&config=solrconfig.xml&_=1439217735155} status=400 QTime=1277
    INFO - 2015-08-10 14:42:18.230; [ ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null path=/admin/cores params={indexInfo=false&wt=json&_=1439217738204} status=0 QTime=1
    INFO - 2015-08-10 14:42:18.315; [ ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null path=/admin/info/system params={wt=json&_=1439217738269} status=0 QTime=14
    INFO - 2015-08-10 14:42:18.380; [ ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null path=/admin/cores params={wt=json&_=1439217738351} status=0 QTime=4
    INFO - 2015-08-10 14:42:18.671; [ ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null path=/admin/cores params={wt=json&_=1439217738502} status=0 QTime=1
    INFO - 2015-08-10 14:42:21.031; [ ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null path=/admin/info/logging params={wt=json&since=0&_=1439217741011} status=0 QTime=4
    INFO - 2015-08-10 14:42:31.071; [ ] org.apache.solr.servlet.HttpSolrCall; [admin] webapp=null path=/admin/info/logging params={wt=json&since=1439217736534&_=1439217751057} status=0 QTime=0
    I put it on 'error' level
    Andrew Hankinson
    @ahankinson
    OK
    Luca Guariento
    @lguariento
    it seems like scorched doesn't even reach solr
    Andrew Hankinson
    @ahankinson
    and you're getting the '400'?
    Luca Guariento
    @lguariento
    404
    Creating source BC-W.B1
    Traceback (most recent call last):
    File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
    File "/srv/webapps/BassCulture/bcenv/lib/python3.4/site-packages/django/core/management/_init.py", line 338, in execute_from_command_line
    utility.execute()
    File "/srv/webapps/BassCulture/bcenv/lib/python3.4/site-packages/django/core/management/_init.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/core/management/base.py", line 393, in run_from_argv
    self.execute(args, **cmd_options)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/core/management/base.py", line 444, in execute
    output = self.handle(
    args, options)
    File "/srv/webapps/BassCulture/bassculture/management/commands/import_metadata.py", line 24, in handle
    self.create_source(row)
    File "/srv/webapps/BassCulture/bassculture/management/commands/import_metadata.py", line 63, in create_source
    s.save()
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/db/models/base.py", line 710, in save
    force_update=force_update, update_fields=update_fields)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/db/models/base.py", line 747, in save_base
    update_fields=update_fields, raw=raw, using=using)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 201, in send
    response = receiver(signal=self, sender=sender,
    named)
    File "/srv/webapps/BassCulture/bassculture/models/source.py", line 49, in solr_index
    record = si.query(type="source", source_id="{0}".format(instance.source_id)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/search.py", line 579, in execute
    ret = self.interface.search(**self.options())
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/connection.py", line 378, in search
    self.conn.select(params), self._datefields)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/connection.py", line 188, in select
    raise scorched.exc.SolrError(response)
    scorched.exc.SolrError: <Response [404]>
    Andrew Hankinson
    @ahankinson
    so the problem is in importing sources
    Luca Guariento
    @lguariento
    yes
    Andrew Hankinson
    @ahankinson
    and if you print "instance.source_id" just before it tries to execute the query?
    in your source model
    Luca Guariento
    @lguariento
    (bc_env)bsa-hatii:BassCulture BassCulture$ ./manage.py import_metadata /Users/BassCulture/Desktop/Metadata.csv
    {'verbosity': 1, 'settings': None, 'traceback': False, 'location': '/Users/BassCulture/Desktop/Metadata.csv', 'pythonpath': None, 'no_color': False}
    Cleaning source table
    Creating source BC-W.B1
    BC-W.B1
    Traceback (most recent call last):
    File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
    File "/srv/webapps/BassCulture/bcenv/lib/python3.4/site-packages/django/core/management/_init.py", line 338, in execute_from_command_line
    utility.execute()
    File "/srv/webapps/BassCulture/bcenv/lib/python3.4/site-packages/django/core/management/_init.py", line 330, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/core/management/base.py", line 393, in run_from_argv
    self.execute(args, **cmd_options)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/core/management/base.py", line 444, in execute
    output = self.handle(
    args, options)
    File "/srv/webapps/BassCulture/bassculture/management/commands/import_metadata.py", line 24, in handle
    self.create_source(row)
    File "/srv/webapps/BassCulture/bassculture/management/commands/import_metadata.py", line 63, in create_source
    s.save()
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/db/models/base.py", line 710, in save
    force_update=force_update, update_fields=update_fields)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/db/models/base.py", line 747, in save_base
    update_fields=update_fields, raw=raw, using=using)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/django/dispatch/dispatcher.py", line 201, in send
    response = receiver(signal=self, sender=sender,
    named)
    File "/srv/webapps/BassCulture/bassculture/models/source.py", line 51, in solr_index
    record = si.query(type="source", source_id="{0}".format(instance.source_id)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/search.py", line 579, in execute
    ret = self.interface.search(**self.options())
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/connection.py", line 378, in search
    self.conn.select(params), self._datefields)
    File "/srv/webapps/BassCulture/bc_env/lib/python3.4/site-packages/scorched/connection.py", line 188, in select
    raise scorched.exc.SolrError(response)
    scorched.exc.SolrError: <Response [404]>
    not sure I'm doing it right, I just added print(instance.source_id)
    it looks as though it doesn't print anything...
    Andrew Hankinson
    @ahankinson
    I'm guessing it printed BC-W.B1
    what happens if you change the SOLR_SERVER to just 'http://localhost:8983/'
    Luca Guariento
    @lguariento
    no that's the print("Creating source " + row['source_id']) in the import_metadata
    oh
    you're right
    (y)
    still 404
    Andrew Hankinson
    @ahankinson
    and what happens if you load 'http://localhost:8983' in your browser?
    Luca Guariento
    @lguariento
    it redirects to /solr
    Andrew Hankinson
    @ahankinson
    are you getting a 'no cores available' on the left?
    in the web interface?
    Luca Guariento
    @lguariento
    no, I have my HMS core loaded
    if I hardcode the address of solr, it connects...
    buh
    Andrew Hankinson
    @ahankinson
    what, exactly, do you put?
    what do you mean it 'connects'?
    as in, it works?
    Luca Guariento
    @lguariento
    si = scorched.SolrInterface("localhost:8983/solr/")
    Andrew Hankinson
    @ahankinson
    but that's not the same address
    Luca Guariento
    @lguariento
    well, it gives me another error (the 'no network adapters' one)
    Andrew Hankinson
    @ahankinson
    yes
    because you're omitting the 'http'
    Luca Guariento
    @lguariento
    true
    Andrew Hankinson
    @ahankinson
    if you add that you will get the exact same error
    Luca Guariento
    @lguariento
    ok, that's solved - true
    I've put the localhost:8983/solr in the SOLR_SERVER
    and now it's fine
    I mean, the module gets it from settings.
    Andrew Hankinson
    @ahankinson
    define "fine"?
    I don't understand
    do you mean that it works and imports the data?
    Luca Guariento
    @lguariento
    the module gets the setting