POA Forum

Blockscout crashes on startup

Hello,
I have setup blockscout using manual deployment documentation. The whole process of installing blockscout is ok but blockscout fails to start. I’m using blockscout 2.0.4-beta release and it crashes with this error message:

Blockquote
2019-10-07T08:00:00.696 application=que [info] [Que] Booting Que
2019-10-07T08:00:00.735 application=que [info] [Que] Booting Server Supervisor for Workers
2019-10-07T08:00:00.872 application=explorer [warn] Failed to fetch market history. Trying again.
2019-10-07T08:00:00.910 [error] GenServer Explorer.KnownTokens terminating
** (Protocol.UndefinedError) protocol String.Chars not implemented for {:option, :server_only, :honor_cipher_order} of type Tuple. This protocol is implemented for the following type(s): Explorer.Chain.Address, Explorer.Chain.Hash, Explorer.Chain.Data, Cldr.Unit, Postgrex.Copy, Postgrex.Query, Que.Job, ExJsonSchema.Validator.Error.AdditionalProperties, ExJsonSchema.Validator.Error.Required, ExJsonSchema.Validator.Error.Pattern, ExJsonSchema.Validator.Error.Type, ExJsonSchema.Validator.Error.MinProperties, ExJsonSchema.Validator.Error.MultipleOf, ExJsonSchema.Validator.Error.MinLength, ExJsonSchema.Validator.Error.AnyOf, ExJsonSchema.Validator.Error.Maximum, ExJsonSchema.Validator.Error.Not, ExJsonSchema.Validator.Error.AdditionalItems, ExJsonSchema.Validator.Error.Enum, ExJsonSchema.Validator.Error.Minimum, ExJsonSchema.Validator.Error.AllOf, ExJsonSchema.Validator.Error.MinItems, ExJsonSchema.Validator.Error.Dependencies, ExJsonSchema.Validator.Error.OneOf, ExJsonSchema.Validator.Error.MaxLength, ExJsonSchema.Validator.Error.MaxItems, ExJsonSchema.Validator.Error.UniqueItems, ExJsonSchema.Validator.Error.MaxProperties, ExJsonSchema.Validator.Error.Format, Decimal, Date, NaiveDateTime, URI, Float, Time, Integer, Atom, DateTime, BitString, List, Version, Version.Requirement
(elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1
(elixir) lib/string/chars.ex:22: String.Chars.to_string/1
(explorer) lib/explorer/known_tokens/known_tokens.ex:43: anonymous fn/1 in Explorer.KnownTokens.handle_info/2
(logger) lib/logger.ex:862: Logger.normalize_message/2
(logger) lib/logger.ex:687: Logger.do_log/3
(explorer) lib/explorer/known_tokens/known_tokens.ex:43: Explorer.KnownTokens.handle_info/2
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib) gen_server.erl:711: :gen_server.handle_msg/6
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {#Reference<0.2546251970.643039233.105109>, {:error, {:option, :server_only, :honor_cipher_order}}}
State: {} 2019-10-07T08:00:00.910 [error] GenServer Explorer.ExchangeRates terminating ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:option, :server_only, :honor_cipher_order} of type Tuple. This protocol is implemented for the following type(s): Explorer.Chain.Address, Explorer.Chain.Hash, Explorer.Chain.Data, Cldr.Unit, Postgrex.Copy, Postgrex.Query, Que.Job, ExJsonSchema.Validator.Error.AdditionalProperties, ExJsonSchema.Validator.Error.Required, ExJsonSchema.Validator.Error.Pattern, ExJsonSchema.Validator.Error.Type, ExJsonSchema.Validator.Error.MinProperties, ExJsonSchema.Validator.Error.MultipleOf, ExJsonSchema.Validator.Error.MinLength, ExJsonSchema.Validator.Error.AnyOf, ExJsonSchema.Validator.Error.Maximum, ExJsonSchema.Validator.Error.Not, ExJsonSchema.Validator.Error.AdditionalItems, ExJsonSchema.Validator.Error.Enum, ExJsonSchema.Validator.Error.Minimum, ExJsonSchema.Validator.Error.AllOf, ExJsonSchema.Validator.Error.MinItems, ExJsonSchema.Validator.Error.Dependencies, ExJsonSchema.Validator.Error.OneOf, ExJsonSchema.Validator.Error.MaxLength, ExJsonSchema.Validator.Error.MaxItems, ExJsonSchema.Validator.Error.UniqueItems, ExJsonSchema.Validator.Error.MaxProperties, ExJsonSchema.Validator.Error.Format, Decimal, Date, NaiveDateTime, URI, Float, Time, Integer, Atom, DateTime, BitString, List, Version, Version.Requirement (elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1 (elixir) lib/string/chars.ex:22: String.Chars.to_string/1 (explorer) lib/explorer/exchange_rates/exchange_rates.ex:43: anonymous fn/1 in Explorer.ExchangeRates.handle_info/2 (logger) lib/logger.ex:862: Logger.normalize_message/2 (logger) lib/logger.ex:687: Logger.__do_log__/3 (explorer) lib/explorer/exchange_rates/exchange_rates.ex:43: Explorer.ExchangeRates.handle_info/2 (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4 (stdlib) gen_server.erl:711: :gen_server.handle_msg/6 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 Last message: {#Reference<0.2546251970.643039233.105088>, {:error, {:option, :server_only, :honor_cipher_order}}} State: {}
2019-10-07T08:00:00.974 application=explorer [warn] Failed to fetch market history. Trying again.
2019-10-07T08:00:00.996 [error] GenServer Explorer.ExchangeRates terminating
** (Protocol.UndefinedError) protocol String.Chars not implemented for {:option, :server_only, :honor_cipher_order} of type Tuple. This protocol is implemented for the following type(s): Explorer.Chain.Address, Explorer.Chain.Hash, Explorer.Chain.Data, Cldr.Unit, Postgrex.Copy, Postgrex.Query, Que.Job, ExJsonSchema.Validator.Error.AdditionalProperties, ExJsonSchema.Validator.Error.Required, ExJsonSchema.Validator.Error.Pattern, ExJsonSchema.Validator.Error.Type, ExJsonSchema.Validator.Error.MinProperties, ExJsonSchema.Validator.Error.MultipleOf, ExJsonSchema.Validator.Error.MinLength, ExJsonSchema.Validator.Error.AnyOf, ExJsonSchema.Validator.Error.Maximum, ExJsonSchema.Validator.Error.Not, ExJsonSchema.Validator.Error.AdditionalItems, ExJsonSchema.Validator.Error.Enum, ExJsonSchema.Validator.Error.Minimum, ExJsonSchema.Validator.Error.AllOf, ExJsonSchema.Validator.Error.MinItems, ExJsonSchema.Validator.Error.Dependencies, ExJsonSchema.Validator.Error.OneOf, ExJsonSchema.Validator.Error.MaxLength, ExJsonSchema.Validator.Error.MaxItems, ExJsonSchema.Validator.Error.UniqueItems, ExJsonSchema.Validator.Error.MaxProperties, ExJsonSchema.Validator.Error.Format, Decimal, Date, NaiveDateTime, URI, Float, Time, Integer, Atom, DateTime, BitString, List, Version, Version.Requirement
(elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1
(elixir) lib/string/chars.ex:22: String.Chars.to_string/1
(explorer) lib/explorer/exchange_rates/exchange_rates.ex:43: anonymous fn/1 in Explorer.ExchangeRates.handle_info/2
(logger) lib/logger.ex:862: Logger.normalize_message/2
(logger) lib/logger.ex:687: Logger.do_log/3
(explorer) lib/explorer/exchange_rates/exchange_rates.ex:43: Explorer.ExchangeRates.handle_info/2
(stdlib) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib) gen_server.erl:711: :gen_server.handle_msg/6
(stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {#Reference<0.2546251970.643039234.94379>, {:error, {:option, :server_only, :honor_cipher_order}}}
State: {} 2019-10-07T08:00:00.996 [error] GenServer Explorer.KnownTokens terminating ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:option, :server_only, :honor_cipher_order} of type Tuple. This protocol is implemented for the following type(s): Explorer.Chain.Address, Explorer.Chain.Hash, Explorer.Chain.Data, Cldr.Unit, Postgrex.Copy, Postgrex.Query, Que.Job, ExJsonSchema.Validator.Error.AdditionalProperties, ExJsonSchema.Validator.Error.Required, ExJsonSchema.Validator.Error.Pattern, ExJsonSchema.Validator.Error.Type, ExJsonSchema.Validator.Error.MinProperties, ExJsonSchema.Validator.Error.MultipleOf, ExJsonSchema.Validator.Error.MinLength, ExJsonSchema.Validator.Error.AnyOf, ExJsonSchema.Validator.Error.Maximum, ExJsonSchema.Validator.Error.Not, ExJsonSchema.Validator.Error.AdditionalItems, ExJsonSchema.Validator.Error.Enum, ExJsonSchema.Validator.Error.Minimum, ExJsonSchema.Validator.Error.AllOf, ExJsonSchema.Validator.Error.MinItems, ExJsonSchema.Validator.Error.Dependencies, ExJsonSchema.Validator.Error.OneOf, ExJsonSchema.Validator.Error.MaxLength, ExJsonSchema.Validator.Error.MaxItems, ExJsonSchema.Validator.Error.UniqueItems, ExJsonSchema.Validator.Error.MaxProperties, ExJsonSchema.Validator.Error.Format, Decimal, Date, NaiveDateTime, URI, Float, Time, Integer, Atom, DateTime, BitString, List, Version, Version.Requirement (elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1 (elixir) lib/string/chars.ex:22: String.Chars.to_string/1 (explorer) lib/explorer/known_tokens/known_tokens.ex:43: anonymous fn/1 in Explorer.KnownTokens.handle_info/2 (logger) lib/logger.ex:862: Logger.normalize_message/2 (logger) lib/logger.ex:687: Logger.__do_log__/3 (explorer) lib/explorer/known_tokens/known_tokens.ex:43: Explorer.KnownTokens.handle_info/2 (stdlib) gen_server.erl:637: :gen_server.try_dispatch/4 (stdlib) gen_server.erl:711: :gen_server.handle_msg/6 (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3 Last message: {#Reference<0.2546251970.643039234.94369>, {:error, {:option, :server_only, :honor_cipher_order}}} State: {}
2019-10-07T08:00:01.014 [info] Application explorer exited: shutdown
** (Mix) Could not start application indexer: {:not_running, :explorer}

Blockquote
The os distribution is Ubuntu 18.04 with all requirements.
What I’m doing wrong?

Hello,

What is the set of environment variables you configured for Blockscout as it is suggested in

  1. Set your environment variables as needed.

of deployment instruction?

Could you please share the list?

Blockquote
export NETWORK=“xxx”
export SUBNETWORK=“xxx”
export ETHEREUM_JSONRPC_HTTP_URL=“http://localhost:8545
export ETHEREUM_JSONRPC_TRACE_URL=“http://localhost:8545
export ETHEREUM_JSONRPC_WS_URL=“ws://localhost:8546”
export ETHEREUM_JSONRPC_VARIANT=parity
export LINK_TO_OTHER_EXPLORERS=“false”
export CHAIN_SPEC_PATH=“url of chainspec”

The env variables are set but the problem appears.

Please set also your coin ticker, for instance, export COIN="POA"

~Hello, thanks for help but problem is still appearing.

It looks like your issue is with coin exchange rates fetcher. API, that we use, could change the response schema for some reason. There are 2 ways to fix it. You can disable exchange rates fetcher or try to start Blockscout from the master branch. The latter option, I think, more preferable.

It was problem with the Erlang version. If I installed default version of esl-erlang (22.1.2) the problem occurs. When I changed esl-erlang version to 22.0.7 the problem dissapears and the v2.0.4-beta works and master branch also.