URLError: urlopen error [Errno 104] Connection reset by peer

1,570 views
Skip to first unread message

suneel kumar s

unread,
Apr 21, 2014, 2:28:43 AM4/21/14
to php-sol...@googlegroups.com
Hi ,
I am using solr when i run this python file i got a n error like this URLError:  urlopen error [Errno 104] Connection reset by peer
any one help me.


[21/Apr/2014:11:53:45]  handler response: {'status': 'success', 'features': {'causes_by_map': <Feature: Feature object>, 'browse_by_category': <Feature: Feature object>, 'search_filters_causes': <Feature: Feature object>, 'search_filters': <Feature: Feature object>, 'sole_donees': <Feature: Feature object>, 'co_tn_only': <Feature: Feature object>, 'k8_schools_only': <Feature: Feature object>, 'favorites': <Feature: Feature object>, 'translation_widget': <Feature: Feature object>, 'search_filters_schools': <Feature: Feature object>}}
127.0.0.1 - - [21/Apr/2014:11:53:45] "GET /features?tenant_id=12 HTTP/1.1" 200 2556 "" "HTTP_Request2/2.1.1 (http://pear.php.net/package/http_request2) PHP/5.5.9-1ubuntu4"
[21/Apr/2014:11:54:46]  handler response: {'status': 'success', 'partners': [<Partner: Partner object>]}
127.0.0.1 - - [21/Apr/2014:11:54:46] "GET /partners?domain=currencyofgiving.local.kula.com HTTP/1.1" 200 159 "" "HTTP_Request2/2.1.1 (http://pear.php.net/package/http_request2) PHP/5.5.9-1ubuntu4"
[21/Apr/2014:11:54:46]  handler response: {'status': 'success', 'features': {'causes_by_map': <Feature: Feature object>, 'browse_by_category': <Feature: Feature object>, 'search_filters_causes': <Feature: Feature object>, 'search_filters': <Feature: Feature object>, 'sole_donees': <Feature: Feature object>, 'co_tn_only': <Feature: Feature object>, 'k8_schools_only': <Feature: Feature object>, 'favorites': <Feature: Feature object>, 'translation_widget': <Feature: Feature object>, 'search_filters_schools': <Feature: Feature object>}}
127.0.0.1 - - [21/Apr/2014:11:54:46] "GET /features?tenant_id=12 HTTP/1.1" 200 2556 "" "HTTP_Request2/2.1.1 (http://pear.php.net/package/http_request2) PHP/5.5.9-1ubuntu4"

[21/Apr/2014:11:54:46]  handler response: {'status': 'success', 'cause': False}
127.0.0.1 - - [21/Apr/2014:11:54:46] "GET /users_causes?user_id= HTTP/1.1" 200 34 "" "HTTP_Request2/2.1.1 (http://pear.php.net/package/http_request2) PHP/5.5.9-1ubuntu4"
[21/Apr/2014:11:54:46] HTTP 
Request Headers:
  HOST: localhost:9081
  Remote-Addr: 127.0.0.1
  USER-AGENT: HTTP_Request2/2.1.1 (http://pear.php.net/package/http_request2) PHP/5.5.9-1ubuntu4
  ACCEPT-ENCODING: gzip, deflate
[21/Apr/2014:11:54:46] HTTP Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/cherrypy/_cprequest.py", line 656, in respond
    response.body = self.handler()
  File "/usr/local/lib/python2.7/dist-packages/cherrypy/lib/encoding.py", line 188, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/var/www/Project_Runway/python/src/main.py", line 112, in json_handler
    value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/cherrypy/_cpdispatch.py", line 34, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/var/www/Project_Runway/python/src/handlers/causes.py", line 110, in GET
    ret = success(**self.cause_service.search(**kwargs))
  File "/var/www/Project_Runway/python/src/services/causes/cause_service.py", line 387, in search
    search_result = source(country).search(*args, filters=filters)
  File "/var/www/Project_Runway/python/src/services/causes/sources/guidestar.py", line 169, in search
    page_size, page)
  File "/var/www/Project_Runway/python/src/services/causes/sources/guidestar.py", line 54, in _run_query
    resp = urlopen(settings.get('guidestar.url'), encoded)  # POST
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 404, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 422, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
    return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 104] Connection reset by peer>

127.0.0.1 - - [21/Apr/2014:11:54:46] "GET /causes/?keywords=38111&page_size=10&page=0&countries=US&sort=&type_filters=&k8_filters=&region_filters= HTTP/1.1" 500 2651 "" "HTTP_Request2/2.1.1 (http://pear.php.net/package/http_request2) PHP/5.5.9-1ubuntu4"

Thank you ,
suneel kumar

Donovan Jimenez

unread,
Apr 21, 2014, 4:21:53 PM4/21/14
to php-sol...@googlegroups.com
So If I understand this log correctly... 

You have a PHP based client that calls a webservice written in Python, that then makes calls to Solr to get data. And the issue you're having is that during one of these calls to Solr from Python, the Solr server is closing the connection prematurely.

I would suggest you look at the error lots for Solr, as well as check what your read timeout for python's urlopen (perhaps Solr is just taking too long to respond).

I'm not really familiar with python's urlopen, and this mailing list is for the PHP Solr client, so I"m not sure I can be much more helpful.

Goodluck.


--
You received this message because you are subscribed to the Google Groups "PHP Solr Client" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-solr-clie...@googlegroups.com.
To post to this group, send email to php-sol...@googlegroups.com.
Visit this group at http://groups.google.com/group/php-solr-client.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages