2012-05-24 16 views
7

Ho un'applicazione Sentry, in esecuzione correttamente nell'url: mydomain.com:11011.Sentry + Raven, errore HTTP 401: UNAUTHORIZED

Ho un progetto creato con il CDN: http://XXX:[email protected]:11011/2

Questo URL viene servito con HAProxy con questa configurazione:

listen sentry *:11011 
    mode tcp 
    server app1 localhost:9005 maxconn 32 

La configurazione di sentinella:

SENTRY_KEY = 'foo' 
SENTRY_PUBLIC = True 
SENTRY_URL_PREFIX = 'http://mydomain.com:11011' # No trailing slash! 
SENTRY_WEB_HOST = 'localhost' 
SENTRY_WEB_PORT = 9005 
SENTRY_WEB_OPTIONS = { 
    'workers': 1, # the number of gunicorn workers 
    'worker_class': 'gevent', 
} 

Ma ho un problema con l'autenticazione quando provo il test Raven, dallo stesso server:

$ raven test http://XXX:[email protected]:11011/2 
HTTPError: HTTP Error 401: UNAUTHORIZED 

fallisce anche:

$ raven test http://XXX:[email protected]:9005/2 
HTTPError: HTTP Error 401: UNAUTHORIZED 

Quale potrebbe essere il problema? Grazie.

risposta

7

Il problema era le diverse versioni di Raven sul client e server

Nel server Sentry:

raven==1.8.4 
sentry==4.4.5 

Nell'applicazione django:

raven==1.9.1 

Per risolvere questo problema, fare il seguente, in applicazione django.

pip uninstall raven 
pip install raven==1.8.4