social-feed-manager icon indicating copy to clipboard operation
social-feed-manager copied to clipboard

Error adding twitter filter in UI

Open laissezfarrell opened this issue 10 years ago • 1 comments
trafficstars

Getting the following error when adding a twitter filter in the Admin UI.

I am able to still add new twitter users so am not exactly sure why I'm seeing this.

Environment:

Request Method: POST Request URL: http://127.0.0.1:8000/admin/ui/twitterfilter/add/

Django Version: 1.6.10 Python Version: 2.7.6 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.humanize', 'social_auth', 'south', 'ui') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback: File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                 response = wrapped_callback(request, _callback_args, *_callback_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  2.             return self.admin_site.admin_view(view)(_args, *_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  3.                 response = view_func(request, _args, *_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  4.     response = view_func(request, _args, *_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  5.         return view(request, _args, *_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  6.         return bound_func(_args, *_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  7.                 response = view_func(request, _args, *_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  8.             return func(self, _args2, *_kwargs2)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
  9.             return func(_args, *_kwargs)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
  10.             self.save_model(request, new_object, form, False)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in save_model
  11.     obj.save()
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/db/models/base.py" in save
  12.                    force_update=force_update, update_fields=update_fields)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  13.                                update_fields=update_fields, raw=raw, using=using)
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py" in send
  14.         response = receiver(signal=self, sender=sender, **named)
    
    File "/home/bcadmin/social-feed-manager/sfm/ui/models.py" in call_create_conf
  15.     ui.utils.remove_process_group(instance.id)
    
    File "/home/bcadmin/social-feed-manager/sfm/ui/utils.py" in remove_process_group
  16.     proxy.supervisor.stopProcess(processname, True)
    
    File "/usr/lib/python2.7/xmlrpclib.py" in call
  17.     return self.__send(self.__name, args)
    
    File "/usr/lib/python2.7/xmlrpclib.py" in __request
  18.         verbose=self.__verbose
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/supervisor/xmlrpc.py" in request
  19.     self.connection.request('POST', handler, request_body, self.headers)
    
    File "/usr/lib/python2.7/httplib.py" in request
  20.     self._send_request(method, url, body, headers)
    
    File "/usr/lib/python2.7/httplib.py" in _send_request
  21.     self.endheaders(body)
    
    File "/usr/lib/python2.7/httplib.py" in endheaders
  22.     self._send_output(message_body)
    
    File "/usr/lib/python2.7/httplib.py" in _send_output
  23.     self.send(msg)
    
    File "/usr/lib/python2.7/httplib.py" in send
  24.             self.connect()
    
    File "/home/bcadmin/social-feed-manager/ENV/local/lib/python2.7/site-packages/supervisor/xmlrpc.py" in connect
  25.     self.sock.connect(self.socketfile)
    
    File "/usr/lib/python2.7/socket.py" in meth
  26. return getattr(self._sock,name)(*args)
    

Exception Type: error at /admin/ui/twitterfilter/add/ Exception Value: [Errno 13] Permission denied

laissezfarrell avatar Mar 09 '15 21:03 laissezfarrell

Hi Matthew - sfm will attempt to write a new filterstream configuration file in the sfm-specific supervisor.d directory in response to additions or edits to a twitter filter like this (and will attempt to delete same upon filter deletion). The process owning sfm will need to have appropriate permissions on that directory. Can you verify that that's true in this case?

Reading the traceback more closely and seeing the xmlrpc POST in there, on second thought the permissions issue looks more likely to be at the moment sfm attempts to communicate with supervisord to send it a signal to kick off the process. /etc/supervisor/supervisord.conf has variables for defining permissions on the socket for this up at the top of the default file; it might be that that's the issue.

Some more description and setup suggestions for this are detailed at:

http://social-feed-manager.readthedocs.org/en/latest/supervisor_and_streams.html

Let us know what you find. We probably need to improve our docs on this.

dchud avatar Mar 12 '15 22:03 dchud