[ckan-dev] Solr problem when installing latest ckan

Adrià Mercader adria.mercader at okfn.org
Wed Apr 17 09:37:59 UTC 2013


Hi Lasse,

Looks like Solr is returning an HTML error instead of the expected response.

What is the value for your solr_url setting in your ini file?
What do you see if you load this URL on your browser?

{solr_url}/select/?q=*:*&wt=json


Adrià


On 17 April 2013 09:38, Lasse Vestergaard <ibbernik at gmail.com> wrote:
> Hi again.
>
> It seems like I have managed to fix some of the problem. I found out that I
> needed a forward slash (/) at the end of the url given in solr_url in
> development.ini. So, right now the initial error has gone, but I'm getting
> some other ones intead :
>
> SolrException: HTTP code=Unknown XML response from server: <html ...,
> reason=None
> 2013-04-17 08:28:22,393 WARNI [ckan.lib.search] Problems were found while
> connecting to the SOLR server
> 2013-04-17 08:28:22,953 INFO  [ckan.lib.base]  /api/i18n/en render time
> 0.032 seconds
> 2013-04-17 08:30:13,674 ERROR [ckan.lib.search.query] Expecting value: line
> 3 column 1 (char 2)
> Traceback (most recent call last):
> File "/home/ubuntu/pyenv/src/ckan/ckan/lib/search/query.py", line 369, in
> run
> data = json.loads(solr_response)
> File
> "/home/ubuntu/pyenv/lib/python2.7/site-packages/simplejson/__init__.py",
> line 461, in loads
> return _default_decoder.decode(s)
> File "/home/ubuntu/pyenv/lib/python2.7/site-packages/simplejson/decoder.py",
> line 374, in decode
> obj, end = self.raw_decode(s)
> File "/home/ubuntu/pyenv/lib/python2.7/site-packages/simplejson/decoder.py",
> line 393, in raw_decode
> return self.scan_once(s, idx=_w(s, idx).end())
>
> and this:
>
> ckan.lib.search.query] Expecting value: line 3 column 1 (char 2)
> Traceback (most recent call last):
> File "/home/ubuntu/pyenv/src/ckan/ckan/lib/search/query.py", line 369, in
> run
> data = json.loads(solr_response)
> File
> "/home/ubuntu/pyenv/lib/python2.7/site-packages/simplejson/__init__.py",
> line 461, in loads
> return _default_decoder.decode(s)
> File "/home/ubuntu/pyenv/lib/python2.7/site-packages/simplejson/decoder.py",
> line 374, in decode
> obj, end = self.raw_decode(s)
> File "/home/ubuntu/pyenv/lib/python2.7/site-packages/simplejson/decoder.py",
> line 393, in raw_decode
> return self.scan_once(s, idx=_w(s, idx).end())
> JSONDecodeError: Expecting value: line 3 column 1 (char 2)
> 2013-04-17 08:30:58,151 ERROR [ckan.controllers.package] Dataset search
> error: (JSONDecodeError('Expecting value: line 3 column 1 (char 2)',),)
> 2013-04-17 08:30:58,415 INFO  [ckan.lib.base]  /dataset render time 0.296
> seconds
> 2013-04-17 08:30:58,604 INFO  [ckan.lib.base]  /api/i18n/en render time
> 0.024 seconds
>
> Any ideas?
>
> /Lasse
>
>
>
> 2013/4/16 Lasse Vestergaard <ibbernik at gmail.com>
>>
>> Hi all.
>>
>> Have installed ckan on an Ubuntu server (12.04), from this link:
>>
>> http://docs.ckan.org/en/latest/install-from-source.html (2.1 i guess)
>>
>> Everything installed fine. And I can connect to the front page of ckan.
>> There are two problems though.
>>
>> When I'm logged in as a sysadmin (in a web browser) I can't access
>> ckan-admin/authz. I just get page not found. Any suggestions?
>>
>> An other problem is that it seems like I have a problem with solr. When I
>> uncomment (enable) solr_url in development.ini, the front page just says:
>>
>> Server Error
>> An internal server error occurred
>>
>> When I look in apache error.log I get the following message:
>>
>> [Tue Apr 16 13:26:38 2013] [error] 2013-04-16 13:26:38,319 ERROR
>> [ckan.lib.search.common] ''
>> [Tue Apr 16 13:26:38 2013] [error] Traceback (most recent call last):
>> [Tue Apr 16 13:26:38 2013] [error]   File
>> "/home/ubuntu/pyenv/src/ckan/ckan/lib/search/common.py", line 51, in
>> is_available
>> [Tue Apr 16 13:26:38 2013] [error]     conn.query("*:*", rows=1)
>> [Tue Apr 16 13:26:38 2013] [error]   File
>> "/home/ubuntu/pyenv/lib/python2.7/site-packages/solr/core.py", line 703, in
>> query
>> [Tue Apr 16 13:26:38 2013] [error]     return self.select(*args, **params)
>> [Tue Apr 16 13:26:38 2013] [error]   File
>> "/home/ubuntu/pyenv/lib/python2.7/site-packages/solr/core.py", line 798, in
>> __call__
>> [Tue Apr 16 13:26:38 2013] [error]     xml = self.raw(**params)
>> [Tue Apr 16 13:26:38 2013] [error]   File
>> "/home/ubuntu/pyenv/lib/python2.7/site-packages/solr/core.py", line 823, in
>> raw
>> [Tue Apr 16 13:26:38 2013] [error]     rsp = conn._post(self.selector,
>> request, conn.form_headers)
>> [Tue Apr 16 13:26:38 2013] [error]   File
>> "/home/ubuntu/pyenv/lib/python2.7/site-packages/solr/core.py", line 639, in
>> _post
>> [Tue Apr 16 13:26:38 2013] [error]     return
>> check_response_status(self.conn.getresponse())
>> [Tue Apr 16 13:26:38 2013] [error]   File "/usr/lib/python2.7/httplib.py",
>> line 1030, in getresponse
>> [Tue Apr 16 13:26:38 2013] [error]     response.begin()
>> [Tue Apr 16 13:26:38 2013] [error]   File "/usr/lib/python2.7/httplib.py",
>> line 407, in begin
>> [Tue Apr 16 13:26:38 2013] [error]     version, status, reason =
>> self._read_status()
>> [Tue Apr 16 13:26:38 2013] [error]   File "/usr/lib/python2.7/httplib.py",
>> line 371, in _read_status
>> [Tue Apr 16 13:26:38 2013] [error]     raise BadStatusLine(line)
>> [Tue Apr 16 13:26:38 2013] [error] BadStatusLine: ''
>> [Tue Apr 16 13:26:38 2013] [error] 2013-04-16 13:26:38,320 WARNI
>> [ckan.lib.search] Problems were found while connecting to the SOLR server
>> [Tue Apr 16 13:26:38 2013] [error] 2013-04-16 13:26:38,891 INFO
>> [ckan.lib.base]  /api/i18n/en render time 0.001 seconds
>>
>> I can use curl to connect to http://localhost:8983/solr/ and I get a
>> welcome message, so in that regard it seems like solr is setup up correctly.
>> I'm not sure if the problem really relates to WSGI.
>>
>> Do you have any ideas?
>>
>> Best regards
>>
>> Lasse Vestergaard
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev
>




More information about the ckan-dev mailing list