esl / MongoosePush

MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS.
Apache License 2.0
108 stars 24 forks source link

MongoosePush crashes at startup #194

Closed masterhydra closed 4 years ago

masterhydra commented 4 years ago

### I have a issue which is very similar to #193 and #131

MongoosePush 2.1.0, local build

I have error while running mongooseim/mongoose-push:latest and after local build image crashes at startup.

Update: is the token.p8 files mandatory?

Please advise.

Thank you.

Docker Version

Docker version 19.03.13

Build

git clone https://github.com/esl/MongoosePush.git cd MongoosePush docker build . -t mpush:latest

Start

docker run -v /usr/lib/mongooseim/priv:/opt/app/priv \ --name MONGOOSEPUSH \ -p 8443:8443 \ -e MIX_ENV="dev" \ -e PUSH_HTTPS_BIND_ADDR="127.0.0.1" \ -e PUSH_HTTPS_PORT="8443" \ -e PUSH_HTTPS_CERTFILE="/opt/app/priv/ssl/rest_cert.pem" \ -e PUSH_HTTPS_KEYFILE="/opt/app/priv/ssl/rest_key.pem" \ -e PUSH_FCM_ENABLED="false" \ -e PUSH_APNS_ENABLED="true" \ -e PUSH_APNS_DEV_USE_2197="true" \ -e PUSH_APNS_DEV_CERT="/opt/app/priv/apns/dev_cert.pem" \ -e PUSH_APNS_DEV_KEY="/opt/app/priv/apns/dev_key.pem" \ -e PUSH_APNS_DEV_POOL_SIZE="5" \ -e PUSH_LOGLEVEL="debug" \ -e PUSH_LOGFORMAT="logfmt" \ -it --rm mpush:latest

Error log

when=2020-09-10T09:15:33.324 severity=info what=init text="Starting PoolsWarden" at=Elixir.Sparrow.PoolsWarden.init/1:95 pid=#PID<0.1802.0> result=success worker=pools_warden file=lib/sparrow/pools_warden.ex application=sparrow {"application":"mongoose_push","at":"Elixir.MongoosePush.Application.check_runtime_configuration_status/0:188","file":"lib/mongoose_push/application.ex","path":"var/config.toml","pid":"#PID<0.1856.0>","reason":"enoent","severity":"info","status":"skipped","text":"Skipping TOML configuration due to file not present","what":"toml_configuration","when":"2020-09-10T09:15:33.327"} {"application":"mongoose_push","at":"Elixir.MongoosePush.Service.APNS.Supervisor.convert_token_pool_to_sparrow/2:150","file":"lib/mongoose_push/service/apns/supervisor.ex","mode":"dev","p8_file":"/opt/app/lib/mongoose_push-2.1.0/priv/apns/token.p8","pid":"#PID<0.1860.0>","reason":"bad_auth","result":"error","severity":"error","text":"Required configuration missing","what":"configuration","when":"2020-09-10T09:15:33.328"} {"application":"mongoose_push","at":"Elixir.MongoosePush.Service.APNS.Supervisor.convert_token_pool_to_sparrow/2:150","file":"lib/mongoose_push/service/apns/supervisor.ex","mode":"prod","p8_file":"/opt/app/lib/mongoose_push-2.1.0/priv/apns/token.p8","pid":"#PID<0.1860.0>","reason":"bad_auth","result":"error","severity":"error","text":"Required configuration missing","what":"configuration","when":"2020-09-10T09:15:33.328"} {"at":"application_controller.info_exited/3:1938","file":"application_controller.erl","pid":"#PID<0.1641.0>","severity":"info","text":"Application mongoose_push exited: MongoosePush.Application.start(:normal, []) returned an error: shutdown: failed to start child: :apns_supervisor\n ** (EXIT) MongoosePush.Service.APNS.Supervisor.init/1 returned a bad value: {:stop, :bad_auth}","what":"","when":"2020-09-10T09:15:33.328"} =SUPERVISOR REPORT==== 10-Sep-2020::09:15:33.335349 === supervisor: {local,gr_counter_sup} errorContext: child_terminated reason: killed offender: [{pid,<0.1723.0>}, {id,gr_lager_default_tracer_counters}, {mfargs,{gr_counter,start_link, [gr_lager_default_tracer_counters]}}, {restart_type,transient}, {shutdown,brutal_kill}, {child_type,worker}] =SUPERVISOR REPORT==== 10-Sep-2020::09:15:33.335530 === supervisor: {local,gr_param_sup} errorContext: child_terminated reason: killed offender: [{pid,<0.1722.0>}, {id,gr_lager_default_tracer_params}, {mfargs,{gr_param,start_link,[gr_lager_default_tracer_params]}}, {restart_type,transient}, {shutdown,brutal_kill}, {child_type,worker}] {"Kernel pid terminated",application_controller,"{application_start_failure,mongoose_push,{{shutdown,{failed_to_start_child,apns_supervisor,{bad_return,{'Elixir.MongoosePush.Service.APNS.Supervisor',init,{stop,bad_auth}}}}},{'Elixir.MongoosePush.Application',start,[normal,[]]}}}"} Kernel pid terminated (application_controller) ({application_start_failure,mongoose_push,{{shutdown,{failed_to_start_child,apns_supervisor,{bad_return,{'Elixir.MongoosePush.Service.APNS.Supervisor',in

Crash dump is being written to: erl_crash.dump...done

Build warnings

Compiling rebar3_codecov _build/default/plugins/rebar3_codecov/src/temporary/t.erl:2: Warning: export_all flag enabled - all functions will be exported

_build/default/plugins/rebar3_codecov/src/rebar3_codecov_prv.erl:61: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace _build/default/plugins/rebar3_codecov/src/rebar3_codecov_prv.erl:82: Warning: variable 'Prefix' is unused _build/default/plugins/rebar3_codecov/src/rebar3_codecov_prv.erl:88: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace

Compiling 8 files (.ex) warning: function Poison.EncodeError.exception/1 is undefined (module Poison.EncodeError is not available) lib/jose/poison/lexical_encoder.ex:8

Generated jason app warning: String.strip/1 is deprecated. Use String.trim/1 instead /opt/app/deps/poison/mix.exs:4

==> poison Compiling 4 files (.ex) warning: Integer.to_char_list/2 is deprecated. Use Integer.to_charlist/2 instead lib/poison/encoder.ex:173

Compiling 1 file (.ex) warning: the GenEvent module is deprecated, see its documentation for alternatives lib/logger_lager_backend.ex:2: LoggerLagerBackend (module)

warning: GenEvent.using/1 is deprecated. Use one of the alternatives described in the documentation for the GenEvent module lib/logger_lager_backend.ex:2

Compiling 2 files (.ex) warning: function Mix.Releases.Release.get/1 is undefined (module Mix.Releases.Release is not available) lib/mix_docker.ex:193

Compiling 40 files (.ex) warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access STACKTRACE inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch lib/plug/conn/wrapper_error.ex:23

Compiling 67 files (.ex) warning: Plug.Crypto.safe_binary_to_term/1 is deprecated. Use non_executable_binary_to_term/2 lib/phoenix/token.ex:276

Compiling 56 files (.ex) warning: function :"APNS-Topics".decode/2 is undefined (module :"APNS-Topics" is not available) lib/mongoose_push/service/apns/certificate.ex:45

Get:2 http://deb.debian.org/debian stretch/main amd64 locales all 2.24-11+deb9u4 [3289 kB] debconf: delaying package configuration, since apt-utils is not installed

debconf: unable to initialize frontend: Dialog

debconf: unable to initialize frontend: Readline

update-alternatives: warning: skip creation of /usr/share/man/fr/man1/vi.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/vi.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/vi.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/vi.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/vi.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/vi.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/view.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/view.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/view.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/view.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/view.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/view.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/ex.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/ex.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/ex.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/ex.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/ex.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/ex.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/editor.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/editor.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/editor.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/editor.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/editor.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group editor) doesn't exist

masterhydra commented 4 years ago

### I have a issue which is very similar to #193 and #131

MongoosePush 2.1.0, local build

I have error while running mongooseim/mongoose-push:latest and after local build image crashes at startup.

Update: is the token.p8 files mandatory?

Please advise.

Thank you.

Docker Version

Docker version 19.03.13

Build

git clone https://github.com/esl/MongoosePush.git cd MongoosePush docker build . -t mpush:latest

Start

docker run -v /usr/lib/mongooseim/priv:/opt/app/priv \ --name MONGOOSEPUSH \ -p 8443:8443 \ -e MIX_ENV="dev" \ -e PUSH_HTTPS_BIND_ADDR="127.0.0.1" \ -e PUSH_HTTPS_PORT="8443" \ -e PUSH_HTTPS_CERTFILE="/opt/app/priv/ssl/rest_cert.pem" \ -e PUSH_HTTPS_KEYFILE="/opt/app/priv/ssl/rest_key.pem" \ -e PUSH_FCM_ENABLED="false" \ -e PUSH_APNS_ENABLED="true" \ -e PUSH_APNS_DEV_USE_2197="true" \ -e PUSH_APNS_DEV_CERT="/opt/app/priv/apns/dev_cert.pem" \ -e PUSH_APNS_DEV_KEY="/opt/app/priv/apns/dev_key.pem" \ -e PUSH_APNS_DEV_POOL_SIZE="5" \ -e PUSH_LOGLEVEL="debug" \ -e PUSH_LOGFORMAT="logfmt" \ -it --rm mpush:latest

Error log

when=2020-09-10T09:15:33.324 severity=info what=init text="Starting PoolsWarden" at=Elixir.Sparrow.PoolsWarden.init/1:95 pid=#PID<0.1802.0> result=success worker=pools_warden file=lib/sparrow/pools_warden.ex application=sparrow {"application":"mongoose_push","at":"Elixir.MongoosePush.Application.check_runtime_configuration_status/0:188","file":"lib/mongoose_push/application.ex","path":"var/config.toml","pid":"#PID<0.1856.0>","reason":"enoent","severity":"info","status":"skipped","text":"Skipping TOML configuration due to file not present","what":"toml_configuration","when":"2020-09-10T09:15:33.327"} {"application":"mongoose_push","at":"Elixir.MongoosePush.Service.APNS.Supervisor.convert_token_pool_to_sparrow/2:150","file":"lib/mongoose_push/service/apns/supervisor.ex","mode":"dev","p8_file":"/opt/app/lib/mongoose_push-2.1.0/priv/apns/token.p8","pid":"#PID<0.1860.0>","reason":"bad_auth","result":"error","severity":"error","text":"Required configuration missing","what":"configuration","when":"2020-09-10T09:15:33.328"} {"application":"mongoose_push","at":"Elixir.MongoosePush.Service.APNS.Supervisor.convert_token_pool_to_sparrow/2:150","file":"lib/mongoose_push/service/apns/supervisor.ex","mode":"prod","p8_file":"/opt/app/lib/mongoose_push-2.1.0/priv/apns/token.p8","pid":"#PID<0.1860.0>","reason":"bad_auth","result":"error","severity":"error","text":"Required configuration missing","what":"configuration","when":"2020-09-10T09:15:33.328"} {"at":"application_controller.info_exited/3:1938","file":"application_controller.erl","pid":"#PID<0.1641.0>","severity":"info","text":"Application mongoose_push exited: MongoosePush.Application.start(:normal, []) returned an error: shutdown: failed to start child: :apns_supervisor\n ** (EXIT) MongoosePush.Service.APNS.Supervisor.init/1 returned a bad value: {:stop, :bad_auth}","what":"","when":"2020-09-10T09:15:33.328"} =SUPERVISOR REPORT==== 10-Sep-2020::09:15:33.335349 === supervisor: {local,gr_counter_sup} errorContext: child_terminated reason: killed offender: [{pid,<0.1723.0>}, {id,gr_lager_default_tracer_counters}, {mfargs,{gr_counter,start_link, [gr_lager_default_tracer_counters]}}, {restart_type,transient}, {shutdown,brutal_kill}, {child_type,worker}] =SUPERVISOR REPORT==== 10-Sep-2020::09:15:33.335530 === supervisor: {local,gr_param_sup} errorContext: child_terminated reason: killed offender: [{pid,<0.1722.0>}, {id,gr_lager_default_tracer_params}, {mfargs,{gr_param,start_link,[gr_lager_default_tracer_params]}}, {restart_type,transient}, {shutdown,brutal_kill}, {child_type,worker}] {"Kernel pid terminated",application_controller,"{application_start_failure,mongoose_push,{{shutdown,{failed_to_start_child,apns_supervisor,{bad_return,{'Elixir.MongoosePush.Service.APNS.Supervisor',init,{stop,bad_auth}}}}},{'Elixir.MongoosePush.Application',start,[normal,[]]}}}"} Kernel pid terminated (application_controller) ({application_start_failure,mongoose_push,{{shutdown,{failed_to_start_child,apns_supervisor,{bad_return,{'Elixir.MongoosePush.Service.APNS.Supervisor',in

Crash dump is being written to: erl_crash.dump...done

Build warnings

Compiling rebar3_codecov _build/default/plugins/rebar3_codecov/src/temporary/t.erl:2: Warning: export_all flag enabled - all functions will be exported

_build/default/plugins/rebar3_codecov/src/rebar3_codecov_prv.erl:61: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace _build/default/plugins/rebar3_codecov/src/rebar3_codecov_prv.erl:82: Warning: variable 'Prefix' is unused _build/default/plugins/rebar3_codecov/src/rebar3_codecov_prv.erl:88: Warning: erlang:get_stacktrace/0: deprecated; use the new try/catch syntax for retrieving the stack backtrace

Compiling 8 files (.ex) warning: function Poison.EncodeError.exception/1 is undefined (module Poison.EncodeError is not available) lib/jose/poison/lexical_encoder.ex:8

Generated jason app warning: String.strip/1 is deprecated. Use String.trim/1 instead /opt/app/deps/poison/mix.exs:4

==> poison Compiling 4 files (.ex) warning: Integer.to_char_list/2 is deprecated. Use Integer.to_charlist/2 instead lib/poison/encoder.ex:173

Compiling 1 file (.ex) warning: the GenEvent module is deprecated, see its documentation for alternatives lib/logger_lager_backend.ex:2: LoggerLagerBackend (module)

warning: GenEvent.using/1 is deprecated. Use one of the alternatives described in the documentation for the GenEvent module lib/logger_lager_backend.ex:2

Compiling 2 files (.ex) warning: function Mix.Releases.Release.get/1 is undefined (module Mix.Releases.Release is not available) lib/mix_docker.ex:193

Compiling 40 files (.ex) warning: System.stacktrace/0 outside of rescue/catch clauses is deprecated. If you want to support only Elixir v1.7+, you must access STACKTRACE inside a rescue/catch. If you want to support earlier Elixir versions, move System.stacktrace/0 inside a rescue/catch lib/plug/conn/wrapper_error.ex:23

Compiling 67 files (.ex) warning: Plug.Crypto.safe_binary_to_term/1 is deprecated. Use non_executable_binary_to_term/2 lib/phoenix/token.ex:276

Compiling 56 files (.ex) warning: function :"APNS-Topics".decode/2 is undefined (module :"APNS-Topics" is not available) lib/mongoose_push/service/apns/certificate.ex:45

Get:2 http://deb.debian.org/debian stretch/main amd64 locales all 2.24-11+deb9u4 [3289 kB] debconf: delaying package configuration, since apt-utils is not installed

debconf: unable to initialize frontend: Dialog

debconf: unable to initialize frontend: Readline

update-alternatives: warning: skip creation of /usr/share/man/fr/man1/vi.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/vi.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/vi.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/vi.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/vi.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/vi.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group vi) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/view.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/view.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/view.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/view.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/view.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/view.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group view) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/ex.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/ex.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/ex.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/ex.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/ex.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/ex.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group ex) doesn't exist update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode update-alternatives: warning: skip creation of /usr/share/man/fr/man1/editor.1.gz because associated file /usr/share/man/fr/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/it/man1/editor.1.gz because associated file /usr/share/man/it/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/pl/man1/editor.1.gz because associated file /usr/share/man/pl/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ru/man1/editor.1.gz because associated file /usr/share/man/ru/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/ja/man1/editor.1.gz because associated file /usr/share/man/ja/man1/vim.1.gz (of link group editor) doesn't exist update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group editor) doesn't exist

Now My Docker Container Run By below Command

docker run -v /usr/lib/mongooseim/priv:/opt/app/priv --name MONGOOSEPUSH -p 8443:8443 -e MIX_ENV="dev" -e PUSH_HTTPS_PORT="8443" -e PUSH_HTTPS_CERTFILE="/opt/app/priv/ssl/rest_cert.pem" -e PUSH_HTTPS_KEYFILE="/opt/app/priv/ssl/rest_key.pem" -e TLS_SERVER_CERT_VALIDATION=false -e PUSH_FCM_ENABLED="false" -e PUSH_APNS_ENABLED="true" -e PUSH_APNS_DEV_USE_2197="true" -e PUSH_APNS_DEV_CERT="priv/apns/dev_cert.pem" -e PUSH_APNS_DEV_KEY="priv/apns/dev_key.pem" -e PUSH_APNS_DEV_POOL_SIZE="5" -e PUSH_LOGLEVEL="debug" -e PUSH_LOGFORMAT="logfmt" -e PUSH_APNS_AUTH_TYPE=certificate -e PUSH_OPENAPI_EXPOSE_UI=true -it --rm mongooseim/mongoose-push

I am just created fake file for production because I just want to test it in development so I just put development Certificate and key with the name of dev_cert.pem & dev_key.pem and I put fake file for prod_cert.pem & dev_key.pem.

So I just want to know is all certificate and keys are menditory including production and development because I want to only test for development.

Error:

when=2020-09-29T05:41:19.942 severity=debug what=http_open text="HTTP/2 connection opened" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:43 pid=#PID<0.1891.0> connection=#PID<0.2146.0> port=443 domain=api.push.apple.com status=error file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:19.942 severity=debug what=h2_schedule_message text="Scheduling H2 connection message" at=Elixir.Sparrow.H2Worker.schedule_message_after/2:443 pid=#PID<0.1891.0> after=5000 message="{:ping, #PID<0.2146.0>}" file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:19.943 severity=debug what=h2_connection_lost text="Connection process down" at=Elixir.Sparrow.H2Worker.handle_info/2:213 pid=#PID<0.1891.0> reason=:normal file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:19.943 severity=debug what=http_open text="Opening HTTP/2 connection" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:21 pid=#PID<0.1891.0> opts="[certfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_cert.pem\", keyfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_key.pem\"]" port=443 domain=api.push.apple.com file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.065 severity=debug what=http_open text="HTTP/2 connection opened" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:43 pid=#PID<0.1885.0> connection=#PID<0.2153.0> port=443 domain=api.push.apple.com status=error file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.065 severity=debug what=h2_schedule_message text="Scheduling H2 connection message" at=Elixir.Sparrow.H2Worker.schedule_message_after/2:443 pid=#PID<0.1885.0> after=5000 message="{:ping, #PID<0.2153.0>}" file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:20.066 severity=debug what=h2_connection_lost text="Connection process down" at=Elixir.Sparrow.H2Worker.handle_info/2:213 pid=#PID<0.1885.0> reason=:normal file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:20.066 severity=debug what=http_open text="Opening HTTP/2 connection" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:21 pid=#PID<0.1885.0> opts="[certfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_cert.pem\", keyfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_key.pem\"]" port=443 domain=api.push.apple.com file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.350 severity=debug what=http_open text="HTTP/2 connection opened" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:43 pid=#PID<0.1883.0> connection=#PID<0.2119.0> port=443 domain=api.push.apple.com status=error file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.350 severity=debug what=h2_schedule_message text="Scheduling H2 connection message" at=Elixir.Sparrow.H2Worker.schedule_message_after/2:443 pid=#PID<0.1883.0> after=5000 message="{:ping, #PID<0.2119.0>}" file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:20.350 severity=debug what=h2_connection_lost text="Connection process down" at=Elixir.Sparrow.H2Worker.handle_info/2:213 pid=#PID<0.1883.0> reason=:normal file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:20.350 severity=debug what=http_open text="Opening HTTP/2 connection" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:21 pid=#PID<0.1883.0> opts="[certfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_cert.pem\", keyfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_key.pem\"]" port=443 domain=api.push.apple.com file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.530 severity=debug what=http_open text="HTTP/2 connection opened" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:43 pid=#PID<0.1889.0> connection=#PID<0.2163.0> port=443 domain=api.push.apple.com status=error file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.530 severity=debug what=h2_schedule_message text="Scheduling H2 connection message" at=Elixir.Sparrow.H2Worker.schedule_message_after/2:443 pid=#PID<0.1889.0> after=5000 message="{:ping, #PID<0.2163.0>}" file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:20.530 severity=debug what=h2_connection_lost text="Connection process down" at=Elixir.Sparrow.H2Worker.handle_info/2:213 pid=#PID<0.1889.0> reason=:normal file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:20.530 severity=debug what=http_open text="Opening HTTP/2 connection" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:21 pid=#PID<0.1889.0> opts="[certfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_cert.pem\", keyfile: \"/opt/app/lib/mongoose_push-2.1.0/priv/apns/prod_key.pem\"]" port=443 domain=api.push.apple.com file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.564 severity=debug what=http_open text="HTTP/2 connection opened" at=Elixir.Sparrow.H2ClientAdapter.Chatterbox.open/3:43 pid=#PID<0.1887.0> connection=#PID<0.2160.0> port=443 domain=api.push.apple.com status=error file=lib/sparrow/h2_client_adapter/chatterbox.ex application=sparrow when=2020-09-29T05:41:20.564 severity=debug what=h2_schedule_message text="Scheduling H2 connection message" at=Elixir.Sparrow.H2Worker.schedule_message_after/2:443 pid=#PID<0.1887.0> after=5000 message="{:ping, #PID<0.2160.0>}" file=lib/sparrow/h2_worker.ex application=sparrow when=2020-09-29T05:41:20.564 severity=debug what=h2_connection_lost text="Connection process down" at=Elixir.Sparrow.H2Worker.handle_info/2:213 pid=#PID<0.1887.0> reason=:normal file=lib/sparrow/h2_worker.ex application=sparrow