Closed dickyangyi closed 3 years ago
Can you elaborate on your question? The Docker image is available as well as the source code.
2021/2/2 下午5:15:51|> MIGRATE_AND_SEED
2021/2/2 下午5:15:51|> Starting dependencies...
2021/2/2 下午5:15:51|> Starting repos...
2021/2/2 下午5:15:5109:15:51.453 [info] Already up
2021/2/2 下午5:15:51|> Running seed script...
2021/2/2 下午5:15:5109:15:51.476 [debug] QUERY OK source="roles" db=0.5ms queue=2.4ms idle=37.0ms
2021/2/2 下午5:15:51SELECT r0.id
, r0.name
, r0.inserted_at
, r0.updated_at
FROM roles
AS r0 WHERE (r0.name
= ?) ["superuser"]
2021/2/2 下午5:15:51|> Success!
2021/2/2 下午5:15:5109:15:51.477 [debug] QUERY OK source="roles" db=0.9ms idle=23.5ms
2021/2/2 下午5:15:51SELECT r0.id
, r0.name
, r0.inserted_at
, r0.updated_at
FROM roles
AS r0 WHERE (r0.name
= ?) ["admin"]
2021/2/2 下午5:15:5709:15:57.640 [info] [swarm on production@2fb503eb4dfc] [tracker:init] started
2021/2/2 下午5:15:5709:15:57.654 [info] Running MailgunLoggerWeb.Endpoint with cowboy 2.8.0 at 0.0.0.0:5050 (http)
2021/2/2 下午5:15:5709:15:57.655 [info] Access MailgunLoggerWeb.Endpoint at http://localhost
2021/2/2 下午5:15:5709:15:57.655 [debug] [:production@2fb503eb4dfc][Elixir.Quantum.JobBroadcaster] Loading Initial Jobs from Config
2021/2/2 下午5:15:5709:15:57.656 [debug] [:production@2fb503eb4dfc][Elixir.Quantum.ExecutionBroadcaster] Unknown last execution time, using now
2021/2/2 下午5:15:5709:15:57.656 [debug] [:production@2fb503eb4dfc][Elixir.Quantum.ExecutionBroadcaster] Adding job #Reference<0.2507471194.221773828.253597>
2021/2/2 下午5:15:5709:15:57.656 [debug] [:production@2fb503eb4dfc][Elixir.Quantum.ExecutionBroadcaster] Adding job #Reference<0.2507471194.221773828.253606>
2021/2/2 下午5:15:5709:15:57.656 [debug] [:production@2fb503eb4dfc][Elixir.Quantum.ExecutionBroadcaster] Continuing Execution Broadcasting at -576443703516 (2021-02-02T14:00:00)
2021/2/2 下午5:15:5809:15:58.998 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:15:58 Parameters: %{}
2021/2/2 下午5:15:58 Pipelines: [:ping]
2021/2/2 下午5:15:5909:15:58.999 [debug] QUERY OK db=0.3ms queue=0.6ms idle=1345.4ms
2021/2/2 下午5:15:59SELECT 1 []
2021/2/2 下午5:16:0209:16:02.090 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:02 Parameters: %{}
2021/2/2 下午5:16:02 Pipelines: [:ping]
2021/2/2 下午5:16:0209:16:02.091 [debug] QUERY OK db=0.2ms queue=0.5ms idle=1441.5ms
2021/2/2 下午5:16:02SELECT 1 []
2021/2/2 下午5:16:0209:16:02.641 [info] [swarm on production@2fb503eb4dfc] [tracker:cluster_wait] joining cluster..
2021/2/2 下午5:16:0209:16:02.641 [info] [swarm on production@2fb503eb4dfc] [tracker:cluster_wait] no connected nodes, proceeding without sync
2021/2/2 下午5:16:0509:16:05.181 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:05 Parameters: %{}
2021/2/2 下午5:16:05 Pipelines: [:ping]
2021/2/2 下午5:16:0509:16:05.182 [debug] QUERY OK db=0.2ms queue=0.5ms idle=1532.6ms
2021/2/2 下午5:16:05SELECT 1 []
2021/2/2 下午5:16:0809:16:08.273 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:08 Parameters: %{}
2021/2/2 下午5:16:08 Pipelines: [:ping]
2021/2/2 下午5:16:0809:16:08.274 [debug] QUERY OK db=0.2ms queue=0.4ms idle=1624.6ms
2021/2/2 下午5:16:08SELECT 1 []
2021/2/2 下午5:16:1109:16:11.366 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:11 Parameters: %{}
2021/2/2 下午5:16:11 Pipelines: [:ping]
2021/2/2 下午5:16:1109:16:11.367 [debug] QUERY OK db=0.3ms queue=0.5ms idle=1717.8ms
2021/2/2 下午5:16:11SELECT 1 []
2021/2/2 下午5:16:1409:16:14.455 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:14 Parameters: %{}
2021/2/2 下午5:16:14 Pipelines: [:ping]
2021/2/2 下午5:16:1409:16:14.456 [debug] QUERY OK db=0.2ms queue=0.5ms idle=1806.8ms
2021/2/2 下午5:16:14SELECT 1 []
2021/2/2 下午5:16:1409:16:14.635 [debug] Processing with MailgunLoggerWeb.PageController.index/2
2021/2/2 下午5:16:14 Parameters: %{}
2021/2/2 下午5:16:14 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:1409:16:14.635 [info] GET /
2021/2/2 下午5:16:1409:16:14.637 [debug] QUERY OK source="users" db=0.5ms queue=0.6ms idle=987.0ms
2021/2/2 下午5:16:14SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:1409:16:14.637 [info] Sent 302 in 1ms
2021/2/2 下午5:16:1409:16:14.638 [error] #PID<0.3393.0> running MailgunLoggerWeb.Endpoint (connection #PID<0.3391.0>, stream id 1) terminated
2021/2/2 下午5:16:14Server: 10.30.0.30:5050 (http)
2021/2/2 下午5:16:14Request: GET /
2021/2/2 下午5:16:14 (exit) an exception was raised:
2021/2/2 下午5:16:14 (Plug.Conn.AlreadySentError) the response was already sent
2021/2/2 下午5:16:14 (phoenix 1.4.17) lib/phoenix/controller.ex:525: Phoenix.Controller.put_new_layout/2
2021/2/2 下午5:16:14 (mailgun_logger 0.0.5) lib/mailgun_logger_web/controllers/page_controller.ex:1: MailgunLoggerWeb.PageController.phoenix_controller_pipeline/2
2021/2/2 下午5:16:14 (phoenix 1.4.17) lib/phoenix/router.ex:288: Phoenix.Router.call/2
2021/2/2 下午5:16:14 (mailgun_logger 0.0.5) lib/plug/error_handler.ex:65: MailgunLoggerWeb.Router.call/2
2021/2/2 下午5:16:14 (mailgun_logger 0.0.5) lib/mailgun_logger_web/endpoint.ex:1: MailgunLoggerWeb.Endpoint.plug_builder_call/2
2021/2/2 下午5:16:14 (mailgun_logger 0.0.5) lib/plug/debugger.ex:132: MailgunLoggerWeb.Endpoint."call (overridable 3)"/2
2021/2/2 下午5:16:14 (mailgun_logger 0.0.5) lib/mailgun_logger_web/endpoint.ex:1: MailgunLoggerWeb.Endpoint.call/2
2021/2/2 下午5:16:14 (phoenix 1.4.17) lib/phoenix/endpoint/cowboy2_handler.ex:42: Phoenix.Endpoint.Cowboy2Handler.init/4
2021/2/2 下午5:16:1409:16:14.643 [debug] Processing with MailgunLoggerWeb.AuthController.new/2
2021/2/2 下午5:16:14 Parameters: %{}
2021/2/2 下午5:16:14 Pipelines: [:browser]
2021/2/2 下午5:16:1409:16:14.643 [info] GET /login
2021/2/2 下午5:16:1409:16:14.644 [info] Sent 200 in 528µs
2021/2/2 下午5:16:1709:16:17.514 [debug] Processing with MailgunLoggerWeb.AuthController.create/2
2021/2/2 下午5:16:17 Parameters: %{"_csrf_token" => "MiYzGAUwPyESKS0KRxp-BAUKfSs8FxQIpKTLmEQFsAbf5T6r386oMslO", "user" => %{"email" => "mailgun@sunvalley.com.cn", "password" => "[FILTERED]"}}
2021/2/2 下午5:16:17 Pipelines: [:browser]
2021/2/2 下午5:16:1709:16:17.514 [info] POST /login
2021/2/2 下午5:16:1709:16:17.516 [debug] QUERY OK source="users" db=0.7ms queue=0.7ms idle=1865.9ms
2021/2/2 下午5:16:17SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.email
= ?) ["mailgun@sunvalley.com.cn"]
2021/2/2 下午5:16:17PRE ARGON
2021/2/2 下午5:16:17%MailgunLogger.User{
2021/2/2 下午5:16:17 meta: #Ecto.Schema.Metadata<:loaded, "users">,
2021/2/2 下午5:16:17 email: "mailgun@sunvalley.com.cn",
2021/2/2 下午5:16:17 encrypted_password: "$argon2id$v=19$m=131072,t=8,p=4$pQRmw1c+FQdk9cE5bHiyMA$Yxr2FSxKNj4s6YdgDe1jIgyFbHWGnaIlseLc05vZ7N4",
2021/2/2 下午5:16:17 firstname: "",
2021/2/2 下午5:16:17 id: 1,
2021/2/2 下午5:16:17 inserted_at: ~N[2021-02-01 06:02:59],
2021/2/2 下午5:16:17 lastname: "",
2021/2/2 下午5:16:17 password: nil,
2021/2/2 下午5:16:17 reset_token: nil,
2021/2/2 下午5:16:17 roles: [
2021/2/2 下午5:16:17 %MailgunLogger.Role{
2021/2/2 下午5:16:17 meta: #Ecto.Schema.Metadata<:loaded, "roles">,
2021/2/2 下午5:16:17 id: 2,
2021/2/2 下午5:16:17 inserted_at: ~N[2021-02-01 06:01:53],
2021/2/2 下午5:16:17 name: "admin",
2021/2/2 下午5:16:17 updated_at: ~N[2021-02-01 06:01:53],
2021/2/2 下午5:16:17 users: #Ecto.Association.NotLoadedid
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:1809:16:18.012 [debug] QUERY OK source="users" db=0.6ms queue=0.6ms idle=461.9ms
2021/2/2 下午5:16:18SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:1809:16:18.013 [debug] QUERY OK source="events" db=0.4ms queue=0.5ms idle=363.1ms
2021/2/2 下午5:16:18SELECT count(e0.id
) FROM events
AS e0 []
2021/2/2 下午5:16:1809:16:18.015 [debug] QUERY OK source="accounts" db=0.3ms queue=0.4ms idle=364.3ms
2021/2/2 下午5:16:18SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 []
2021/2/2 下午5:16:1809:16:18.015 [info] Sent 200 in 6ms
2021/2/2 下午5:16:2009:16:20.655 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:20 Parameters: %{}
2021/2/2 下午5:16:20 Pipelines: [:ping]
2021/2/2 下午5:16:2009:16:20.656 [debug] QUERY OK db=0.3ms queue=0.6ms idle=1006.8ms
2021/2/2 下午5:16:20SELECT 1 []
2021/2/2 下午5:16:2109:16:21.046 [debug] Processing with MailgunLoggerWeb.EventController.index/2
2021/2/2 下午5:16:21 Parameters: %{}
2021/2/2 下午5:16:21 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:2109:16:21.046 [info] GET /events
2021/2/2 下午5:16:2109:16:21.048 [debug] QUERY OK source="users" db=1.1ms idle=1397.8ms
2021/2/2 下午5:16:21SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:2109:16:21.049 [debug] QUERY OK source="users" db=1.3ms idle=1399.4ms
2021/2/2 下午5:16:21SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:2109:16:21.051 [debug] QUERY OK source="events" db=0.3ms queue=0.3ms idle=1401.2ms
2021/2/2 下午5:16:21SELECT e0.id
FROM events
AS e0 INNER JOIN accounts
AS a1 ON a1.id
= e0.account_id
ORDER BY e0.id
DESC LIMIT 1 []
2021/2/2 下午5:16:2109:16:21.051 [info] Sent 200 in 4ms
2021/2/2 下午5:16:2309:16:23.377 [debug] Processing with MailgunLoggerWeb.AccountController.index/2
2021/2/2 下午5:16:23 Parameters: %{}
2021/2/2 下午5:16:23 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:2309:16:23.377 [info] GET /accounts
2021/2/2 下午5:16:2309:16:23.378 [debug] QUERY OK source="users" db=0.7ms idle=1728.8ms
2021/2/2 下午5:16:23SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:2309:16:23.380 [debug] QUERY OK source="users" db=1.4ms idle=1729.9ms
2021/2/2 下午5:16:23SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:2309:16:23.381 [debug] QUERY OK source="accounts" db=0.6ms idle=1731.7ms
2021/2/2 下午5:16:23SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 []
2021/2/2 下午5:16:2309:16:23.381 [info] Sent 200 in 4ms
2021/2/2 下午5:16:2309:16:23.747 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:23 Parameters: %{}
2021/2/2 下午5:16:23 Pipelines: [:ping]
2021/2/2 下午5:16:2309:16:23.749 [debug] QUERY OK db=0.3ms queue=0.5ms idle=1099.1ms
2021/2/2 下午5:16:23SELECT 1 []
2021/2/2 下午5:16:2609:16:26.837 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:26 Parameters: %{}
2021/2/2 下午5:16:26 Pipelines: [:ping]
2021/2/2 下午5:16:2609:16:26.838 [debug] QUERY OK db=0.3ms queue=0.4ms idle=1189.0ms
2021/2/2 下午5:16:26SELECT 1 []
2021/2/2 下午5:16:2809:16:28.214 [debug] Processing with MailgunLoggerWeb.AccountController.edit/2
2021/2/2 下午5:16:28 Parameters: %{"id" => "1"}
2021/2/2 下午5:16:28 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:2809:16:28.214 [info] GET /accounts/1/edit
2021/2/2 下午5:16:2809:16:28.215 [debug] QUERY OK source="users" db=0.9ms idle=1565.8ms
2021/2/2 下午5:16:28SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:2809:16:28.217 [debug] QUERY OK source="users" db=1.3ms idle=1567.0ms
2021/2/2 下午5:16:28SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:2809:16:28.218 [debug] QUERY OK source="accounts" db=0.5ms queue=0.4ms idle=1568.8ms
2021/2/2 下午5:16:28SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 WHERE (a0.id
= ?) [1]
2021/2/2 下午5:16:2809:16:28.219 [info] Sent 200 in 4ms
2021/2/2 下午5:16:2909:16:29.927 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:29 Parameters: %{}
2021/2/2 下午5:16:29 Pipelines: [:ping]
2021/2/2 下午5:16:2909:16:29.928 [debug] QUERY OK db=0.3ms queue=0.5ms idle=1279.0ms
2021/2/2 下午5:16:29SELECT 1 []
2021/2/2 下午5:16:3209:16:32.914 [debug] Processing with MailgunLoggerWeb.PageController.index/2
2021/2/2 下午5:16:32 Parameters: %{}
2021/2/2 下午5:16:32 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:3209:16:32.914 [info] GET /
2021/2/2 下午5:16:3209:16:32.915 [debug] QUERY OK source="users" db=0.7ms queue=0.1ms idle=1265.6ms
2021/2/2 下午5:16:32SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:3209:16:32.917 [debug] QUERY OK source="users" db=1.3ms idle=1266.8ms
2021/2/2 下午5:16:32SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:3209:16:32.918 [debug] QUERY OK source="events" db=0.9ms idle=1268.5ms
2021/2/2 下午5:16:32SELECT count(e0.id
) FROM events
AS e0 []
2021/2/2 下午5:16:3209:16:32.919 [debug] QUERY OK source="accounts" db=0.7ms idle=1269.6ms
2021/2/2 下午5:16:32SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 []
2021/2/2 下午5:16:3209:16:32.919 [info] Sent 200 in 5ms
2021/2/2 下午5:16:3309:16:33.019 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:33 Parameters: %{}
2021/2/2 下午5:16:33 Pipelines: [:ping]
2021/2/2 下午5:16:3309:16:33.020 [debug] QUERY OK db=0.3ms queue=0.5ms idle=1370.6ms
2021/2/2 下午5:16:33SELECT 1 []
2021/2/2 下午5:16:3409:16:34.865 [debug] Processing with MailgunLoggerWeb.AccountController.index/2
2021/2/2 下午5:16:34 Parameters: %{}
2021/2/2 下午5:16:34 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:3409:16:34.865 [info] GET /accounts
2021/2/2 下午5:16:3409:16:34.866 [debug] QUERY OK source="users" db=0.7ms queue=0.1ms idle=1216.6ms
2021/2/2 下午5:16:34SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:3409:16:34.868 [debug] QUERY OK source="users" db=1.3ms idle=1217.7ms
2021/2/2 下午5:16:34SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:3409:16:34.869 [debug] QUERY OK source="accounts" db=0.6ms idle=219.4ms
2021/2/2 下午5:16:34SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 []
2021/2/2 下午5:16:3409:16:34.869 [info] Sent 200 in 3ms
2021/2/2 下午5:16:3609:16:36.114 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:36 Parameters: %{}
2021/2/2 下午5:16:36 Pipelines: [:ping]
2021/2/2 下午5:16:3609:16:36.116 [debug] QUERY OK db=0.3ms queue=0.5ms idle=1466.1ms
2021/2/2 下午5:16:36SELECT 1 []
2021/2/2 下午5:16:3909:16:39.206 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:39 Parameters: %{}
2021/2/2 下午5:16:39 Pipelines: [:ping]
2021/2/2 下午5:16:3909:16:39.207 [debug] QUERY OK db=0.2ms queue=0.5ms idle=1557.4ms
2021/2/2 下午5:16:39SELECT 1 []
2021/2/2 下午5:16:4209:16:42.296 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:42 Parameters: %{}
2021/2/2 下午5:16:42 Pipelines: [:ping]
2021/2/2 下午5:16:4209:16:42.297 [debug] QUERY OK db=0.2ms queue=0.5ms idle=1647.5ms
2021/2/2 下午5:16:42SELECT 1 []
2021/2/2 下午5:16:4509:16:45.386 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:45 Parameters: %{}
2021/2/2 下午5:16:45 Pipelines: [:ping]
2021/2/2 下午5:16:4509:16:45.387 [debug] QUERY OK db=0.2ms queue=0.4ms idle=1737.3ms
2021/2/2 下午5:16:45SELECT 1 []
2021/2/2 下午5:16:4809:16:48.474 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:48 Parameters: %{}
2021/2/2 下午5:16:48 Pipelines: [:ping]
2021/2/2 下午5:16:4809:16:48.475 [debug] QUERY OK db=0.3ms queue=0.5ms idle=1825.4ms
2021/2/2 下午5:16:48SELECT 1 []
2021/2/2 下午5:16:5109:16:51.216 [debug] Processing with MailgunLoggerWeb.PageController.index/2
2021/2/2 下午5:16:51 Parameters: %{}
2021/2/2 下午5:16:51 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:5109:16:51.216 [info] GET /
2021/2/2 下午5:16:5109:16:51.218 [debug] QUERY OK source="users" db=1.1ms idle=1568.1ms
2021/2/2 下午5:16:51SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:5109:16:51.219 [debug] QUERY OK source="users" db=0.6ms idle=569.6ms
2021/2/2 下午5:16:51SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:5109:16:51.220 [debug] QUERY OK source="events" db=0.4ms idle=570.5ms
2021/2/2 下午5:16:51SELECT count(e0.id
) FROM events
AS e0 []
2021/2/2 下午5:16:5109:16:51.221 [debug] QUERY OK source="accounts" db=0.7ms idle=571.1ms
2021/2/2 下午5:16:51SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 []
2021/2/2 下午5:16:5109:16:51.221 [info] Sent 200 in 4ms
2021/2/2 下午5:16:5109:16:51.564 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:51 Parameters: %{}
2021/2/2 下午5:16:51 Pipelines: [:ping]
2021/2/2 下午5:16:5109:16:51.565 [debug] QUERY OK db=0.2ms queue=0.5ms idle=915.6ms
2021/2/2 下午5:16:51SELECT 1 []
2021/2/2 下午5:16:5209:16:52.122 [debug] Processing with MailgunLoggerWeb.PageController.trigger_run/2
2021/2/2 下午5:16:52 Parameters: %{"_csrf_token" => "KzU0EwYzKCAWEAkHRAspF2d0IAgJDjwRiXSGnFFGwxFk6EaaQFkLxjDV", "_method" => "POST"}
2021/2/2 下午5:16:52 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:5209:16:52.122 [info] POST /trigger_run
2021/2/2 下午5:16:5209:16:52.123 [debug] QUERY OK source="users" db=0.6ms idle=1473.6ms
2021/2/2 下午5:16:52SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:5209:16:52.124 [debug] QUERY OK source="users" db=0.6ms idle=1474.7ms
2021/2/2 下午5:16:52SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:5209:16:52.124 [info] Sent 302 in 2ms
2021/2/2 下午5:16:5209:16:52.126 [debug] QUERY OK source="accounts" db=0.4ms queue=0.5ms idle=1476.1ms
2021/2/2 下午5:16:52SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 WHERE (a0.is_active
= TRUE) []
2021/2/2 下午5:16:5209:16:52.126 [debug] get - https://api:APIKEY@api.eu.mailgun.net/v3/vavacam.com/events?begin=1612171012&end=1612257412
2021/2/2 下午5:16:5209:16:52.128 [debug] Processing with MailgunLoggerWeb.PageController.index/2
2021/2/2 下午5:16:52 Parameters: %{}
2021/2/2 下午5:16:52 Pipelines: [:browser, :auth]
2021/2/2 下午5:16:5209:16:52.128 [info] GET /
2021/2/2 下午5:16:5209:16:52.129 [debug] QUERY OK source="users" db=0.8ms idle=1479.7ms
2021/2/2 下午5:16:52SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
FROM users
AS u0 []
2021/2/2 下午5:16:5209:16:52.130 [debug] QUERY OK source="users" db=0.7ms idle=1480.7ms
2021/2/2 下午5:16:52SELECT u0.id
, u0.email
, u0.firstname
, u0.lastname
, u0.token
, u0.encrypted_password
, u0.reset_token
, u0.inserted_at
, u0.updated_at
, r1.id
, r1.name
, r1.inserted_at
, r1.updated_at
FROM users
AS u0 LEFT OUTER JOIN roles_users
AS r2 ON r2.user_id
= u0.id
LEFT OUTER JOIN roles
AS r1 ON r2.role_id
= r1.id
WHERE (u0.id
= ?) [1]
2021/2/2 下午5:16:5209:16:52.131 [debug] QUERY OK source="events" db=0.7ms idle=912.6ms
2021/2/2 下午5:16:52SELECT count(e0.id
) FROM events
AS e0 []
2021/2/2 下午5:16:5209:16:52.132 [debug] QUERY OK source="accounts" db=0.3ms idle=912.5ms
2021/2/2 下午5:16:52SELECT a0.id
, a0.api_key
, a0.domain
, a0.is_active
, a0.is_eu
, a0.inserted_at
, a0.updated_at
FROM accounts
AS a0 []
2021/2/2 下午5:16:5209:16:52.132 [info] Sent 200 in 3ms
2021/2/2 下午5:16:5309:16:53.139 [error] Task #PID<0.3433.0> started from #PID<0.3432.0> terminating
2021/2/2 下午5:16:53** (Protocol.UndefinedError) protocol Enumerable not implemented for {:error, 401, "{\"message\":\"Unknown domain\"}"} of type Tuple. This protocol is implemented for the following type(s): Pager.Page, Ecto.Adapters.SQL.Stream, DBConnection.PrepareStream, DBConnection.Stream, HashSet, Date.Range, Map, Stream, Range, List, GenEvent.Stream, MapSet, HashDict, IO.Stream, Function, File.Stream
2021/2/2 下午5:16:53 (elixir 1.10.4) lib/enum.ex:1: Enumerable.impl_for!/1
2021/2/2 下午5:16:53 (elixir 1.10.4) lib/enum.ex:141: Enumerable.reduce/3
2021/2/2 下午5:16:53 (elixir 1.10.4) lib/enum.ex:3383: Enum.map/2
2021/2/2 下午5:16:53 (mailgun_logger 0.0.5) lib/mailgun_logger/events/events.ex:77: MailgunLogger.Events.save_events/2
2021/2/2 下午5:16:53 (elixir 1.10.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
2021/2/2 下午5:16:53 (elixir 1.10.4) lib/task/supervised.ex:35: Task.Supervised.reply/5
2021/2/2 下午5:16:53 (stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
2021/2/2 下午5:16:53Function: #Function<2.33026069/0 in MailgunLogger.run/0>
2021/2/2 下午5:16:53 Args: []
2021/2/2 下午5:16:5409:16:54.654 [debug] Processing with MailgunLoggerWeb.PingController.ping/2
2021/2/2 下午5:16:54 Parameters: %{}
2021/2/2 下午5:16:54 Pipelines: [:ping]
2021/2/2 下午5:16:5409:16:54.655 [debug] QUERY OK db=0.2ms queue=0.4ms idle=1006.0ms
@dickyangyi I spot this:
https://api:APIKEY@api.eu.mailgun.net/v3/vavacam.com/events?begin=1612171012&end=1612257412
I am guessing that is not a valid API key :) Also: can you wrap you log output into backticks so it becomes a code block. Just three backticks, newline, paste, three backticks.
For your quick reply, this API key is hidden for security. Look at my screenshot
@dickyangyi From what I can see from your logs, the error message from Mailgun is {"message":"Unknown domain"}
.
Thank you. It's not the domain name. It's the domain name I Is eu when I configure it
Thank you for your work, very good, solved my problem of grasping the log, hope to be able to further one account multiple domain names, look forward to your update
Well you can just add multiple accounts if you want and reuse the API key? That's how we use it.
If you have multiple domains, add them on seperate accounts.
Thanks for using the logger!
Sorry, another question, because I see mailgun have a new log, but the local log platform is not updated, regularly grab the log, or need to trigger new run? each time
If you have multiple domains, add them on seperate accounts.
There is only one API KEY I have multiple domain names in the same account, and when I add it, the tip is: If you have multiple domains,add them on seperate accounts. if there are only more docker? in this case
Sorry, another question, because I see mailgun have a new log, but the local log platform is not updated, regularly grab the log, or need to trigger new run? each time
The application will grab the logs twice a day and you can also trigger a new run from the dashboard. If you want to increase the automated runs, you can configure the Quantum (= the scheduler) jobs in the config. See config/prod.exs
:
# Quantum cron schedule
config :mailgun_logger, MailgunLogger.Scheduler,
jobs: [
{"0 7 * * *", {MailgunLogger, :run, []}},
{"0 14 * * *", {MailgunLogger, :run, []}}
]
As far as your domain question is concerned, the 'accounts' referred to are the once in the MailgunLogger application. The can all share the same API key, but the domain has to be different.
Thank you for your reply, but I API KEY only one, I have multiple domain names in my mailgun, I have added different domain names, the same API KEY tips can not be used, as shown in the picture
Mailgun Logger v0.0.5
@dickyangyi ok, I will look into it, sounds like a bug. Thanks for the info, I will probably have some time tonight (it's 14:00 over here, we are in Europe/Amsterdam TZ :) )
Thank you and look forward to your update
@dickyangyi I just pushed 0.1.0 that includes the fix. The unique constraint on the database was invalid. You should be able to update with no problem. In case you do encounter an issue, you might have to add the index yourself. Check the changelog for a bit more info.
Is this software not available at present?