dragonresearch / rpki.net

Dragon Research Labs rpki.net RPKI toolkit
54 stars 30 forks source link

ca.rg.net GUI login blows chunks #794

Closed sraustein closed 8 years ago

sraustein commented 8 years ago

{{{ [Sat Mar 19 06:53:15.522835 2016] [:error] [pid 10346:tid 3047156544] ERROR 2016-03-19 06:53:15,519 django.request Internal Server Error: /accounts/login/ [Sat Mar 19 06:53:15.522864 2016] [:error] [pid 10346:tid 3047156544] Traceback (most recent call last): [Sat Mar 19 06:53:15.522870 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response [Sat Mar 19 06:53:15.522876 2016] [:error] [pid 10346:tid 3047156544] response = wrapped_callback(request, _callback_args, _callback_kwargs) [Sat Mar 19 06:53:15.522881 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/rpki/gui/decorators.py", line 28, in _tls_required [Sat Mar 19 06:53:15.522886 2016] [:error] [pid 10346:tid 3047156544] return f(request, _args, _kwargs) [Sat Mar 19 06:53:15.522891 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/rpki/gui/views.py", line 24, in login [Sat Mar 19 06:53:15.522897 2016] [:error] [pid 10346:tid 3047156544] return django.contrib.auth.views.login(request, _args, _kwargs) [Sat Mar 19 06:53:15.522902 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper [Sat Mar 19 06:53:15.522907 2016] [:error] [pid 10346:tid 3047156544] return view(request, _args, _kwargs) [Sat Mar 19 06:53:15.522912 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py", line 110, in _wrapped_view [Sat Mar 19 06:53:15.522918 2016] [:error] [pid 10346:tid 3047156544] response = view_func(request, _args, _kwargs) [Sat Mar 19 06:53:15.522923 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func [Sat Mar 19 06:53:15.522928 2016] [:error] [pid 10346:tid 3047156544] response = view_func(request, _args, _kwargs) [Sat Mar 19 06:53:15.522934 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/views.py", line 44, in login [Sat Mar 19 06:53:15.522939 2016] [:error] [pid 10346:tid 3047156544] if form.is_valid(): [Sat Mar 19 06:53:15.522944 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 184, in is_valid [Sat Mar 19 06:53:15.522960 2016] [:error] [pid 10346:tid 3047156544] return self.is_bound and not self.errors [Sat Mar 19 06:53:15.522965 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 176, in errors [Sat Mar 19 06:53:15.522970 2016] [:error] [pid 10346:tid 3047156544] self.full_clean() [Sat Mar 19 06:53:15.522975 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 393, in full_clean [Sat Mar 19 06:53:15.522980 2016] [:error] [pid 10346:tid 3047156544] self._clean_form() [Sat Mar 19 06:53:15.522984 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 417, in _clean_form [Sat Mar 19 06:53:15.522989 2016] [:error] [pid 10346:tid 3047156544] cleaned_data = self.clean() [Sat Mar 19 06:53:15.522994 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/forms.py", line 157, in clean [Sat Mar 19 06:53:15.522999 2016] [:error] [pid 10346:tid 3047156544] password=password) [Sat Mar 19 06:53:15.523003 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/init.py", line 74, in authenticate [Sat Mar 19 06:53:15.523008 2016] [:error] [pid 10346:tid 3047156544] user = backend.authenticate(credentials) [Sat Mar 19 06:53:15.523013 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/backends.py", line 17, in authenticate [Sat Mar 19 06:53:15.523018 2016] [:error] [pid 10346:tid 3047156544] user = UserModel._default_manager.get_by_natural_key(username) [Sat Mar 19 06:53:15.523023 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/models.py", line 162, in get_by_natural_key [Sat Mar 19 06:53:15.523028 2016] [:error] [pid 10346:tid 3047156544] return self.get({self.model.USERNAME_FIELD: username}) [Sat Mar 19 06:53:15.523032 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method [Sat Mar 19 06:53:15.523037 2016] [:error] [pid 10346:tid 3047156544] return getattr(self.get_queryset(), name)(_args, _kwargs) [Sat Mar 19 06:53:15.523042 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 328, in get [Sat Mar 19 06:53:15.523047 2016] [:error] [pid 10346:tid 3047156544] num = len(clone) [Sat Mar 19 06:53:15.523051 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 144, in len [Sat Mar 19 06:53:15.523056 2016] [:error] [pid 10346:tid 3047156544] self._fetch_all() [Sat Mar 19 06:53:15.523061 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 965, in _fetch_all [Sat Mar 19 06:53:15.523065 2016] [:error] [pid 10346:tid 3047156544] self._result_cache = list(self.iterator()) [Sat Mar 19 06:53:15.523070 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 238, in iterator [Sat Mar 19 06:53:15.523075 2016] [:error] [pid 10346:tid 3047156544] results = compiler.execute_sql() [Sat Mar 19 06:53:15.523079 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 838, in execute_sql [Sat Mar 19 06:53:15.523084 2016] [:error] [pid 10346:tid 3047156544] cursor = self.connection.cursor() [Sat Mar 19 06:53:15.523088 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 164, in cursor [Sat Mar 19 06:53:15.523093 2016] [:error] [pid 10346:tid 3047156544] cursor = self.make_cursor(self._cursor()) [Sat Mar 19 06:53:15.523098 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 135, in _cursor [Sat Mar 19 06:53:15.523107 2016] [:error] [pid 10346:tid 3047156544] self.ensure_connection() [Sat Mar 19 06:53:15.523112 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 130, in ensure_connection [Sat Mar 19 06:53:15.523117 2016] [:error] [pid 10346:tid 3047156544] self.connect() [Sat Mar 19 06:53:15.523122 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 98, in exit [Sat Mar 19 06:53:15.523127 2016] [:error] [pid 10346:tid 3047156544] six.reraise(dj_exc_type, dj_exc_value, traceback) [Sat Mar 19 06:53:15.523131 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 130, in ensure_connection [Sat Mar 19 06:53:15.523136 2016] [:error] [pid 10346:tid 3047156544] self.connect() [Sat Mar 19 06:53:15.523141 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 119, in connect [Sat Mar 19 06:53:15.523145 2016] [:error] [pid 10346:tid 3047156544] self.connection = self.get_new_connection(conn_params) [Sat Mar 19 06:53:15.523150 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection [Sat Mar 19 06:53:15.523155 2016] [:error] [pid 10346:tid 3047156544] connection = Database.connect(_conn_params) [Sat Mar 19 06:53:15.523160 2016] [:error] [pid 10346:tid 3047156544] File "/usr/lib/python2.7/dist-packages/psycopg2/init.py", line 179, in connect [Sat Mar 19 06:53:15.523164 2016] [:error] [pid 10346:tid 3047156544] connection_factory=connection_factory, async=async) [Sat Mar 19 06:53:15.523169 2016] [:error] [pid 10346:tid 3047156544] OperationalError: FATAL: Peer authentication failed for user "rpki" [Sat Mar 19 06:53:15.523174 2016] [:error] [pid 10346:tid 3047156544] [Sat Mar 19 06:53:15.530008 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] mod_wsgi (pid=10346): Exception occurred processing WSGI script '/usr/share/rpki/wsgi/rpki.wsgi'., referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530043 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] Traceback (most recent call last):, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530065 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 189, in call, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530202 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] response = self.get_response(request), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530223 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 218, in get_response, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530252 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] response = self.handle_uncaught_exception(request, resolver, sys.exc_info()), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530268 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 256, in handle_uncaught_exception, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530292 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] 'request': request, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530307 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/logging/init.py", line 1178, in error, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530811 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] self._log(ERROR, msg, args, _kwargs), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530834 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/logging/init.py", line 1271, in _log, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530863 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] self.handle(record), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530878 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/logging/init.py", line 1281, in handle, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530901 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] self.callHandlers(record), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530916 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/logging/init.py", line 1321, in callHandlers, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530937 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] hdlr.handle(record), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530952 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/logging/init.py", line 749, in handle, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530974 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] self.emit(record), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.530989 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/utils/log.py", line 129, in emit, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531092 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] self.send_mail(subject, message, fail_silently=True, html_message=html_message), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531113 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/utils/log.py", line 132, in send_mail, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531140 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] mail.mail_admins(subject, message, _args, connection=self.connection(), _kwargs), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531155 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/core/mail/init.py", line 98, in mail_admins, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531246 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] mail.send(fail_silently=fail_silently), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531266 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/core/mail/message.py", line 303, in send, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531437 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] return self.get_connection(fail_silently).send_messages([self]), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531457 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py", line 100, in send_messages, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531576 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] new_conn_created = self.open(), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531608 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/dist-packages/django/core/mail/backends/smtp.py", line 58, in open, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531642 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] self.connection = connection_class(self.host, self.port, connection_params), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531659 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/smtplib.py", line 256, in init**, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531930 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723](code, msg) = self.connect(host, port), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531950 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/smtplib.py", line 316, in connect, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531977 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] self.sock = self._get_socket(host, port, self.timeout), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.531992 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/smtplib.py", line 291, in _get_socket, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.532014 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] return socket.create_connection((host, port), timeout), referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.532037 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] File "/usr/lib/python2.7/socket.py", line 571, in create_connection, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.532244 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] raise err, referer: https://ca.rg.net/accounts/login/?next=/rpki/ [Sat Mar 19 06:53:15.532272 2016] [:error] [pid 10346:tid 3047156544] [client 210.138.216.50:61723] error: [Errno 111] Connection refused, referer: https://ca.rg.net/accounts/login/?next=/rpki/ }}}

Trac ticket #788 component testbed priority minor, owner sra, created by randy on 2016-03-19T06:55:48Z, last modified 2016-03-20T00:16:51Z

sraustein commented 8 years ago

hmmm, if it makes a difference, the superuser's name is not root. it's RGnet

Trac comment by randy on 2016-03-19T09:57:28Z

sraustein commented 8 years ago

Root cause appears to be same as #787: change from MySQL to PostgreSQL (with default PostgreSQL uid-based authentication, but that's what we want) means that GUI WSGI process needs to run as user rpki. Michael already has hooks for controlling the WSGI user, just need to figure out how to use them correctly in this configuration and build the package that way.

Trac comment by sra on 2016-03-19T17:36:49Z

sraustein commented 8 years ago

In [changeset:"6317" 6317]: {{{

!CommitTicketReference repository="" revision="6317"

Run rpki.wsgi as user rpki. Closes #788. }}}

Trac comment by sra on 2016-03-19T18:45:12Z

sraustein commented 8 years ago

Addressed in [6317], [6318](Trac bug ate the email notification).

Trac comment by sra on 2016-03-19T19:17:21Z

sraustein commented 8 years ago

{{{ ca.rg.net:/root# rpkic version 0.6318 }}} {{{ [Sat Mar 19 19:26:12.333070 2016] [mpm_event:notice] [pid 14939:tid 3074550400] AH00491: caught SIGTERM, shutting down [Sat Mar 19 19:26:13.115676 2016] [mpm_event:notice] [pid 15228:tid 3074841216] AH00489: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations [Sat Mar 19 19:26:13.115761 2016] [core:notice] [pid 15228:tid 3074841216] AH00094: Command line: '/usr/sbin/apache2' [Sat Mar 19 19:26:25.871034 2016] [:error] [pid 15232:tid 3013585728] ERROR 2016-03-19 19:26:25,867 django.request Internal Server Error: /accounts/login/ [Sat Mar 19 19:26:25.871072 2016] [:error] [pid 15232:tid 3013585728] Traceback (most recent call last): [Sat Mar 19 19:26:25.871078 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response [Sat Mar 19 19:26:25.871083 2016] [:error] [pid 15232:tid 3013585728] response = wrapped_callback(request, _callback_args, _callback_kwargs) [Sat Mar 19 19:26:25.871088 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/rpki/gui/decorators.py", line 28, in _tls_required [Sat Mar 19 19:26:25.871093 2016] [:error] [pid 15232:tid 3013585728] return f(request, _args, _kwargs) [Sat Mar 19 19:26:25.871097 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/rpki/gui/views.py", line 24, in login [Sat Mar 19 19:26:25.871102 2016] [:error] [pid 15232:tid 3013585728] return django.contrib.auth.views.login(request, _args, _kwargs) [Sat Mar 19 19:26:25.871107 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper [Sat Mar 19 19:26:25.871112 2016] [:error] [pid 15232:tid 3013585728] return view(request, _args, _kwargs) [Sat Mar 19 19:26:25.871117 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py", line 110, in _wrapped_view [Sat Mar 19 19:26:25.871122 2016] [:error] [pid 15232:tid 3013585728] response = view_func(request, _args, _kwargs) [Sat Mar 19 19:26:25.871127 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func [Sat Mar 19 19:26:25.871132 2016] [:error] [pid 15232:tid 3013585728] response = view_func(request, _args, _kwargs) [Sat Mar 19 19:26:25.871137 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/views.py", line 44, in login [Sat Mar 19 19:26:25.871142 2016] [:error] [pid 15232:tid 3013585728] if form.is_valid(): [Sat Mar 19 19:26:25.871146 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 184, in is_valid [Sat Mar 19 19:26:25.871151 2016] [:error] [pid 15232:tid 3013585728] return self.is_bound and not self.errors [Sat Mar 19 19:26:25.871155 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 176, in errors [Sat Mar 19 19:26:25.871160 2016] [:error] [pid 15232:tid 3013585728] self.full_clean() [Sat Mar 19 19:26:25.871165 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 393, in full_clean [Sat Mar 19 19:26:25.871170 2016] [:error] [pid 15232:tid 3013585728] self._clean_form() [Sat Mar 19 19:26:25.871202 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/forms/forms.py", line 417, in _clean_form [Sat Mar 19 19:26:25.871207 2016] [:error] [pid 15232:tid 3013585728] cleaned_data = self.clean() [Sat Mar 19 19:26:25.871212 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/forms.py", line 157, in clean [Sat Mar 19 19:26:25.871217 2016] [:error] [pid 15232:tid 3013585728] password=password) [Sat Mar 19 19:26:25.871221 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/init.py", line 74, in authenticate [Sat Mar 19 19:26:25.871227 2016] [:error] [pid 15232:tid 3013585728] user = backend.authenticate(credentials) [Sat Mar 19 19:26:25.871232 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/backends.py", line 17, in authenticate [Sat Mar 19 19:26:25.871237 2016] [:error] [pid 15232:tid 3013585728] user = UserModel._default_manager.get_by_natural_key(username) [Sat Mar 19 19:26:25.871251 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/contrib/auth/models.py", line 162, in get_by_natural_key [Sat Mar 19 19:26:25.871257 2016] [:error] [pid 15232:tid 3013585728] return self.get({self.model.USERNAME_FIELD: username}) [Sat Mar 19 19:26:25.871262 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 127, in manager_method [Sat Mar 19 19:26:25.871266 2016] [:error] [pid 15232:tid 3013585728] return getattr(self.get_queryset(), name)(_args, *_kwargs) [Sat Mar 19 19:26:25.871271 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 328, in get [Sat Mar 19 19:26:25.871276 2016] [:error] [pid 15232:tid 3013585728] num = len(clone) [Sat Mar 19 19:26:25.871280 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 144, in len [Sat Mar 19 19:26:25.871285 2016] [:error] [pid 15232:tid 3013585728] self._fetch_all() [Sat Mar 19 19:26:25.871289 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 965, in _fetch_all [Sat Mar 19 19:26:25.871294 2016] [:error] [pid 15232:tid 3013585728] self._result_cache = list(self.iterator()) [Sat Mar 19 19:26:25.871299 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 238, in iterator [Sat Mar 19 19:26:25.871304 2016] [:error] [pid 15232:tid 3013585728] results = compiler.execute_sql() [Sat Mar 19 19:26:25.871308 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 838, in execute_sql [Sat Mar 19 19:26:25.871313 2016] [:error] [pid 15232:tid 3013585728] cursor = self.connection.cursor() [Sat Mar 19 19:26:25.871318 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 164, in cursor [Sat Mar 19 19:26:25.871322 2016] [:error] [pid 15232:tid 3013585728] cursor = self.make_cursor(self._cursor()) [Sat Mar 19 19:26:25.871327 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 135, in _cursor [Sat Mar 19 19:26:25.871332 2016] [:error] [pid 15232:tid 3013585728] self.ensure_connection() [Sat Mar 19 19:26:25.871336 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 130, in ensure_connection [Sat Mar 19 19:26:25.871341 2016] [:error] [pid 15232:tid 3013585728] self.connect() [Sat Mar 19 19:26:25.871346 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 98, in exit [Sat Mar 19 19:26:25.871351 2016] [:error] [pid 15232:tid 3013585728] six.reraise(dj_exc_type, dj_exc_value, traceback) [Sat Mar 19 19:26:25.871355 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 130, in ensure_connection [Sat Mar 19 19:26:25.871360 2016] [:error] [pid 15232:tid 3013585728] self.connect() [Sat Mar 19 19:26:25.871365 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/backends/base/base.py", line 119, in connect [Sat Mar 19 19:26:25.871369 2016] [:error] [pid 15232:tid 3013585728] self.connection = self.get_new_connection(conn_params) [Sat Mar 19 19:26:25.871374 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 176, in get_new_connection [Sat Mar 19 19:26:25.871379 2016] [:error] [pid 15232:tid 3013585728] connection = Database.connect(conn_params) [Sat Mar 19 19:26:25.871384 2016] [:error] [pid 15232:tid 3013585728] File "/usr/lib/python2.7/dist-packages/psycopg2/init**.py", line 179, in connect [Sat Mar 19 19:26:25.871392 2016] [:error] [pid 15232:tid 3013585728] connection_factory=connection_factory, async=async) [Sat Mar 19 19:26:25.871397 2016] [:error] [pid 15232:tid 3013585728] OperationalError: FATAL: Peer authentication failed for user "rpki" [Sat Mar 19 19:26:25.871402 2016] [:error] [pid 15232:tid 3013585728] }}}

Trac comment by randy on 2016-03-19T19:28:03Z

sraustein commented 8 years ago

[6318] was the correct fix to the core problem, but ordinary upgrade doesn't whack existing Apache configuration (because you might have changed it on purpose, it can't tell).

You can either force a complete reinstallation:

{{{ sudo apt-get purge rpki-ca sudo apt-get install rpki-ca }}}

or just manually copy the updated Apache configuration:

{{{ cp -p /etc/rpki/apache.conf.sample /etc/rpki/apache.conf }}}

Trac comment by sra on 2016-03-19T21:00:16Z

sraustein commented 8 years ago

Oh, and if you take the cp route, you'll have to restart Apache for it to take effect:

{{{ sudo service apache2 restart }}}

Trac comment by sra on 2016-03-19T21:01:28Z

sraustein commented 8 years ago

my hack to apache is in its own sites-{available|enabled}

{{{

cat /etc/apache2/sites-enabled/sslchainfile.conf

SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt }}} needed to make dane work

so as not to disturb the default. but i guess other users could have had some need to hack the installed one.

Trac comment by randy on 2016-03-19T23:48:08Z

sraustein commented 8 years ago

I don't see anything left to fix here, unless you're suggesting that I'm responsible for what you did to your Apache configuration. :)

Re-re-closing. If you reply to this, you get to close it yourself.

Trac comment by sra on 2016-03-19T23:55:02Z

sraustein commented 8 years ago

wiped rpki-ca and rpki-rp, reinstalled, edited rpki.conf, restarted rpki-ca

rpkic> initialize Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/rpki/cli.py", line 70, in onecmd return cmd.Cmd.onecmd(self, line) File "/usr/lib/python2.7/cmd.py", line 221, in onecmd return func(arg) File "/usr/lib/python2.7/dist-packages/rpki/cli.py", line 262, in wrapped return func(self, parser.parse_args(shlex.split(arg))) File "/usr/lib/python2.7/dist-packages/rpki/rpkic.py", line 228, in do_initialize None if rootd_case else sys.stdout) File "/usr/lib/python2.7/dist-packages/rpki/irdb/zookeeper.py", line 188, in save ElementTree(self.etree).write(tempname) File "lxml.etree.pyx", line 1949, in lxml.etree._ElementTree.write (src/lxml/lxml.etree.c:55919) File "serializer.pxi", line 477, in lxml.etree._tofilelike (src/lxml/lxml.etree.c:117874) File "serializer.pxi", line 523, in lxml.etree._create_output_buffer (src/lxml/lxml.etree.c:118373) File "serializer.pxi", line 512, in lxml.etree._create_output_buffer (src/lxml/lxml.etree.c:118218) IOError: [Errno 13] Permission denied

Trac comment by randy on 2016-03-19T23:56:33Z

sraustein commented 8 years ago

oops, sorry i forgot braces

Trac comment by randy on 2016-03-19T23:58:02Z

sraustein commented 8 years ago

Please create a new ticket rather than taking unrelated issues onto an old one.

Trac comment by sra on 2016-03-19T23:59:12Z

sraustein commented 8 years ago

sorry, no birth certificate so did not know it was unrelated

Trac comment by randy on 2016-03-20T00:00:34Z

sraustein commented 8 years ago

will close when tested successfully. i promise, cross my heart

Trac comment by randy on 2016-03-20T00:04:22Z

sraustein commented 8 years ago

This ticket was about a permission problem with the GUI, now fixed. rpkic is not the GUI.

Trac comment by sra on 2016-03-20T00:16:51Z

sraustein commented 8 years ago

Closed with resolution fixed