Hi! I just discovered that new users signing up don't receive any
confirmation email, anyone know about this issue?
Gitlab tries to send the email, as can be seen in the logs below, but at
the first attempt it always fails because the new user is not found. If the
new user requests a new confirmation email it is sent promptly. Further
investigation leads me to believe that sidekiq is querying too quickly for
the new user, before the data was committed. In other words, a race
condition occurs. In that case it can probably be corrected by waiting for
the commit to finish or just add a short delay.
Gitlab CE version: 8.5.4
I upgraded my docker-based Gitlab to 8.5.4 and so far everything else seems
to be working well. Emails are sent via SMTP (no issue). I was using Mysql
but I successfully migrated to Postgresql (9.4-13) some days ago. I don't
know if this issue existed before changing to pgsql, it may have escaped
notice until now.
production.log:
1.
Started GET "/users/sign_in" for x.x.x.x at 2016-03-07 22:15:36 +0100
2.
Processing by SessionsController#new as HTML
3.
Completed 200 OK in 56ms (Views: 18.5ms | ActiveRecord: 1.9ms)
4.
Started POST "/users" for x.x.x.x at 2016-03-07 22:52:33 +0100
5.
Processing by RegistrationsController#create as HTML
6.
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]",
"user"=>{"name"=>"another test", "username"=>"anotherguy",
"email"=>"[email protected]", "password"=>"[FILTERED]"}}
7.
[ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID:
f3fb8b00-42ce-41f2-91d7-3df64ddbd7b8) to Sidekiq(mailers) with arguments:
"DeviseMailer", "confirmation_instructions", "deliver_now",
gid://gitlab/User/12, "cTTrQQzkyf-MhEDNKKry", {}
8.
Redirected to https://example.com/users/sign_in
9.
Completed 302 Found in 320ms (ActiveRecord: 45.1ms)
sidekiq.log:
1.
2016-03-07T21:52:33.527Z 483 TID-ssyw8 ActionMailer::DeliveryJob
JID-f1f632e9b90e2d7f3727efdb INFO: start
2.
2016-03-07T21:52:33.531Z 483 TID-ssyw8 ActionMailer::DeliveryJob
JID-f1f632e9b90e2d7f3727efdb INFO: fail: 0.004 sec
3.
2016-03-07T21:52:33.531Z 483 TID-ssyw8 WARN:
{"class"=>"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper",
"wrapped"=>"ActionMailer::DeliveryJob", "queue"=>"mailers",
"args"=>[{"job_class"=>"ActionMailer::DeliveryJob",
"job_id"=>"f3fb8b00-42ce-41f2-91d7-3df64ddbd7b8", "queue_name"=>"mailers",
"arguments"=>["DeviseMailer", "confirmation_instructions", "deliver_now",
{"_aj_globalid"=>"gid://gitlab/User/12"}, "cTTrQQzkyf-MhEDNKKry",
{"_aj_symbol_keys"=>[]}], "locale"=>"en"}], "retry"=>true,
"jid"=>"f1f632e9b90e2d7f3727efdb", "created_at"=>1457387553.5269978,
"enqueued_at"=>1457387553.5270429, "error_message"=>"Error while trying to
deserialize arguments: Couldn't find User with 'id'=12",
"error_class"=>"ActiveJob::DeserializationError",
"failed_at"=>1457387553.5314207, "retry_count"=>0}
4.
2016-03-07T21:52:33.531Z 483 TID-ssyw8 WARN:
ActiveJob::DeserializationError: Error while trying to deserialize
arguments: Couldn't find User with 'id'=12
5.
2016-03-07T21:52:33.531Z 483 TID-ssyw8 WARN:
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.5.2/lib/active_record/relation/finder_methods.rb:324:in
`raise_record_not_found_exception!'
... manually requesting a confirmation email works:
1.
2016-03-07T21:53:19.090Z 483 TID-bd97k ActionMailer::DeliveryJob
JID-f1f632e9b90e2d7f3727efdb INFO: start
2.
2016-03-07T21:53:19.279Z 483 TID-bd97k ActionMailer::DeliveryJob
JID-f1f632e9b90e2d7f3727efdb INFO: done: 0.189 sec
BR /Dan
--
You received this message because you are subscribed to the Google Groups
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/gitlabhq/0fd79d5f-34f1-42bb-a3e1-591183a85547%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.