Could not get response from python riak

Naveen Tamanam naveen32india at gmail.com
Sat Oct 26 23:49:48 EDT 2013


Here in my  testing environment there are only 2 to 3 users so  I don't
think  this much traffic requires the very high  ulimit.

So what would be the cause of getting  error(exception)  "Could not get
response"  in python-riak.


On Sun, Oct 27, 2013 at 3:25 AM, Naveen Tamanam <naveen32india at gmail.com>wrote:

> Thanks for your  valuable time.
>
> We may consider the ulimit  under large load  but here in my testing
> there are only  two to three uses.
>
> I don't think   low ulimit causes the   "Could not get reponse " problem.
>
> I would like to know what is the reason behind this error.
>
>
>
>
> On Sun, Oct 27, 2013 at 1:00 AM, Sean Cribbs <sean at basho.com> wrote:
>
>> Resending to list...
>>
>> That is also definitely possible. Ensure that ulimit -n is high enough
>> for Riak, and that the Riak node is still running after you start it.
>> `riak-admin ping` will tell you if it's still running.
>>
>>
>> On Sat, Oct 26, 2013 at 7:23 PM, Naveen Tamanam <naveen32india at gmail.com>wrote:
>>
>>> Do you suspect the ulimit  it  is  configured to very low for my testing
>>> environment.
>>>
>>>
>>> On Sun, Oct 27, 2013 at 12:24 AM, Sean Cribbs <sean at basho.com> wrote:
>>>
>>>> Python riak-2.0.x will work with older clusters, yes, but you might get
>>>> NotImplementedError raised when the server does not support specific
>>>> functionality.
>>>>
>>>> The retry logic in riak-1.5.x was very flakey, I don't trust it. My
>>>> guess is that something is wrong with the configuration of either the
>>>> client or the cluster. I would check the hosts/ports to be sure.
>>>>
>>>>
>>>> On Sat, Oct 26, 2013 at 6:27 PM, Naveen Tamanam <
>>>> naveen32india at gmail.com> wrote:
>>>>
>>>>> I am using *Python riak-1.5.2.
>>>>>
>>>>> *
>>>>> *Any  idea about error that I have mentioned.
>>>>>
>>>>> *
>>>>> *Is that python riak 2.0  has  backward compatibility?
>>>>> *
>>>>> **
>>>>> *
>>>>> *
>>>>>
>>>>>
>>>>> On Sat, Oct 26, 2013 at 10:07 PM, Sean Cribbs <sean at basho.com> wrote:
>>>>>
>>>>>> Naveen,
>>>>>>
>>>>>> If you are using Riak 1.4, please upgrade to the 2.0.x package of the
>>>>>> client. Maintenance on the 1.5.x series has ceased.
>>>>>>
>>>>>>
>>>>>> On Fri, Oct 25, 2013 at 10:29 PM, Naveen Tamanam <
>>>>>> naveen32india at gmail.com> wrote:
>>>>>>
>>>>>>>  Hi All,
>>>>>>>
>>>>>>> I am using the riak with python/django.
>>>>>>>
>>>>>>> Sometimes I am getting the error  "Could not get response"
>>>>>>>
>>>>>>> I am using Djang*o 1.5
>>>>>>> Python riak-1.5.2
>>>>>>>
>>>>>>> The error description is as follows;
>>>>>>>
>>>>>>>
>>>>>>> *
>>>>>>>
>>>>>>> Django Version: 1.5
>>>>>>> Python Version: 2.6.6
>>>>>>> Installed Applications:
>>>>>>> ('django.contrib.auth',
>>>>>>> 'django.contrib.contenttypes',
>>>>>>> 'django.contrib.sessions',
>>>>>>> 'django.contrib.sites',
>>>>>>> 'django.contrib.messages',
>>>>>>> 'django.contrib.staticfiles',
>>>>>>> )
>>>>>>> Installed Middleware:
>>>>>>> ('django.middleware.common.CommonMiddleware',
>>>>>>> 'django.contrib.sessions.middleware.SessionMiddleware',
>>>>>>> 'django.contrib.auth.middleware.AuthenticationMiddleware',
>>>>>>> 'django.contrib.messages.middleware.MessageMiddleware')
>>>>>>>
>>>>>>> Traceback:
>>>>>>> File
>>>>>>> "/usr/lib/python2.6/site-packages/Django-1.5-py2.6.egg/django/core/handlers/base.py"
>>>>>>> in get_response
>>>>>>> 115. response = callback(request, *callback_args, **callback_kwargs)
>>>>>>> File "/opt/backend/mobichat/userapp/edit_views.py" in editCamp
>>>>>>> 100. campinfo = helpers.getCampinfoForTemplating(request, url=key)
>>>>>>> File "/opt/backend/mobichat/userapp/helpers.py" in
>>>>>>> getCampinfoForTemplating
>>>>>>> 213. campinfo['logo_url'], campinfo['logo_name'] =
>>>>>>> CampaignLogoPath.get(url)
>>>>>>> File "/opt/backend/mobichat/common/riak_backend/riak_backend.py" in
>>>>>>> get
>>>>>>> 1806. obj = cls.bucket.get(camp_uid)
>>>>>>> File
>>>>>>> "/usr/lib/python2.6/site-packages/riak-1.5.2-py2.6.egg/riak/bucket.py" in
>>>>>>> get
>>>>>>> 326. return obj.reload(r=r, pr=pr)
>>>>>>> File
>>>>>>> "/usr/lib/python2.6/site-packages/riak-1.5.2-py2.6.egg/riak/riak_object.py"
>>>>>>> in reload
>>>>>>> 459. Result = t.get(self, r=r, pr=pr, vtag=vtag)
>>>>>>> File
>>>>>>> "/usr/lib/python2.6/site-packages/riak-1.5.2-py2.6.egg/riak/transports/http.py"
>>>>>>> in get
>>>>>>> 152. response = self.http_request('GET', url)
>>>>>>> File
>>>>>>> "/usr/lib/python2.6/site-packages/riak-1.5.2-py2.6.egg/riak/transports/http.py"
>>>>>>> in http_request
>>>>>>> 626. raise RiakError("could not get a response")
>>>>>>>
>>>>>>> Exception Type: RiakError at
>>>>>>> /manager/camp-edit/EHbo24hFYDZGsg8ujpY9itDtM2a
>>>>>>> Exception Value: 'could not get a response'
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Any body please help me out  to fix the above issue.
>>>>>>>
>>>>>>> I see the riak source code
>>>>>>>
>>>>>>> Moudle is at  riak-1.5.2-py2.6.egg/riak/transports/http.py
>>>>>>>
>>>>>>> The function where that is coming is as follows
>>>>>>>
>>>>>>>     def http_request(self, method, uri, headers=None, body=''):
>>>>>>>         """
>>>>>>>         Given a Method, URL, Headers, and Body, perform and HTTP
>>>>>>> request,
>>>>>>>         and return a 2-tuple containing a dictionary of response
>>>>>>> headers
>>>>>>>         and the response body.
>>>>>>>         """
>>>>>>>         if headers is None:
>>>>>>>             headers = {}
>>>>>>>         # Run the request...
>>>>>>>         for retry in range(self.RETRY_COUNT):
>>>>>>>             with self._conns.withconn() as conn:
>>>>>>>                 ### should probably build this try/except into a
>>>>>>> custom
>>>>>>>                 ### contextmanager for the connection.
>>>>>>>                 try:
>>>>>>>                     conn.request(method, uri, body, headers)
>>>>>>>                     response = conn.getresponse()
>>>>>>>
>>>>>>>                     try:
>>>>>>>                         # Get the response headers...
>>>>>>>                         response_headers = {'http_code':
>>>>>>> response.status}
>>>>>>>                         for (key, value) in response.getheaders():
>>>>>>>                             response_headers[key.lower()] = value
>>>>>>>
>>>>>>>                         # Get the body...
>>>>>>>                         response_body = response.read()
>>>>>>>                     finally:
>>>>>>>                         response.close()
>>>>>>>
>>>>>>>                     return response_headers, response_body
>>>>>>>                 except socket.error, e:
>>>>>>>                     conn.close()
>>>>>>>                     if e[0] == errno.ECONNRESET:
>>>>>>>                         # Grab another connection and try again.
>>>>>>>                         continue
>>>>>>>                     # Don't know how to handle this.
>>>>>>>                     raise
>>>>>>>                 except httplib.HTTPException:
>>>>>>>                     # Just close the connection and try again.
>>>>>>>                     conn.close()
>>>>>>>                     continue
>>>>>>>
>>>>>>>         # No luck, even with retrying.
>>>>>>>         raise RiakError("could not get a response")
>>>>>>>
>>>>>>>
>>>>>>> At line number 626 in  riak/transport/http.py
>>>>>>> where http_requst is at   http.RiakHttpTransport.http_request
>>>>>>>
>>>>>>>
>>>>>>> This is error is coming very often.  For what reason it is coming
>>>>>>> and how to get permanent solution for this error .
>>>>>>>
>>>>>>> --
>>>>>>> Thanks & Regards,
>>>>>>> Naveen Tamanam
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> riak-users mailing list
>>>>>>> riak-users at lists.basho.com
>>>>>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sean Cribbs <sean at basho.com>
>>>>>> Software Engineer
>>>>>> Basho Technologies, Inc.
>>>>>> http://basho.com/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Thanks & Regards,
>>>>> Naveen Tamanam
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Sean Cribbs <sean at basho.com>
>>>> Software Engineer
>>>> Basho Technologies, Inc.
>>>> http://basho.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Thanks & Regards,
>>> Naveen Tamanam
>>>
>>
>>
>>
>> --
>> Sean Cribbs <sean at basho.com>
>> Software Engineer
>> Basho Technologies, Inc.
>> http://basho.com/
>>
>
>
>
> --
> Thanks & Regards,
> Naveen Tamanam
>



-- 
Thanks & Regards,
Naveen Tamanam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20131027/2a632c9c/attachment.html>


More information about the riak-users mailing list