Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backoffice not available for some users ? (Error 500) #4392

Closed
RachL opened this issue Oct 22, 2019 · 5 comments · Fixed by #4393
Closed

Backoffice not available for some users ? (Error 500) #4392

RachL opened this issue Oct 22, 2019 · 5 comments · Fixed by #4393
Assignees
Labels
bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users.

Comments

@RachL
Copy link
Contributor

RachL commented Oct 22, 2019

Description

Some users cannot reach the /admin URL (or any URL in the backoffice without seeing the snail).

I'm trying to find a pattern and it is possible it only affect owners and not managers. But I need more data to confirm.

Super admin cannot reach these enterprise profile as well. Error 500

Steps to Reproduce

  1. Log in as super admin on French production
  2. Try to reach /admin/enterprises/le-jardin-de-deux-main/editor /admin/enterprises/hub-demo-open-food-france/edit
  3. See an error 500
  4. Try to log in as manager of these hubs : same error
  5. Try another hub like /admin/enterprises/nantes-chantenay/edit No problem. What's the difference between the two of them?
  6. Try to reach the enterprise "Hub demo Open Food France" with rachel.arnould[at]openfoodfrance.org (manager) everything is working well...

Animated Gif/Screenshot

image.png

Severity

bug-s1: a critical feature is broken: checkout, payments, signup, login

Your Environment

  • Version used: v2.5.3
  • Browser name and version: Firefox 69
  • Operating System and version (desktop or mobile): Desktop
@RachL RachL added the bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users. label Oct 22, 2019
@mkllnk mkllnk self-assigned this Oct 22, 2019
@mkllnk
Copy link
Member

mkllnk commented Oct 22, 2019

This is related to this Bugsnag issue: https://app.bugsnag.com/open-food-france/open-food-france-prod/errors/5daf8035e90ad6001b8e2cbb

/home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/net/http.rb:879:in `initialize': getaddrinfo: Temporary failure in name resolution (ActionView::Template::Error)
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/net/http.rb:879:in `open'
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/net/http.rb:879:in `block in connect'
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/timeout.rb:90:in `block in timeout'
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/timeout.rb:100:in `call'
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/timeout.rb:100:in `timeout'
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/net/http.rb:878:in `connect'
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
    from /home/openfoodnetwork/.rbenv/versions/2.1.9/lib/ruby/2.1.0/net/http.rb:858:in `start'
    from gems/aws-sdk-1.11.1/lib/aws/core/http/connection_pool.rb:301:in `start_session'
    from gems/aws-sdk-1.11.1/lib/aws/core/http/connection_pool.rb:125:in `session_for'
    from gems/aws-sdk-1.11.1/lib/aws/core/http/net_http_handler.rb:52:in `handle'
    from gems/aws-sdk-1.11.1/lib/aws/core/client.rb:238:in `block in make_sync_request'
...

@mkllnk
Copy link
Member

mkllnk commented Oct 22, 2019

This patch enables me to see the enterprise again:

--- a/app/serializers/api/admin/enterprise_serializer.rb
+++ b/app/serializers/api/admin/enterprise_serializer.rb
@@ -62,6 +62,7 @@ class Api::Admin::EnterpriseSerializer < ActiveModel::Serializer
   #   #   medium: LOGO_MEDIUM_URL
   #   # }
   def attachment_urls(attachment, versions)
+    return
     return unless attachment.exists?
 
     versions.each_with_object({}) do |version, urls|

@mkllnk
Copy link
Member

mkllnk commented Oct 22, 2019

I can replicate the error in the console on the server:

> Enterprise.where("logo_file_name is not null").first.logo.exists?
SocketError: getaddrinfo: Temporary failure in name resolution
...

@mkllnk
Copy link
Member

mkllnk commented Oct 22, 2019

It looks like the hostname s3.amazonaws.com cannot be resolved. It's probably that an Amazon name server is down.

@mkllnk
Copy link
Member

mkllnk commented Oct 22, 2019

According to https://status.aws.amazon.com/, Amazon is aware of this issue and working on it. All OFN instances using Amazon are affected, UK, France, Aus, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants