Coder Social home page Coder Social logo

eventeum / eventeum Goto Github PK

View Code? Open in Web Editor NEW
496.0 27.0 145.0 1.13 MB

A resilient Ethereum event listener that bridges your smart contract events and backend microservices

License: Apache License 2.0

Java 99.31% Shell 0.42% Dockerfile 0.03% Solidity 0.24%
ethereum ethereum-blockchain blockchain event-broadcasting event-driven smart-contracts kafka event-listener

eventeum's Introduction

Eventeum

An Ethereum event listener that bridges your smart contract events and backend microservices. Eventeum listens for specified event emissions from the Ethereum network, and broadcasts these events into your middleware layer. This provides a distinct separation of concerns and means that your microservices do not have to subscribe to events directly to an Ethereum node.

Gitter

Master

CircleCI

Development

CircleCI

Features

  • Dynamically Configurable - Eventeum exposes a REST api so that smart contract events can be dynamically subscribed / unsubscribed.

  • Highly Available - Eventeum instances communicate with each other to ensure that every instance is subscribed to the same collection of smart contract events.

  • Resilient - Node failures are detected and event subscriptions will continue from the failure block once the node comes back online.

  • Fork Tolerance - Eventeum can be configured to wait a certain amount of blocks before an event is considered 'Confirmed'. If a fork occurs during this time, a message is broadcast to the network, allowing your services to react to the forked/removed event.

Supported Broadcast Mechanisms

For RabbitMQ, you can configure the following extra values

  • rabbitmq.blockNotification. true|false
  • rabbitmq.routingKey.contractEvents
  • rabbitmq.routingKey.blockEvents
  • rabbitmq.routingKey.transactionEvents

Eventeum Tutorials

Getting Started

Follow the instructions below in order to run Eventeum on your local machine for development and testing purposes.

Prerequisites

  • Java 8
  • Maven
  • Docker (optional)

Build

  1. After checking out the code, navigate to the root directory
$ cd /path/to/eventeum/
  1. Compile, test and package the project
$ mvn clean package

Run

a. If you have a running instance of MongoDB, Kafka, Zookeeper and an Ethereum node:

Executable JAR:

$ cd server
$ export SPRING_DATA_MONGODB_HOST=<mongodb-host:port>
$ export ETHEREUM_NODE_URL=http://<node-host:port>
$ export ZOOKEEPER_ADDRESS=<zookeeper-host:port>
$ export KAFKA_ADDRESSES=<kafka-host:port>
$ export RABBIT_ADDRESSES=<rabbit-host:port>

$ java -jar target/eventeum-server.jar

Docker:

$ cd server
$ docker build  . -t kauri/eventeum:latest

$ export SPRING_DATA_MONGODB_HOST=<mongodb-host:port>
$ export ETHEREUM_NODE_URL=http://<node-host:port>
$ export ZOOKEEPER_ADDRESS=<zookeeper-host:port>
$ export KAFKA_ADDRESSES=<kafka-host:port>
$ export RABBIT_ADDRESSES=<rabbit-host:port>

$ docker run -p 8060:8060 kauri/eventeum

b. If you prefer build an all-in-one test environment with a parity dev node, use docker-compose:

$ cd server
$ docker-compose -f docker-compose.yml build
$ docker-compose -f docker-compose.yml up

SQL Support

Eventeum now supports a SQL database as well as the default MongoDB. To use a SQL database (only SQL Server has currently been tested but others should be supported with the correct config), set the database.type property to SQL and ensure you have all required additional properties in your properties file. See config-examples/application-template-sqlserver.yml for a sample SQLServer configuration.

Upgrading to 0.8.0

When upgrading Eventeum to 0.8.0, changes in the schema are required. In order to perform the migration follow these steps:

  1. Stop all Evnteum instances
  2. Backup your database
  3. Apply the tools/potgres-upgrade-to-v0.8.0.sql sql script. Note that this script is written for Postgres, syntax may differ if using other database system.
  4. Restart Eventeum instances

Configuring Nodes

Listening for events from multiple different nodes is supported in Eventeum, and these nodes can be configured in the properties file.

ethereum:
  nodes:
    - name: default
      url: http://mainnet:8545
    - name: sidechain
      url: wss://sidechain/ws

If an event does not specify a node, then it will be registered against the 'default' node.

That is the simplest node configuration, but there is other custom flags you can activate per node:

  • maxIdleConnections: Maximum number of connections to the node. (default: 5)
  • keepAliveDuration: Duration of the keep alive http in milliseconds (default: 10000)
  • connectionTimeout: Http connection timeout to the node in milliseconds (default: 5000)
  • readTimeout: Http read timeout to the node in milliseconds (default: 60000)
  • addTransactionRevertReason: Enables receiving the revert reason when a transaction fails. (default: false)
  • pollInterval: Polling interval of the rpc request to the node (default: 10000)
  • healthcheckInterval: Polling interval of that evenreum will use to check if the node is active (default: 10000)
  • numBlocksToWait: Blocks to wait until we decide event is confirmed (default: 1). Overrides broadcaster config
  • numBlocksToWaitBeforeInvalidating: Blocks to wait until we decide event is invalidated (default: 1). Overrides broadcaster config
  • numBlocksToWaitForMissingTx: Blocks to wait until we decide tx is missing (default: 1) Overrides broadcaster config

This will be an example with a complex configuration:

ethereum:
  nodes:
  - name: default
    url: http://mainnet:8545
    pollInterval: 1000
    maxIdleConnections: 10
    keepAliveDuration: 15000
    connectionTimeout: 7000
    readTimeout: 35000
    healthcheckInterval: 3000
    addTransactionRevertReason: true
    numBlocksToWait: 1
    numBlocksToWaitBeforeInvalidating: 1
    numBlocksToWaitForMissingTx: 1
  blockStrategy: POLL

Registering Events

REST

Eventeum exposes a REST api that can be used to register events that should be subscribed to / broadcast.

  • URL: /api/rest/v1/event-filter
  • Method: POST
  • Headers:
Key Value
content-type application/json
  • URL Params: N/A
  • Body:
{
	"id": "event-identifier",
	"contractAddress": "0x1fbBeeE6eC2B7B095fE3c5A572551b1e260Af4d2",
	"eventSpecification": {
		"eventName": "TestEvent",
		"indexedParameterDefinitions": [
		  {"position": 0, "type": "UINT256"},
		  {"position": 1, "type": "ADDRESS"}],
		"nonIndexedParameterDefinitions": [
		  {"position": 2, "type": "BYTES32"},
		  {"position": 3, "type": "STRING"}] },
	"correlationIdStrategy": {
		"type": "NON_INDEXED_PARAMETER",
		"parameterIndex": 0 }
}
Name Type Mandatory Default Description
id String no Autogenerated A unique identifier for the event.
contractAddress String yes The address of the smart contract that the address will be emitted from.
eventSpecification json yes The event specification
correlationIdStrategy json no null Define a correlation id for the event (only used with the Kafka broadcaster). See the advanced section for details.

eventSpecification:

Name Type Mandatory Default Description
eventName String yes The event name within the smart contract
indexedParameterTypes String array no null The array of indexed parameter types for the event.
nonIndexedParameterTypes String array no null The array of non-indexed parameter types for the event.

parameterDefinition:

Name Type Mandatory Default Description
position Number yes The zero indexed position of the parameter within the event specification
type String yes The type of the event parameter.

Currently supported parameter types: UINT8-256, INT8-256, ADDRESS, BYTES1-32, STRING, BOOL.

Dynamically sized arrays are also supported by suffixing the type with [], e.g. UINT256[].

correlationIdStrategy:

Name Type Mandatory Default Description
type String yes The correlation id strategy type.
parameterIndex Number yes The parameter index to use within the correlation strategy.
  • Success Response:
    • Code: 200
      Content:
{
    "id": "event-identifier"
}

Hard Coded Configuration

Static events can be configured within the application.yml file of Eventeum.

eventFilters:
  - id: RequestCreated
    contractAddress: ${CONTRACT_ADDRESS:0x4aecf261541f168bb3ca65fa8ff5012498aac3b8}
    eventSpecification:
      eventName: RequestCreated
      indexedParameterDefinitions:
        - position: 0
          type: BYTES32
        - position: 1
          type: ADDRESS
      nonIndexedParameterDefinitions:
        - position: 2
          type: BYTES32
    correlationId:
      type: NON_INDEXED_PARAMETER
      index: 0

Un-Registering Events

REST

  • URL: /api/rest/v1/event-filter/{event-id}

  • Method: DELETE

  • Headers: N/A

  • URL Params: N/A

  • Body: N/A

  • Success Response:

    • Code: 200 Content: N/A

Listing Registered Events

REST

  • URL: /api/rest/v1/event-filter
  • Method: GET
  • Headers:
Key Value
accept application/json
  • URL Params: N/A

  • Response: List of contract event filters:

[{
	"id": "event-identifier-1",
	"contractAddress": "0x1fbBeeE6eC2B7B095fE3c5A572551b1e260Af4d2",
	"eventSpecification": {
		"eventName": "TestEvent",
		"indexedParameterDefinitions": [
		  {"position": 0, "type": "UINT256"},
		  {"position": 1, "type": "ADDRESS"}],
		"nonIndexedParameterDefinitions": [
		  {"position": 2, "type": "BYTES32"},
		  {"position": 3, "type": "STRING"}] },
	"correlationIdStrategy": {
		"type": "NON_INDEXED_PARAMETER",
		"parameterIndex": 0 }
},
....
{
	"id": "event-identifier-N",
	"contractAddress": "0x1fbBeeE6eC2B7B095fE3c5A572551b1e260Af4d2",
	"eventSpecification": {
		"eventName": "TestEvent",
		"indexedParameterDefinitions": [
		  {"position": 0, "type": "UINT256"},
		  {"position": 1, "type": "ADDRESS"}],
		"nonIndexedParameterDefinitions": [
		  {"position": 2, "type": "BYTES32"},
		  {"position": 3, "type": "STRING"}] },
	"correlationIdStrategy": {
		"type": "NON_INDEXED_PARAMETER",
		"parameterIndex": 0 }
}
]

Registering a Transaction Monitor

From version 0.6.2, eventeum supports monitoring and broadcasting transactions. The matching criteria can be:

  • HASH: Monitor a single transaction hash. The monitoring will be removed once is notified.
  • FROM_ADDRESS: Monitor all transactions that are sent from a specific address.
  • TO_ADDRESS: Monitor all transactions that are received for a specific address.

Besides on that, it can monitor the transaction for specific statuses:

  • FAILED: It will notify if the transaction has failed
  • CONFIRMED: It will notify if the transaction is confirmed.
  • UNCONFIRMED: In case the network is configured to wait for a certain number of confirmations, this will notify when is mined and not confirmed.

REST

To register a transaction monitor, use the below REST endpoint:

  • URL: /api/rest/v1/transaction?identifier=<txHash>&nodeName=<nodeName>
  • Method: POST
  • Headers: N/A
  • URL Params: N/A
    • identifier - The transaction hash to monitor
    • nodeName - The node name that should be monitored
  • Body:

An example with type HASH:

{
	"type": "HASH",
	"transactionIdentifierValue": "0x2e8e0f98be22aa1251584e23f792d43c634744340eb274473e01a48db939f94d",
	"nodeName": "defaultNetwork",
	"statuses": ["FAIlED", "CONFIRMATION"]
}

Example filtering by FROM_ADDRES, this will notify when a transactions fails with origin the address specified in the field transactionIdentifierValue

{
	"type": "FROM_ADDRESS" ,
	"transactionIdentifierValue": "0x1fbBeeE6eC2B7B095fE3c5A572551b1e260Af4d2",
	"nodeName": "defaultNetwork",
	"statuses": ["FAIlED"]
}
Name Type Mandatory Default Description
type String yes The type of the filter you want to create: HASH, FROM_ADDRESS, TO_ADDRESS
transactionIdentifierValue String yes The value associated with the type. It should be the tx hash for HASH and the address of the contract in the other cases.
nodeName String yes default The identifier of the node you want to listen the transaction
statuses List no ['FAILED', 'CONFIRMED'] It will specify the statuses you want to be notified. The default is failed and confirmed transactions. The options are: FAILED, CONFIRMED, UNCONFIRMED, INVALIDATED
  • Success Response:
    • Code: 200 Content:
{
    "id": "transaction-monitor-identifier"
}

Un-Registering a Transaction Monitor

REST

  • URL: /api/rest/v1/transaction/{monitor-id}

  • Method: DELETE

  • Headers: N/A

  • URL Params: N/A

  • Body: N/A

  • Success Response:

    • Code: 200
      Content: N/A

Broadcast Messages Format

Contract Events

When a subscribed event is emitted, a JSON message is broadcast to the configured kafka topic or rabbit exchange (contract-events by default), with the following format:

{
	"id":"unique-event-id",
	"type":"CONTRACT_EVENT",
	"details":{
		"name":"DummyEvent",
		"filterId":"63da468c-cec6-49aa-bea4-eeba64fb1df4",
		"indexedParameters":[{"type":"bytes32","value":"BytesValue"},
			{"type":"address","value":"0x00a329c0648769a73afac7f9381e08fb43dbea72"}],
		"nonIndexedParameters":[{"type":"uint256","value":10},
			{"type":"string","value":"StringValue"}],
		"transactionHash":"0xe4fd0f095990ec471cdf40638336a73636d2e88fc1a240c20b45101b9cce9438",
		"logIndex":0,
		"blockNumber":258,
		"blockHash":"0x65d1956c2850677f75ec9adcd7b2cfab89e31ad1e7a5ba93b6fad11e6cd15e4a",
		"address":"0x9ec580fa364159a09ea15cd39505fc0a926d3a00",
		"status":"UNCONFIRMED",
		"eventSpecificationSignature":"0x46aca551d5bafd01d98f8cadeb9b50f1b3ee44c33007f2a13d969dab7e7cf2a8",
		"id":"unique-event-id"},
		"retries":0
}

Block Events

When a new block is mined, a JSON message is broadcast to the configured kafka topic or rabbit exchange (block-events by default), with the following format:

 {
 	"id":"0x79799054d1782eb4f246b3055b967557148f38344fbd7020febf7b2d44faa4f8",
	"type":"BLOCK",
	"details":{
		"number":257,
		"hash":"0x79799054d1782eb4f246b3055b967557148f38344fbd7020febf7b2d44faa4f8",
		"timestamp":12345678},
	"retries":0
}

Transaction Events

When a new transaction that matches a transaction monitor is mined, a JSON message is broadcast to the configured kafka topic or rabbit exchange (transaction-events by default), with the following format:

 {
 	"id":"0x1c0482642861779703a34f4539b3ba18a0fddfb16558f3be7157fdafcaf2c030",
	"type":"TRANSACTION",
	"details":{
		"hash":"0x1c0482642861779703a34f4539b3ba18a0fddfb16558f3be7157fdafcaf2c030",
		"nonce":"0xf",
		"blockHash":"0x6a68edf369ba4ddf93aa31cf5871ad51b5f7988a69f1ddf9ed09ead8b626db48",
		"blockNumber":"0x1e1",
		"transactionIndex":"0x0",
		"from":"0xf17f52151ebef6c7334fad080c5704d77216b732",
		"to":"0xc5fdf4076b8f3a5357c5e395ab970b5b54098fef",
		"value":"0x16345785d8a0000",
		"nodeName":"default",
		"status":"CONFIRMED"},
	"retries":0
}

Contract Creation Transaction

If the transaction is a contract creation transaction, then the contractAddress value will be set to the address of the newly deployed smart contract.

Transaction Event Statuses

A broadcast transaction event can have the following statuses:

Status Description
UNCONFIRMED Transaction has been mined and we're now waiting for the configured number of blocks
CONFIRMED The configured number of blocks have been mined since the transaction has been mined
INVALIDATED The blockchain has forked since the initially broadcast UNCONFIRMED transaction was broadcast
FAILED The transaction has been mined but the tx execution failed

Configuration

Eventeum can either be configured by:

  1. storing an application.yml next to the built JAR (copy one from config-examples). This overlays the defaults from server/src/main/resources/application.yml.
  2. Setting the associated environment variables.
Env Variable Default Description
SERVER_PORT 8060 The port for the eventeum instance.
ETHEREUM_BLOCKSTRATEGY POLL The strategy for obtaining block events from an ethereum node (POLL or PUBSUB). It will be overwritten by the specific node configuration.
ETHEREUM_NODE_URL http://localhost:8545 The default ethereum node url.
ETHEREUM_NODE_BLOCKSTRATEGY POLL The strategy for obtaining block events for the ethereum node (POLL or PUBSUB).
ETHEREUM_NODE_HEALTHCHECK_POLLINTERVAL 2000 The interval time in ms, in which a request is made to the ethereum node, to ensure that the node is running and functional.
ETHEREUM_NODE_ADD_TRANSACTION_REVERT_REASON false In case of a failing transaction it indicates if Eventeum should get the revert reason. Currently not working for Ganache and Parity.
ETHEREUM_NUMBLOCKSTOREPLAY 12 Number of blocks to replay on node or service failure (ensures no blocks / events are missed on chain reorg)
POLLING_INTERVAL 10000 The polling interval used by Web3j to get events from the blockchain.
EVENTSTORE_TYPE DB The type of eventstore used in Eventeum. (See the Advanced section for more details)
BROADCASTER_TYPE KAFKA The broadcast mechanism to use. (KAFKA or HTTP or RABBIT)
BROADCASTER_CACHE_EXPIRATIONMILLIS 6000000 The eventeum broadcaster has an internal cache of sent messages, which ensures that duplicate messages are not broadcast. This is the time that a message should live within this cache.
BROADCASTER_EVENT_CONFIRMATION_NUMBLOCKSTOWAIT 12 The number of blocks to wait (after the initial mined block) before broadcasting a CONFIRMED event
BROADCASTER_EVENT_CONFIRMATION_NUMBLOCKSTOWAITFORMISSINGTX 200 After a fork, a transaction may disappear, and this is the number of blocks to wait on the new fork, before assuming that an event emitted during this transaction has been INVALIDATED
BROADCASTER_EVENT_CONFIRMATION_NUMBLOCKSTOWAITBEFOREINVALIDATING 2 Number of blocks to wait before considering a block as invalid.
BROADCASTER_MULTIINSTANCE false If multiple instances of eventeum are to be deployed in your system, this should be set to true so that the eventeum communicates added/removed filters to other instances, via kafka.
BROADCASTER_HTTP CONTRACTEVENTSURL The http url for posting contract events (for HTTP broadcasting)
BROADCASTER_HTTP BLOCKEVENTSURL The http url for posting block events (for HTTP broadcasting)
BROADCASTER_BYTESTOASCII false If any bytes values within events should be converted to ascii (default is hex)
BROADCASTER_ENABLE_BLOCK_NOTIFICATION true Boolean that indicates if want to receive block notifications or not. Set false to not receive that event.
ZOOKEEPER_ADDRESS localhost:2181 The zookeeper address
KAFKA_ADDRESSES localhost:9092 Comma seperated list of kafka addresses
KAFKA_TOPIC_CONTRACT_EVENTS contract-events The topic name for broadcast contract event messages
KAFKA_TOPIC_BLOCK_EVENTS block-events The topic name for broadcast block event messages
KAFKA_TOPIC_TRANSACTION_EVENTS transaction-events The topic name for broadcast trasaction messages
KAFKA_REQUEST_TIMEOUT_MS 20000 The duration after which a request timeouts
KAFKA_ENDPOINT_IDENTIFICATION_ALGORITHM null The endpoint identification algorithm to validate server hostname using server certificate
KAFKA_SASL_MECHANISM PLAIN The mechanism used for SASL authentication
KAFKA_USERNAME "" The username used to connect to a SASL secured Kafka cluster
KAFKA_PASSWORD "" The password used to connect to a SASL secured Kafka cluster
KAFKA_SECURITY_PROTOCOL PLAINTEXT Protocol used to communicate with Kafka brokers
KAFKA_RETRIES 10 The number of times a Kafka consumer will try to publish a message before throwing an error
KAFKA_RETRY_BACKOFF_MS 500 The duration between each retry
KEEP_ALIVE_DURATION 15000 Rpc http idle threads keep alive timeout in ms
MAX_IDLE_CONNECTIONS 10 The max number of HTTP rpc idle threads at the pool
SYNCINC_THRESHOLD 60 Number of blocks of difference to consider that eventeum is "syncing" with a node
SPRING_DATA_MONGODB_HOST localhost The mongoDB host (used when event store is set to DB)
SPRING_DATA_MONGODB_PORT 27017 The mongoDB post (used when event store is set to DB)
RABBIT_ADDRESS localhost:5672 property spring.rabbitmq.host (The rabbitmq address)
RABBIT_EXCHANGE ThisIsAExchange property rabbitmq.exchange
RABBIT_ROUTING_KEY thisIsRoutingKey property rabbitmq.routingKeyPrefix
DATABASE_TYPE MONGO The database to use. Either MONGO or SQL.
CONNECTION_TIMEOUT 7000 RPC, http connection timeout in millis
READ_TIMEOUT 35000 RPC, http read timeout in millis

INFURA Support Configuration

Connecting to an INFURA node is only supported if connecting via websockets (wss://<...> node url). The blockstrategy must also be set to PUBSUB.

Advanced

Correlation Id Strategies (Kafka Broadcasting)

Each subscribed event can have a correlation id strategy association with it, during subscription. A correlation id strategy defines what the kafka message key for a broadcast event should be, and allows the system to be configured so that events with particular parameter values are always sent to the same partition.

Currently supported correlation id strategies are:

Indexed Parameter Strategy - An indexed parameter within the event is used as the message key when broadcasting. Non Indexed Parameter Strategy - An non-indexed parameter within the event is used as the message key when broadcasting.

Event Store

Eventeum utilises an event store in order to establish the block number to start event subscriptions from, in the event of a failover. For example, if the last event broadcast for event with id X had a block number of 123, then on a failover, eventeum will subscribe to events from block 124.

There are currently 2 supported event store implementations:

MongoDB

Broadcast events are saved and retrieved from a mongoDB database.

Required Configuration

Env Variable Default Description
EVENTSTORE_TYPE DB MongoDB event store enabled
SPRING_DATA_MONGODB_HOST localhost The mongoDB host
SPRING_DATA_MONGODB_PORT 27017 The mongoDB post

REST Service

Eventeum polls an external REST service in order to obtain a list of events broadcast for a specific event specification. It is assumed that this REST service listens for broadcast events on the kafka topic and updates its internal state...broadcast events are not directly sent to the REST service by eventeum.

The implemented REST service should have a pageable endpoint which accepts a request with the following specification:

  • URL: Configurable, defaults to /api/rest/v1/event
  • Method: GET
  • Headers:
Key Value
content-type application/json
  • URL Params:
Key Value
page The page number
size The page size
sort The results sort field
dir The results sort direction
signature Retrieve events with the specified event signature
  • Body: N/A

  • Success Response:

    • Code: 200
      Content:
{
	"content":[
		{"blockNumber":10,"id":<unique event id>}],
	"page":1,
	"size":1,
	"totalElements":1,
	"first":false,
	"last":true,
	"totalPages":1,
	"numberOfElements":1,
	"hasContent":true
}

Required Configuration

Env Variable Default Description
EVENTSTORE_TYPE REST REST event store enabled
EVENTSTORE_URL http://localhost:8081/api/rest/v1 The REST endpoint url
EVENTSTORE_EVENTPATH /event The path to the event REST endpoint

Integrating Eventeum into Third Party Spring Application

Eventeum can be embedded into an existing Spring Application via an annotation.

Steps to Embed

  1. Add the Eventeum Artifactory repository into your pom.xml file:
<repositories>
  <repository>
    <id>eventeum-artifactory</id>
    <url>https://eventeum.jfrog.io/artifactory/eventeum</url>
  </repository>
</repositories>
  1. Add the eventeum-core dependency to your pom.xml file:
<dependency>
  <groupId>io.eventeum</groupId>
  <artifactId>eventeum-core</artifactId>
  <version>*LATEST_EVENTEUM_VERSION*</version>
</dependency>
  1. Within your Application class or a @Configuration annotated class, add the @EnableEventeum annotation.

Health check endpoint

Eventeum offers a healthcheck url where you can ask for the status of the systems you are using. It will look like:

{
   "status":"UP",
   "details":{
      "rabbit":{
         "status":"UP",
         "details":{
            "version":"3.7.13"
         }
      },
      "mongo":{
         "status":"UP",
         "details":{
            "version":"4.0.8"
         }
      }
   }
}

Returning this information it is very easy to create alerts over the status of the system.

The endpoint is: GET /monitoring/health

Metrics: Prometheus

Eventeum includes a prometheus metrics export endpoint.

It includes standard jvm, tomcat metrics enabled by spring-boot https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-metrics-export-prometheus https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-metrics-meter.

Added to the standard metrics, custom metrics have been added:

  • eventeum_%Network%_syncing: 1 if node is syncing (latestBlock + syncingThreshols < currentBlock). 0 if not syncing
  • eventeum_%Network%_latestBlock: latest block read by Eventeum
  • eventeum_%Network%_currentBlock: Current node block
  • eventeum_%Network%_status: Current node status. 0 = Suscribed, 1 = Connected, 2 = Down

All metrics include application="Eventeum",environment="local" tags.

The endpoint is: GET /monitoring/prometheus

Known Caveats / Issues

  • In multi-instance mode, where there is more than one Eventeum instance in a system, your services are required to handle duplicate messages gracefully, as each instance will broadcast the same events.

eventeum's People

Contributors

craigwilliams84 avatar dwardu avatar ferparishuertas avatar fllaca avatar fosgate29 avatar ggarri avatar janayama avatar mgomezcuesta avatar mitaku avatar nano-adhara avatar t1bb4r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eventeum's Issues

Eventeum can potentially drop events when Kafka/Rabbit/HTTP endpoint is down

Hi,

I was messing around with the configuration and saw that changing numBlocksToWait changes how Eventeum handles events across restarts. Specifically, bringing Eventeum down and then bringing it back up will cause all unconfirmed blocks (duplicates now) to be again sent to the destination endpoint (be it Kafka, Rabbit, or HTTP endpoints). When I brought this number down, for testing purposes, to a lower number, say 0 (which I assumed would confirm each block as it is received), I ran into the following situation:

A block containing an event is mined and Eventeum receives the event. Then, let's say that the destination endpoint is down. When it tries to push the event to the destination, it receives exceptions. I expected Eventeum to be able to keep track of said events, but the current behavior seems to just move on to the next block, dropping this event entirely.

I took a look at the code and it seems to be sending the event off and updating its database states in isolation of each other, so a failure to send does not affect how Eventeum updates its database. This would cause loss of events from the recipient side since Eventeum will just move on to the next block. The answer maybe to increase numBlocksToWait, but I think this would not fix the root issue. I am currently trying out changes to see I can make Eventeum stop processing blocks if the destination endpoint is down, and will see how that goes. What are your thoughts on this?

Thank you!

Cannot connect to mainnet infura but rinkeby works

I am having trouble connecting to mainnet infura via a WSS connection.

When using the 0.8.1-KAURI image :

When I connect to rinkeby using the following config everything works as expected. I can subscribe to block events as well as contract events :
ETHEREUM_NODE_URL: wss://rinkeby.infura.io/ws/v3/<project_id>
ETHEREUM_NODES_0_BLOCKSTRATEGY: PUBSUB

If I keep everything else as is except I change the config to :
ETHEREUM_NODE_URL: wss://mainnet.infura.io/ws/v3/<project_id>
ETHEREUM_NODES_0_BLOCKSTRATEGY: PUBSUB

I get the following error when trying to register contract events :

"textPayload": "io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call.
Full error: wss error.txt

Digging into the logs it looks like the connection is timing out :

Caused by: java.io.IOException: Request with id 7 timed out

2020-05-15 11:22:34.323 [SimpleAsyncTaskExecutor-1] ERROR net.consensys.eventeum.service.DefaultSubscriptionService: doRegisterContractEventFilter - Error registering filter LoanRepaid

net.consensys.eventeum.chain.service.BlockchainException: Failed to subcribe for filter LoanRepaid. The subscription is disposed.

I saw there was a previous issue with a similar error so I tried swapping to the eventeum:snapshot image but that one won't even start up :

"Application failed to start with classpath"
Full error :
Snapshot error.txt

If I try connect to the same infura endpoint as above using wscat, it works fine :

wscat -c wss://mainnet.infura.io/ws/v3/<project_id>
Connected (press CTRL+C to quit)

This is a blocker, any help would be greatly appreciated

Error when emitting a BOOL param as part of contract event

I have eventeum running in docker using the eventeum/eventeum:latest image. I can receive contract events without a problem. However when I try to subscribe to an event that has a BOOL parameter I get an Unsupported type: bool error.

This is the entry in contractEventFilter :

     {"_id":"LoanStarted","contractAddress":"0x59712F44CDbAD771E8761035C6d3B4A5611c6D7F","node":"default","eventSpecification":{"eventName":"LoanStarted","indexedParameterDefinitions":[],"nonIndexedParameterDefinitions":[{"position":{"$numberInt":"0"},"type":"UINT256"},{"position":{"$numberInt":"1"},"type":"ADDRESS"},{"position":{"$numberInt":"2"},"type":"ADDRESS"},{"position":{"$numberInt":"3"},"type":"UINT256"},{"position":{"$numberInt":"4"},"type":"UINT256"},{"position":{"$numberInt":"5"},"type":"UINT256"},{"position":{"$numberInt":"6"},"type":"UINT256"},{"position":{"$numberInt":"7"},"type":"UINT256"},{"position":{"$numberInt":"8"},"type":"UINT256"},{"position":{"$numberInt":"9"},"type":"ADDRESS"},{"position":{"$numberInt":"10"},"type":"ADDRESS"},{"position":{"$numberInt":"11"},"type":"BOOL"}]},"startBlock":"6267926","_class":"net.consensys.eventeum.dto.event.filter.ContractEventFilter"}`

The event in Solidity looks like this :

event LoanStarted(
    uint256 loanId,
    address borrower,
    address lender,
    uint256 loanPrincipalAmount,
    uint256 maximumRepaymentAmount,
    uint256 nftCollateralId,
    uint256 loanStartTime,
    uint256 loanDuration,
    uint256 loanInterestRateForDurationInBasisPoints,
    address nftCollateralContract,
    address loanERC20Denomination,
    bool interestIsProRated
);

When the event fires I get the following logs in the Eventeum service:

DEBUG net.consensys.eventeum.chain.service.Web3jService: lambda$registerEventListener$0 -      
Dispatching log: Log{removed=false, logIndex='0x6', transactionIndex='0x7', transactionHash='0x3934b2643608849ba2b1c83251ad69ee6ea12eb6ac700ad8b9778b5d10c2c9ea', blockHash='0x5174501c37803e7baa66984fc34ab1b98410f7c3b2a1bf586c25c35318f621f5', blockNumber='0x5fa470', address='0x59712f44cdbad771e8761035c6d3b4a5611c6d7f', data='0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f2730c7d84aa9fe0c7bad3fd7ca1e763e3c3f3df000000000000000000000000685d05cafada2e26d8d2df2ea06dc113817735610000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000010a741a462780000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000005e8b1dc3000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000ffffffff000000000000000000000000fdf703b22a13f825d348af43d2bfc140054d0e3d000000000000000000000000c778417e063141139fce010982780140aa0cd5ab0000000000000000000000000000000000000000000000000000000000000000', type='null', topics=[0x7a9a95acdaec2726663658ce76ffb4b960ce244a001b3252a5bb3db586e28c1b]}

2020-04-06 12:17:11.096 [pool-3-thread-5] ERROR org.web3j.protocol.core.filters.Filter: lambda$run$25 - Error sending request

rx.exceptions.OnErrorNotImplementedException: Unsupported type: bool

at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:386) ~[rxjava-1.3.8.jar!/:1.3.8]

at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:383) ~[rxjava-1.3.8.jar!/:1.3.8]

at rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44) ~[rxjava-1.3.8.jar!/:1.3.8]

at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:153) ~[rxjava-1.3.8.jar!/:1.3.8]

at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115) ~[rxjava-1.3.8.jar!/:1.3.8]

at rx.exceptions.Exceptions.throwOrReport(Exceptions.java:212) ~[rxjava-1.3.8.jar!/:1.3.8]

at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:139) ~[rxjava-1.3.8.jar!/:1.3.8]

at org.web3j.protocol.core.filters.LogFilter.process(LogFilter.java:39) ~[core-3.6.0.jar!/:na]

at org.web3j.protocol.core.filters.Filter.pollFilter(Filter.java:129) ~[core-3.6.0.jar!/:na]

at org.web3j.protocol.core.filters.Filter.lambda$run$25(Filter.java:83) ~[core-3.6.0.jar!/:na]

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_222]

at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[na:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_222]

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[na:1.8.0_222]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_222]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_222]

at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222]

Caused by: net.consensys.eventeum.chain.converter.TypeConversionException: Unsupported type: bool

at net.consensys.eventeum.chain.converter.Web3jEventParameterConverter.convert(Web3jEventParameterConverter.java:53) ~[eventeum-core-0.7.0-RELEASE.jar!/:0.7.0-RELEASE]

at net.consensys.eventeum.chain.converter.Web3jEventParameterConverter.convert(Web3jEventParameterConverter.java:21) ~[eventeum-core-0.7.0-RELEASE.jar!/:0.7.0-RELEASE]

at net.consensys.eventeum.chain.factory.DefaultContractEventDetailsFactory.lambda$typeListToParameterList$0(DefaultContractEventDetailsFactory.java:78) ~[eventeum-core-0.7.0-RELEASE.jar!/:0.7.0-RELEASE]

at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_222]

at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382) ~[na:1.8.0_222]

at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222]

at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_222]

at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_222]

at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222]

at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566) ~[na:1.8.0_222]

at net.consensys.eventeum.chain.factory.DefaultContractEventDetailsFactory.typeListToParameterList(DefaultContractEventDetailsFactory.java:79) ~[eventeum-core-0.7.0-RELEASE.jar!/:0.7.0-RELEASE]

at net.consensys.eventeum.chain.factory.DefaultContractEventDetailsFactory.createEventDetails(DefaultContractEventDetailsFactory.java:42) ~[eventeum-core-0.7.0-RELEASE.jar!/:0.7.0-RELEASE]

at net.consensys.eventeum.chain.service.Web3jService.lambda$registerEventListener$0(Web3jService.java:109) ~[eventeum-core-0.7.0-RELEASE.jar!/:0.7.0-RELEASE]

at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39) ~[rxjava-1.3.8.jar!/:1.3.8]

at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134) ~[rxjava-1.3.8.jar!/:1.3.8]

... 10 common frames omitted

2020-04-06 12:17:11.096 [pool-3-thread-1] ERROR org.web3j.protocol.core.filters.Filter: lambda$run$25 - Error sending request

Duplicate events when re-start eventeum

In our test of Eventeum, we start to listen to events from our node and when we restart Eventeum, we receive again the events of the last block.

Surfing in your code, in DefaultEventBlockManagementService.java we locate that: The highest block from the event specification is obtained from BBDD and returned as is in the method getLatestBlockForEvent.

The simplest solution is to add 1 to the block number obtained from BBDD and change the method name to getBlockNumberForScanEvent.

No contract events

Hello this is more a support question rather than an issue.
I am testing eventeum with ganache-cli and I am not sure if this is supported.
I can see the blocks events but not the contract events. The event is emitted, because with truffle I can see that the transaction response includes the properly emitted event.
In Kafka I have the following topics

__consumer_offsets
block-events
contract-events
filter-events
filter-events-dlteventeum
filter-events-erreventeum
filter-eventsnull

However the only one with messages is block-events which is emitted every time I perform a transaction (this is expected).
The configuration for eventeum is the default. And the version is the release 0.4 I tried with the latest from master but got same issue.
Truffle version
Ganache CLI v6.2.5 (ganache-core: 2.3.3)
Truffle v5.0.0 (core: 5.0.0)
MacOS version 10.14.2 (18C54) Mohave
Any help will be greatly appreciated.

Contract events not being emitted with ganache-cli

I'm having an issues subscribing to contract events using Eventeum and ganache-cli.

I can see and subscribe to block events and successfully register and delete contract events but I don't get any notifications when they are raised.

my Event looks like this :
event PaymentScheduleCreated( bytes32 id, uint paymentLeeway, address owner, address destination, uint subscriptionAmount );

And I subscribe like this :
curl -X POST \ http://localhost:8060/api/rest/v1/event-filter \ -H 'Cache-Control: no-cache' \ -H 'Content-Type: application/json' \ -H 'Postman-Token: 616712a3-bf11-bbf5-b4ac-b82835779d51' \ -d '{ "id": "PaymentScheduleCreated", "contractAddress": "0x4a936E7Ce91FD8A47bbe9aeBFabE15AA13A11232", "eventSpecification": { "eventName": "PaymentScheduleCreated", "nonIndexedParameterDefinitions": [ {"position": 0, "type": "BYTES32"}, {"position": 1, "type": "UINT256"}, {"position": 2, "type": "ADDRESS"}, {"position": 3, "type": "ADDRESS"}, {"position": 4, "type": "UINT256"}] } }'

Which returns
{"id":"PaymentScheduleCreated"}

And I see this in the logs:

Already registered contract event filter with id: PaymentScheduleCreated

Am I missing something?

Cannot consume messages when using kafka secured connection

When kafka is configured through a secure connection (see pull request for the fix: #87) , the consumer does not get all the configuration because it does not use the configured kafka listener connection factory (see KafkaConfiguration.eventeumConsumerFactory and KafkaConfiguration.defaultConsumerFactory). You can find the exception stack down below:

I have investigated the issue, it seems that the kafka dead letter component is not able to get the configured kafka factory (see EventeumServerConfiguration).

2019-10-07 10:08:14.321 [main] DEBUG org.apache.kafka.common.network.Selector: pollSelectionKeys - [Consumer clientId=consumer-1, groupId=dlt] Connection with <MY_KAFKA_BROKERS> disconnected
java.io.EOFException: null
	at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:119) ~[kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:335) ~[kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:296) ~[kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.common.network.Selector.attemptRead(Selector.java:560) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:496) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.common.network.Selector.poll(Selector.java:425) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:510) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:271) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:242) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:218) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.clients.consumer.internals.Fetcher.getTopicMetadata(Fetcher.java:274) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.partitionsFor(KafkaConsumer.java:1774) [kafka-clients-2.0.0.jar:na]
	at org.apache.kafka.clients.consumer.KafkaConsumer.partitionsFor(KafkaConsumer.java:1742) [kafka-clients-2.0.0.jar:na]
	at org.springframework.kafka.listener.AbstractMessageListenerContainer.checkTopics(AbstractMessageListenerContainer.java:275) [spring-kafka-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.kafka.listener.ConcurrentMessageListenerContainer.doStart(ConcurrentMessageListenerContainer.java:135) [spring-kafka-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.kafka.listener.AbstractMessageListenerContainer.start(AbstractMessageListenerContainer.java:257) [spring-kafka-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.kafka.config.KafkaListenerEndpointRegistry.startIfNecessary(KafkaListenerEndpointRegistry.java:289) [spring-kafka-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.kafka.config.KafkaListenerEndpointRegistry.start(KafkaListenerEndpointRegistry.java:238) [spring-kafka-2.2.0.RELEASE.jar:2.2.0.RELEASE]
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182) [spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53) [spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) [spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) [spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) [spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879) [spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) [spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at net.consensys.eventeumserver.Application.main(Application.java:15) [classes/:na]	

2019-10-07 10:10:01.924 [main] DEBUG org.apache.kafka.clients.NetworkClient: handleDisconnections - [Consumer clientId=consumer-1, groupId=dlt] Node -1 disconnected.
2019-10-07 10:10:01.924 [main] DEBUG org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient: fireCompletion - [Consumer clientId=consumer-1, groupId=dlt] Cancelled request with header RequestHeader(apiKey=METADATA, apiVersion=6, clientId=consumer-1, correlationId=8) due to node -1 being disconnected
2019-10-07 10:10:02.026 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available
2019-10-07 10:10:02.128 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available
2019-10-07 10:10:02.229 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available
2019-10-07 10:10:02.333 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available
2019-10-07 10:10:02.438 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available
2019-10-07 10:10:02.538 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available
2019-10-07 10:10:02.639 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available
2019-10-07 10:10:02.741 [main] DEBUG org.apache.kafka.clients.NetworkClient: maybeUpdate - [Consumer clientId=consumer-1, groupId=dlt] Give up sending metadata request since no node is available	


Bug when sending Bytes32 (hex form)

Hello eventeum people,
The smart contract is like that:
image

I need to keep a bytes32 number into foo.

Right case:
If the number is created from a string like:
let hex = web3.utils.stringToHex("Nick") // => "0x4e69636b00000000000000000000000000000000000000000000000000000000"
send (hex)
Then from Kafka we will get this:
image
This string ("Nick") can be convert back to our original hex number by:
web3.utils.stringToHex(msg.details.nonIndexedParameters[0].value))

Wrong case:
If the number is just a random like:
"0x177336d08543ac4b000000000000000000000000000000000000000000000000"
On Kafka we will get an unreadable string, which CAN NOT convert back to our original number
web3.utils.stringToHex(msg.details.nonIndexedParameters[0].value))
image
As you see in the picture:
It's is not "177336d08543ac4b"

Think that the error is when you convert from bytes32 to string and broadcast to kafka

Sincerely,
Quang, VU

Eventeum does not startup if one of the nodes is down

Hi there!

We are testing the multinetwork configuration and it happens that if one of the configured nodes is down, eventeum is not starting up. This is tested agains the master version.

When starting the web3Service here, it tries to connect and since it is failing eventeum stops.

We think it will be great that the service will not stop if some nodes for some reason are not reachable.

Thank you in advance.

Invalid JPA mapping of CorrelationIdStrategy in ContractEventFilter entity

The current mapping of CorrelationIdStrategy in ContractEventFilter does not work as Hibernate is not able to instantiate an interface annotated with Embedded. (see exception at the bottom)

Integration test pass as the field CorrelationIdStrategy is never set when creating/persisting instances of ContractEventFilter.

I have workaround the issue on my side by making CorrelationIdStrategy abstract and derived NonIndexedParameterCorrelationIdStrategy and IndexedParameterCorrelationIdStrategy from that class but it changes the spirit of the design a little bit:

  • Workaround
@Document
@Entity
@Data
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ContractEventFilter {

    @Id
    private String id;

    private String contractAddress;

    private String node = Constants.DEFAULT_NODE_NAME;

    @Embedded
    private ContractEventSpecification eventSpecification;

    @OneToOne(cascade = CascadeType.ALL)
    private CorrelationIdStrategy correlationIdStrategy;

    private BigInteger startBlock;
}

@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="parameter_type",
    discriminatorType = DiscriminatorType.STRING)
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.EXISTING_PROPERTY,
        property = "type",
        visible = true)
@JsonSubTypes({
        @JsonSubTypes.Type(value = IndexedParameterCorrelationIdStrategy.class,
            name = IndexedParameterCorrelationIdStrategy.TYPE),
        @JsonSubTypes.Type(value = NonIndexedParameterCorrelationIdStrategy.class,
                name = NonIndexedParameterCorrelationIdStrategy.TYPE)})
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@NoArgsConstructor
public abstract class CorrelationIdStrategy {

    @Id
    @GeneratedValue
    protected int id;

    protected int parameterIndex;

    protected String type;

    protected CorrelationIdStrategy(String type, int parameterIndex) {
        this.type = type;
        this.parameterIndex = parameterIndex;
    }

    @JsonIgnore
    @Transient
    public abstract String getCorrelationId(ContractEventDetails contractEvent);
}

@Entity
@DiscriminatorValue("INDEXED_PARAMETER")
@NoArgsConstructor
public class IndexedParameterCorrelationIdStrategy extends CorrelationIdStrategy {

    public static final String TYPE = "INDEXED_PARAMETER";

    public IndexedParameterCorrelationIdStrategy(int parameterIndex) {
        super(TYPE, parameterIndex);
    }

    @Override
    public String getCorrelationId(ContractEventDetails contractEvent) {
        return contractEvent
                .getIndexedParameters()
                .get(getParameterIndex())
                .getValueString();
    }
}

@Entity
@DiscriminatorValue("NON_INDEXED_PARAMETER")
@NoArgsConstructor
public class NonIndexedParameterCorrelationIdStrategy extends CorrelationIdStrategy{

    public static final String TYPE = "NON_INDEXED_PARAMETER";

    public NonIndexedParameterCorrelationIdStrategy(int parameterIndex) {
        super(TYPE, parameterIndex);
    }

    @Override
    public String getCorrelationId(ContractEventDetails contractEvent) {
        return contractEvent
                .getNonIndexedParameters()
                .get(getParameterIndex())
                .getValueString();
    }
}

- Invalid mapping exceptions

2019-10-04 15:25:39.027 [main] ERROR org.springframework.boot.SpringApplication: reportFailure - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chainBootstrapper' defined in file [/Users/selim/git/consensys/eventeum/core/target/classes/net/consensys/eventeum/chain/ChainBootstrapper.class]: Invocation of init method failed; nested exception is org.springframework.orm.jpa.JpaSystemException: Cannot instantiate abstract class or interface:  : net.consensys.eventeum.dto.event.filter.correlationId.CorrelationIdStrategy; nested exception is org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : net.consensys.eventeum.dto.event.filter.correlationId.CorrelationIdStrategy
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.0.RELEASE.jar:2.1.0.RELEASE]
	at net.consensys.eventeumserver.Application.main(Application.java:15) [classes/:na]
Caused by: org.springframework.orm.jpa.JpaSystemException: Cannot instantiate abstract class or interface:  : net.consensys.eventeum.dto.event.filter.correlationId.CorrelationIdStrategy; nested exception is org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : net.consensys.eventeum.dto.event.filter.correlationId.CorrelationIdStrategy
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:351) ~[spring-orm-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:253) ~[spring-orm-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527) ~[spring-orm-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61) ~[spring-tx-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242) ~[spring-tx-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153) ~[spring-tx-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:135) ~[spring-data-jpa-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at com.sun.proxy.$Proxy134.save(Unknown Source) ~[na:na]
	at net.consensys.eventeum.service.DefaultSubscriptionService.saveContractEventFilter(DefaultSubscriptionService.java:223) ~[classes/:na]
	at net.consensys.eventeum.service.DefaultSubscriptionService.registerContractEventFilter(DefaultSubscriptionService.java:91) ~[classes/:na]
	at net.consensys.eventeum.chain.ChainBootstrapper.registerFilter(ChainBootstrapper.java:60) ~[classes/:na]
	at net.consensys.eventeum.chain.ChainBootstrapper.lambda$registerFilters$2(ChainBootstrapper.java:55) ~[classes/:na]
	at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_221]
	at net.consensys.eventeum.chain.ChainBootstrapper.registerFilters(ChainBootstrapper.java:55) ~[classes/:na]
	at net.consensys.eventeum.chain.ChainBootstrapper.afterPropertiesSet(ChainBootstrapper.java:45) ~[classes/:na]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	... 16 common frames omitted
Caused by: org.hibernate.InstantiationException: Cannot instantiate abstract class or interface:  : net.consensys.eventeum.dto.event.filter.correlationId.CorrelationIdStrategy
	at org.hibernate.tuple.PojoInstantiator.instantiate(PojoInstantiator.java:79) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.tuple.component.AbstractComponentTuplizer.instantiate(AbstractComponentTuplizer.java:84) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.type.ComponentType.instantiate(ComponentType.java:580) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.type.ComponentType.instantiate(ComponentType.java:586) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.type.ComponentType.replace(ComponentType.java:527) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.type.TypeHelper.replace(TypeHelper.java:163) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.event.internal.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:393) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.event.internal.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:327) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:170) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:69) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:901) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:887) ~[hibernate-core-5.3.7.Final.jar:5.3.7.Final]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_221]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_221]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_221]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_221]
	at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:308) ~[spring-orm-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at com.sun.proxy.$Proxy128.merge(Unknown Source) ~[na:na]
	at org.springframework.data.jpa.repository.support.SimpleJpaRepository.save(SimpleJpaRepository.java:492) ~[spring-data-jpa-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_221]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_221]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_221]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_221]
	at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:359) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:200) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:644) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:608) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$invoke$3(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.1.2.RELEASE.jar:5.1.2.RELEASE]
	... 34 common frames omitted


Add block timestamp to contract events

Hey there!

Currently in our use case we would like to store the block timestamp of a contract event. Since we do not have that block timestamp when is creating the event in this factory.

We decided to ask for the block info when having the block number here: https://github.com/ConsenSys/eventeum/blob/master/core/src/main/java/net/consensys/eventeum/chain/service/Web3jService.java#L100

That means that every time that we receive a contract event in that observable we call the function this.web3j.ethGetBlockByNumber to get the block information so we will receive the timestamp.

We wanted to share with you @craigwilliams84 this solution and discuss if you think is a good approach or you have other thing in mind.

Best regards and thanks in advance for this great library!

Add support for a DB backed event store

Currently Eventeum depends on an external REST service event store. It would make it easy to integrate if it didn't have this dependency and instead supports a db (mongoDB) event store.

Eventeum config for reducing load on GETH

Hello,
We are using Eventeum for monitoring transactions, our contracts, and ERC20 Tokens too. When we tried to add 20+ token into Eventeum our Ethereum node started struggling. Currently, we have 8c/16Gb server config and CPU load is 95-100% and for this reason, flowable and subscriptions are restarting and we are losing sync state. Can you help us configuring Eventeum to lower the load on the node or if config is well organized can you tell us minimum requirements for the server to serve our purpose without any downtime.
In regard to that our system will grow to 100+ ERC20 tokens.

server:
  tomcat:
    uri-encoding: UTF-8
  port: 8060

logging:
  level:
    org.springframework.web: ERROR
    net.consensys: DEBUG
    net.consensys.configs: ERROR
  pattern:
    console: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5p %c: %M - %m%n"
    file: "%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5p %c: %M - %m%n"
  file: /logs/application.log

ethereum:
  nodes:
    - name: default
      url: ${ETHEREUM_NODE_URL:http://127.0.0.1:8545}
      blockStrategy: POLL
      syncingThreshold: 100
      healthcheckInterval: 3000
  healthcheck:
    pollInterval: 2000
  blockStrategy: POLL

ether:
  node:
    url: http://127.0.0.1:8545
eventStore:
  type: DB
  url: http://localhost:8081/api/rest/v1
  eventPath: /event
  latestBlockPath: /latestblock

database:
  type: MONGO

broadcaster:
  type: KAFKA
  cache:
    expirationMillis: 6000000
  event:
    confirmation:
      numBlocksToWait: 1
      numBlocksToWaitForMissingTx: 100
      numBlocksToWaitBeforeInvalidating: 2
  multiInstance: false
  enableBlockNotifications: true

# For Kafka
zookeeper:
  address: ${ZOOKEEPER_ADDRESS:localhost:2181}
kafka:
  bootstrap:
    addresses: ${KAFKA_ADDRESSES:localhost:9092}
  topic:
    contractEvents: contract-events
    blockEvents: block-events
    eventeumEvents: eventeum-events
    transactionEvents: transaction-events

    partitions: 1
    replicationSets: 1

management:
  endpoints:
    web.base-path: /monitoring
    enabled-by-default: false
    web.exposure.include: "*"
  endpoint:
    health:
      enabled: true
      show-details: always
    metrics:
      enabled: false
    prometheus:
      enabled: false
  metrics:
    export:
      prometheus:
        enabled: false

Missing library compiling with openjdk-11

Description
Running the following Maven command I throws an Exception due to a missing library:

$>mvn clean package -X
.....
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.code.TypeTags
    at java.lang.ClassLoader.findClass (ClassLoader.java:711)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:566)
    at lombok.launch.ShadowClassLoader.loadClass (ShadowClassLoader.java:418)

System details

Java version

$> java --version
openjdk 11.0.6 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)

OS version

$> uname -a
Linux ggarrido-laptop 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Eventeum is not trying to reconnect after websocket connection drops

I am using latest version pulled from master yesterday (09/25/2019)

My configuration is using Infura with Websocket connection with PUBSUB.

Error message where Eventeum just kind of doesn't do anything after:
eventeum_1 | 2019-09-24 23:11:45.879 [http-nio-8060-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Tomcat].[localhos est processing failed; nested exception is org.java_websocket.exceptions.WebsocketNotConnectedException] with root cause eventeum_1 | org.java_websocket.exceptions.WebsocketNotConnectedException: null eventeum_1 | at org.java_websocket.WebSocketImpl.send(WebSocketImpl.java:608) ~[Java-WebSocket-1.3.8.jar!/:na] eventeum_1 | at org.java_websocket.WebSocketImpl.send(WebSocketImpl.java:585) ~[Java-WebSocket-1.3.8.jar!/:na] eventeum_1 | at org.java_websocket.client.WebSocketClient.send(WebSocketClient.java:309) ~[Java-WebSocket-1.3.8.jar!/:na] eventeum_1 | at org.web3j.protocol.websocket.WebSocketService.sendRequest(WebSocketService.java:165) ~[core-3.6.0.jar!/:na eventeum_1 | at org.web3j.protocol.websocket.WebSocketService.sendAsync(WebSocketService.java:154) ~[core-3.6.0.jar!/:na] eventeum_1 | at org.web3j.protocol.websocket.WebSocketService.send(WebSocketService.java:132) ~[core-3.6.0.jar!/:na] eventeum_1 | at org.web3j.protocol.core.Request.send(Request.java:71) ~[core-3.6.0.jar!/:na] eventeum_1 | at net.consensys.eventeum.chain.service.Web3jService.getCurrentBlockNumber(Web3jService.java:178) ~[eventeum- eventeum_1 | at net.consensys.eventeum.chain.service.DefaultEventBlockManagementService.getLatestBlockForEvent(DefaultEven eventeum_1 | at net.consensys.eventeum.chain.service.Web3jService.getStartBlockForEventFilter(Web3jService.java:212) ~[eve eventeum_1 | at net.consensys.eventeum.chain.service.Web3jService.registerEventListener(Web3jService.java:91) ~[eventeum-c eventeum_1 | at net.consensys.eventeum.service.DefaultSubscriptionService.registerContractEventFilter(DefaultSubscriptionS eventeum_1 | at net.consensys.eventeum.service.DefaultSubscriptionService.registerContractEventFilter(DefaultSubscriptionS eventeum_1 | at net.consensys.eventeum.service.DefaultSubscriptionService.registerContractEventFilter(DefaultSubscriptionS eventeum_1 | at net.consensys.eventeum.endpoint.ContractEventFilterEndpoint.addEventFilter(ContractEventFilterEndpoint.jav eventeum_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_222] eventeum_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_222] eventeum_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_222] eventeum_1 | at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_222] eventeum_1 | at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:215) ~[ eventeum_1 | at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java eventeum_1 | at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(Servle eventeum_1 | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(Req eventeum_1 | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestM eventeum_1 | at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapte eventeum_1 | at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) ~[spring-webmvc- eventeum_1 | at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) ~[spring-webmvc-5. eventeum_1 | at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:998) ~[spring-webmvc eventeum_1 | at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:901) ~[spring-webmvc-5.1.2.R eventeum_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) ~[tomcat-embed-core-9.0.12.jar!/:9.0.12] eventeum_1 | at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:875) ~[spring-webmvc-5.1.2. eventeum_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.12.jar!/:9.0.12] eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-c eventeum_1 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.12.jar eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-c eventeum_1 | at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[sprin eventeum_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5 eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-c eventeum_1 | at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) ~[spring-web- eventeum_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5 eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-c eventeum_1 | at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[s eventeum_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5 eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-c eventeum_1 | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) eventeum_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5 eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat eventeum_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-c eventeum_1 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-9. eventeum_1 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0. eventeum_1 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [tomcat-embed-core- eventeum_1 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.12.ja eventeum_1 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.12.jar eventeum_1 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.12 eventeum_1 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat-embed-core-9.0.12.jar! eventeum_1 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-embed-core-9.0.12.jar!/ eventeum_1 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-9.0.12 eventeum_1 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770) [tomcat-embed-core eventeum_1 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) [tomcat-embed-core-9.0 eventeum_1 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.12. eventeum_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_222] eventeum_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_222] eventeum_1 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0. eventeum_1 | at java.lang.Thread.run(Thread.java:748) [na:1.8.0_222]

BlockEvents Kafka Topic not created

Hi there,

First off, thanks for this awesome project. I've been looking around and it seems like the only open source project out there built for serious event processing.

I'm running this locally with docker-compose and connecting Infura via websockets. Here are some details about my environment:

 java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

I used the following ENV variables for eventeum in docker-compose:

    environment:
      ETHEREUM_BLOCKSTRATEGY: PUBSUB
      ETHEREUM_NODE_URL: wss://mainnet.infura.io/ws

I'm running with docker-compose up and I also attached to the kafka container and tried to list the topics

confluent@bfc1895ae4c6:/$ kafka-topics --list --zookeeper zookeeper:2181
__consumer_offsets
filter-events-dlteventeum

Based on the docs it seems that the block-events topic should be created automatically. Am I missing something ?

Thanks a lot!

Supporting for Bytes16

Hello Eventeum's people,
To save the cost working with ETH, we also use Bytes16 (which is useful for hashes).
Currently, Eventeum does not support this type. May I know do you have the plan whether to support it in the near future?
You know, if we switch to Bytes32, we will get real problem doubling our cost.
Thank you.

Sincerely,
Quang, VU

Deploying eventeum image from docker hub

Hi, I deployed the eventeum/eventeum image from docker hub to a container instance on azure. The server fails to start and shows an issue connecting to mongodb. Trace below - has anyone faced this issue ? Any way to resolve this ?

Starting eventeum with command: java -jar eventeum-server.jar
2020-07-01 09:49:28.278 INFO 8 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f260d5d9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.1.0.RELEASE)

2020-07-01 09:49:28.781 [main] INFO net.consensys.eventeumserver.Application: logStartupProfileInfo - No active profile set, falling back to default profiles: default
2020-07-01 09:49:30.879 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate: multipleStoresDetected - Multiple Spring Data modules found, entering strict repository configuration mode!
2020-07-01 09:49:30.880 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate: registerRepositoriesIn - Bootstrapping Spring Data repositories in DEFAULT mode.
2020-07-01 09:49:31.567 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate: registerRepositoriesIn - Finished Spring Data repository scanning in 681ms. Found 4 repository interfaces.
2020-07-01 09:49:33.898 [main] INFO org.springframework.cloud.context.scope.GenericScope: setSerializationId - BeanFactory id=7ffb1eab-8544-3914-b6a9-a86ff97d87fb
2020-07-01 09:49:34.211 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$a9f8e45f] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.290 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration' of type [org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration$$EnhancerBySpringCGLIB$$9cb2910a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.381 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'org.springframework.retry.annotation.RetryConfiguration' of type [org.springframework.retry.annotation.RetryConfiguration$$EnhancerBySpringCGLIB$$cc0a6b01] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.510 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'deadLetterSettings' of type [net.consensys.kafkadl.internal.DeadLetterSettings] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.515 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'net.consensys.kafkadl.internal.beanregistration.KafkaDeadLetterConfiguration' of type [net.consensys.kafkadl.internal.beanregistration.KafkaDeadLetterConfiguration$$EnhancerBySpringCGLIB$$c1a6edc7] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.587 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'eventeumKafkaSettings' of type [net.consensys.eventeum.integration.KafkaSettings] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.594 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'eventeumKafkaConfiguration' of type [net.consensys.eventeum.config.KafkaConfiguration$$EnhancerBySpringCGLIB$$910dd4de] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.609 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'eventeumProducerFactory' of type [org.springframework.kafka.core.DefaultKafkaProducerFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.672 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'eventeumKafkaTemplate' of type [org.springframework.kafka.core.KafkaTemplate] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.686 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'deadLetterTopicNameConvention' of type [net.consensys.kafkadl.internal.DeadLetterTopicNameConvention] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.688 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'errorTopicForwarder' of type [net.consensys.kafkadl.internal.forwarder.ErrorTopicForwarder] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.690 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'kafkaProperties' of type [net.consensys.kafkadl.internal.KafkaProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.692 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'recoveryCallback' of type [net.consensys.kafkadl.internal.failure.DeadLetterRecoveryCallback] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.700 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'deadLetterRetryTemplate' of type [org.springframework.retry.support.RetryTemplate] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:34.766 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker: postProcessAfterInitialization - Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$f260d5d9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-07-01 09:49:35.593 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer: initialize - Tomcat initialized with port(s): 8060 (http)
2020-07-01 09:49:35.675 [main] INFO org.apache.catalina.core.StandardService: log - Starting service [Tomcat]
2020-07-01 09:49:35.676 [main] INFO org.apache.catalina.core.StandardEngine: log - Starting Servlet Engine: Apache Tomcat/9.0.12
2020-07-01 09:49:35.690 [main] INFO org.apache.catalina.core.AprLifecycleListener: log - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2020-07-01 09:49:35.898 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]: log - Initializing Spring embedded WebApplicationContext
2020-07-01 09:49:37.183 [main] INFO org.mongodb.driver.cluster: info - Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=5000}
2020-07-01 09:49:37.302 [cluster-ClusterId{value='5efc5c31aa07110008f24add', description='null'}-localhost:27017] INFO org.mongodb.driver.cluster: info - Exception in monitor thread while connecting to server localhost:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:67) ~[mongodb-driver-core-3.8.2.jar!/:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:126) ~[mongodb-driver-core-3.8.2.jar!/:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.8.2.jar!/:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_232]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_232]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_232]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_232]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_232]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_232]
at java.net.Socket.connect(Socket.java:607) ~[na:1.8.0_232]
at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:64) ~[mongodb-driver-core-3.8.2.jar!/:na]
at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:62) ~[mongodb-driver-core-3.8.2.jar!/:na]
... 3 common frames omitted
2020-07-01 09:49:37.966 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean: configure - Mapping filter: 'characterEncodingFilter' to: [/]
2020-07-01 09:49:37.966 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean: configure - Mapping filter: 'webMvcMetricsFilter' to: [/
]
2020-07-01 09:49:37.967 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean: configure - Mapping filter: 'hiddenHttpMethodFilter' to: [/]
2020-07-01 09:49:37.967 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean: configure - Mapping filter: 'formContentFilter' to: [/
]
2020-07-01 09:49:37.967 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean: configure - Mapping filter: 'requestContextFilter' to: [/]
2020-07-01 09:49:37.968 [main] INFO org.springframework.boot.web.servlet.FilterRegistrationBean: configure - Mapping filter: 'httpTraceFilter' to: [/
]
2020-07-01 09:49:37.968 [main] INFO org.springframework.boot.web.servlet.ServletRegistrationBean: addRegistration - Servlet dispatcherServlet mapped to [/]
2020-07-01 09:49:39.267 [main] INFO org.mongodb.driver.cluster: info - Cluster description not yet available. Waiting for 30000 ms before timing out
2020-07-01 09:50:09.273 [main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext: refresh - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chainBootstrapper' defined in URL [jar:file:/eventeum-server.jar!/BOOT-INF/lib/eventeum-core-0.8.0-RELEASE.jar!/net/consensys/eventeum/chain/ChainBootstrapper.class]: Invocation of init method failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
2020-07-01 09:50:09.282 [main] INFO org.apache.catalina.core.StandardService: log - Stopping service [Tomcat]
2020-07-01 09:50:09.365 [main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener: logMessage -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-07-01 09:50:09.370 [main] ERROR org.springframework.boot.SpringApplication: reportFailure - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chainBootstrapper' defined in URL [jar:file:/eventeum-server.jar!/BOOT-INF/lib/eventeum-core-0.8.0-RELEASE.jar!/net/consensys/eventeum/chain/ChainBootstrapper.class]: Invocation of init method failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
at net.consensys.eventeumserver.Application.main(Application.java:15) [classes!/:0.8.0-RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [eventeum-server.jar:0.8.0-RELEASE]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [eventeum-server.jar:0.8.0-RELEASE]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [eventeum-server.jar:0.8.0-RELEASE]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [eventeum-server.jar:0.8.0-RELEASE]
Caused by: org.springframework.dao.DataAccessResourceFailureException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]; nested exception is com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:90) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.mongodb.core.MongoTemplate.potentiallyConvertRuntimeException(MongoTemplate.java:2750) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:2660) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2380) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2363) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:820) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.findAll(SimpleMongoRepository.java:360) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.mongodb.repository.support.SimpleMongoRepository.findAll(SimpleMongoRepository.java:194) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]
at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:359) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:200) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:644) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:608) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$invoke$3(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at com.sun.proxy.$Proxy134.findAll(Unknown Source) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_232]
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at com.sun.proxy.$Proxy134.findAll(Unknown Source) ~[na:na]
at net.consensys.eventeum.chain.ChainBootstrapper.afterPropertiesSet(ChainBootstrapper.java:41) ~[eventeum-core-0.8.0-RELEASE.jar!/:0.8.0-RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
... 24 common frames omitted
Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}]
at com.mongodb.internal.connection.BaseCluster.getDescription(BaseCluster.java:179) ~[mongodb-driver-core-3.8.2.jar!/:na]
at com.mongodb.internal.connection.SingleServerCluster.getDescription(SingleServerCluster.java:41) ~[mongodb-driver-core-3.8.2.jar!/:na]
at com.mongodb.client.internal.MongoClientDelegate.getConnectedClusterDescription(MongoClientDelegate.java:136) ~[mongodb-driver-3.8.2.jar!/:na]
at com.mongodb.client.internal.MongoClientDelegate.createClientSession(MongoClientDelegate.java:94) ~[mongodb-driver-3.8.2.jar!/:na]
at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.getClientSession(MongoClientDelegate.java:249) ~[mongodb-driver-3.8.2.jar!/:na]
at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:172) ~[mongodb-driver-3.8.2.jar!/:na]
at com.mongodb.client.internal.MongoIterableImpl.execute(MongoIterableImpl.java:132) ~[mongodb-driver-3.8.2.jar!/:na]
at com.mongodb.client.internal.MongoIterableImpl.iterator(MongoIterableImpl.java:86) ~[mongodb-driver-3.8.2.jar!/:na]
at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:2643) ~[spring-data-mongodb-2.1.2.RELEASE.jar!/:2.1.2.RELEASE]
... 63 common frames omitted

MongoDB and Ethereum Node Connection Refused

Hi. I m trying to run the eventeum in docker. I m running separate instances of mongodb, kafka, zookeeper and ethereum node in my local system, but when i start the eventeum in docker, the spring boot is not able to make connection with mongodb. I get the following error
Also, the connection to ethereum node is not established as well based on the error logs. Can you please help with this issue.

2019-07-02 07:41:26.970 [cluster-ClusterId{value='5d1b0aa646e0fb00011be39a', description='null'}-localhost:27017] INFO  org.mongodb.driver.cluster: info - Exception in monitor thread while connecting to server localhost:27017
com.mongodb.MongoSocketOpenException: Exception opening socket
	at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:67) ~[mongodb-driver-core-3.8.2.jar!/:na]
	at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:126) ~[mongodb-driver-core-3.8.2.jar!/:na]
	at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.8.2.jar!/:na]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_212]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_212]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_212]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_212]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_212]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_212]
	at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_212]
	at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:64) ~[mongodb-driver-core-3.8.2.jar!/:na]
	at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:62) ~[mongodb-driver-core-3.8.2.jar!/:na]
	... 3 common frames omitted
2019-07-02 07:41:27.637 [main] INFO  net.consensys.eventeum.chain.service.Web3jService: connect - Subscribing to block events
2019-07-02 07:41:27.837 [main] WARN  org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext: refresh - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultBlockchainServiceContainer' defined in URL [jar:file:/app.jar!/BOOT-INF/lib/eventeum-core-0.5.2-RELEASE.jar!/net/consensys/eventeum/chain/service/container/DefaultBlockchainServiceContainer.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultNodeServices': Cannot resolve reference to bean 'defaultWeb3jService' while setting bean property 'blockchainService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultWeb3jService': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.consensys.eventeum.chain.service.Web3jService]: Constructor threw exception; nested exception is rx.exceptions.OnErrorNotImplementedException: Error sending request
2019-07-02 07:41:27.845 [main] INFO  org.apache.catalina.core.StandardService: log - Stopping service [Tomcat]
2019-07-02 07:41:27.876 [main] INFO  org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener: logMessage - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-07-02 07:41:27.889 [main] ERROR org.springframework.boot.SpringApplication: reportFailure - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultBlockchainServiceContainer' defined in URL [jar:file:/app.jar!/BOOT-INF/lib/eventeum-core-0.5.2-RELEASE.jar!/net/consensys/eventeum/chain/service/container/DefaultBlockchainServiceContainer.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultNodeServices': Cannot resolve reference to bean 'defaultWeb3jService' while setting bean property 'blockchainService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultWeb3jService': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.consensys.eventeum.chain.service.Web3jService]: Constructor threw exception; nested exception is rx.exceptions.OnErrorNotImplementedException: Error sending request
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:767) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1308) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1154) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.0.RELEASE.jar!/:2.1.0.RELEASE]
	at net.consensys.eventeumserver.Application.main(Application.java:12) [classes!/:0.5.2-RELEASE]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [app.jar:0.5.2-RELEASE]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [app.jar:0.5.2-RELEASE]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [app.jar:0.5.2-RELEASE]
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [app.jar:0.5.2-RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultNodeServices': Cannot resolve reference to bean 'defaultWeb3jService' while setting bean property 'blockchainService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultWeb3jService': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.consensys.eventeum.chain.service.Web3jService]: Constructor threw exception; nested exception is rx.exceptions.OnErrorNotImplementedException: Error sending request
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:378) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1648) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1400) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1455) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1419) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1310) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1197) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1166) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:855) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:758) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	... 27 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultWeb3jService': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.consensys.eventeum.chain.service.Web3jService]: Constructor threw exception; nested exception is rx.exceptions.OnErrorNotImplementedException: Error sending request
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:303) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:284) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1308) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1154) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:367) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	... 44 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.consensys.eventeum.chain.service.Web3jService]: Constructor threw exception; nested exception is rx.exceptions.OnErrorNotImplementedException: Error sending request
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:184) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:299) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	... 54 common frames omitted
Caused by: rx.exceptions.OnErrorNotImplementedException: Error sending request
	at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:386) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.util.InternalObservableUtils$ErrorNotImplementedAction.call(InternalObservableUtils.java:383) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.util.ActionSubscriber.onError(ActionSubscriber.java:44) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.observers.SafeSubscriber._onError(SafeSubscriber.java:153) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.observers.SafeSubscriber.onError(SafeSubscriber.java:115) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OperatorMerge$MergeSubscriber.reportError(OperatorMerge.java:266) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OperatorMerge$MergeSubscriber.checkTerminate(OperatorMerge.java:818) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OperatorMerge$MergeSubscriber.emitLoop(OperatorMerge.java:579) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OperatorMerge$MergeSubscriber.emit(OperatorMerge.java:568) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OperatorMerge$MergeSubscriber.onError(OperatorMerge.java:276) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OnSubscribeMap$MapSubscriber.onError(OnSubscribeMap.java:88) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.Observable.unsafeSubscribe(Observable.java:10334) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.Observable.subscribe(Observable.java:10423) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.Observable.subscribe(Observable.java:10390) ~[rxjava-1.3.8.jar!/:1.3.8]
	at rx.Observable.subscribe(Observable.java:10195) ~[rxjava-1.3.8.jar!/:1.3.8]
	at net.consensys.eventeum.chain.service.strategy.PollingBlockSubscriptionStrategy.subscribe(PollingBlockSubscriptionStrategy.java:20) ~[eventeum-core-0.5.2-RELEASE.jar!/:0.5.2-RELEASE]
	at net.consensys.eventeum.chain.service.Web3jService.connect(Web3jService.java:191) ~[eventeum-core-0.5.2-RELEASE.jar!/:0.5.2-RELEASE]
	at net.consensys.eventeum.chain.service.Web3jService.<init>(Web3jService.java:67) ~[eventeum-core-0.5.2-RELEASE.jar!/:0.5.2-RELEASE]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_212]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_212]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_212]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_212]
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172) ~[spring-beans-5.1.2.RELEASE.jar!/:5.1.2.RELEASE]
	... 56 common frames omitted
Caused by: org.web3j.protocol.core.filters.FilterException: Error sending request
	at org.web3j.protocol.core.filters.Filter.throwException(Filter.java:176) ~[core-3.6.0.jar!/:na]
	at org.web3j.protocol.core.filters.Filter.run(Filter.java:92) ~[core-3.6.0.jar!/:na]
	at org.web3j.protocol.rx.JsonRpc2_0Rx.run(JsonRpc2_0Rx.java:73) ~[core-3.6.0.jar!/:na]
	at org.web3j.protocol.rx.JsonRpc2_0Rx.lambda$ethBlockHashObservable$14(JsonRpc2_0Rx.java:46) ~[core-3.6.0.jar!/:na]
	at rx.Observable.unsafeSubscribe(Observable.java:10327) ~[rxjava-1.3.8.jar!/:1.3.8]
	... 71 common frames omitted
Caused by: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8545
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:225) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:149) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:195) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:121) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:100) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.RealCall.execute(RealCall.java:69) ~[okhttp-3.8.1.jar!/:na]
	at org.web3j.protocol.http.HttpService.performIO(HttpService.java:104) ~[core-3.6.0.jar!/:na]
	at org.web3j.protocol.Service.send(Service.java:34) ~[core-3.6.0.jar!/:na]
	at org.web3j.protocol.core.Request.send(Request.java:71) ~[core-3.6.0.jar!/:na]
	at org.web3j.protocol.core.filters.BlockFilter.sendRequest(BlockFilter.java:24) ~[core-3.6.0.jar!/:na]
	at org.web3j.protocol.core.filters.Filter.run(Filter.java:51) ~[core-3.6.0.jar!/:na]
	... 74 common frames omitted
Caused by: java.net.ConnectException: Connection refused (Connection refused)
	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_212]
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_212]
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_212]
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_212]
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_212]
	at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_212]
	at okhttp3.internal.platform.Platform.connectSocket(Platform.java:124) ~[okhttp-3.8.1.jar!/:na]
	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:223) ~[okhttp-3.8.1.jar!/:na]
	... 96 common frames omitted

i m exporting mongo and ethereum node connectiion like this
export SPRING_DATA_MONGODB_HOST=127.0.0.1:27017
export ETHEREUM_NODE_URL=http://127.0.0.1:8545

Compilation errors

Hello!

How are you guys actually compiling the Project?, there are many errors, and my Eclipse won't allow me to launch it, the only way I can launch is by compiling with Maven install, and issuing java -jar in the target directory

For example AbstractBlockSubscriptionStrategy line 75, log property doesn't exists as of reléase 0.7.0

Thank you in advance!

Not subscribing to Contract events while connecting to Infura

I have Eventeum pointing to Infura (Kovan network) and it is receiving the ‘New block mined’ events but not the contract events.

Here’s the contract-event configuration:
{
"id": "FactoryDeployedEvent",
"contractAddress": "0x78be72d09cca0b296eb32ac792707034865c3efd",
"eventSpecification": {
"eventName": "Deployed",
"nonIndexedParameterDefinitions": [
{"position": 0, "type": "ADDRESS"},
{"position": 1, "type": "UINT256"}] }
}

Here are the environment variables I am setting:
export SPRING_DATA_MONGODB_HOST=localhost:27017
export ZOOKEEPER_ADDRESS=localhost:2181
export KAFKA_ADDRESSES=localhost:9092
export ETHEREUM_NODES_BLOCKSTRATEGY=PUBSUB
export ETHEREUM_BLOCKSTRATEGY=PUBSUB
export ETHEREUM_NODE_URL=wss://kovan.infura.io/ws/v3/

I also tried setting the ETHEREUM_NODE_URL without the project id
export ETHEREUM_NODE_URL=wss://kovan.infura.io/ws

It works fine when I am connecting to Ganache but not able to get the contract events when connecting to Infura. It does works fine for a colleague of mine who is using the docker version. I am running the compiled version.

Any thoughts on what is going on ? Thanks

Receiving repeated events when node is back

Hello,

We have been experiencing a strange behaviour we would like to share with you guys to know your opinion about it.

The error was reproduced in master and also in last release.

We are working with a node that sometimes goes down and suddenly starts again, and eventeum is prepared for this, but we are hitting a race condition in the moment of the reconnection, this is what happens in steps:

Step 1: Eventeum working properly subscribed to one event and reading blocks.
Step 2: Node goes down
Step 3: The NodeHealthCheckService detects that and it is waiting for the reconnection
Step 4: Eventeum detects that node is online and it does:

  • Step 4.1: Unsuscribe all subcribers configured in the: DefaultSubscriptionService
  • Step 4.2: Subcribe them again.

So far so good, everything worked as expected.

The problem happens between when the node is back and the unsubscribe of all listeners happens.

Why?

The subscribers are still making requests using the rx library to the node. The filterId has disappeared already from the node because it has been restarted and that is not persisted.

In the web3j library exactly in this line: https://github.com/web3j/web3j/blob/v3.6.0/core/src/main/java/org/web3j/protocol/core/filters/Filter.java#L123

What it does is if the filter is not found, it recreates it, when recreating it, it is using the EthFilter configuration that this subscriber has in memory, this means that is the moment of the creation that subscriber. Because of that we are receiving repeated events since the last creation of the subscriber. (Cause blockNumber was outdated in memory at the time of the creation)

So all that happen between the node comes up and all subscriber are unsubscribed when the reconnection is detected.

The solution we propose is when detecting the node is down unsubscribe all subscribers and put them back when the node is up again. Why? We think there is not a real need of having them "working" if we already know the node is down. On the other hand, we see that in the web3j library they rebuild the filters when it detects that the filter does not exists. In case you are curious that was introduced here: hyperledger/web3j#614

What do you think about our solution?

We would gladly create a pull request or discuss with you other solutions to it.

Best.

The IoBuilders team.

Support INFURA.

Web3j now supports websocket connections, so it should be possible to enable Eventeum to connect to an INFURA node.

is it possible way to handle ordering events ?

Example:
Application service subscribe to Eventeum, Eventeum receive 100 async events.
Application service will be receive ordering events from one, then process it -> finish, then receive 2rd event and process -> finish , until 100 ( latest ) event.

INVALIDATED events on rinkeby infura network

Hey so I have set up eventeum on local parity and all works nicely, I tried to set it up on rinkeby network and it did work fine for a bit, but very soon I started to run into issues.

All my events get invalidated after 12 blocks
image

The blocks are not picked automatically, I have to submit transactions in order to move blocks into my consumer. Like you need to do on your local parity

I can't change the confirmation blocks as well ...
image

what I notice in eventum logs is that It keep throwing an error at block number 231
image (1)

Feature Request: Support SQL storage

Hi!

currently we can use Mongo to store events and configuration, but for some of our customers requirements we need to use SQL databases (Postgres and MS SQL Server more specifically).

Would it be possible to leverage Spring Data to add support for SQL databases storage? This would open the possibilities of integrating Eventeum more easily.

Thanks

Using Eventeum with multiple different applications

From my understanding, Eventeum will push all contract events to the same topic (contract-events) in Kafka. Let's say that I have applications A, B, and C which are completely different apps. Now, lets I have events A, B, and C which are for the above applications, and I register all three into Eventeum. How do I ensure that application A will only process event A, application B will only process event B, and application C will only process event C? Will I have to filter on the Kafka topic?

Unrecoverable Null Pointer Exception

Version: Building from master branch
Ethereum Node: Rinkeby WS Infura
Strategy: PUBSUB

Error:

io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.NullPointerException
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
        at io.reactivex.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:79)
        at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:69)
        at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.onNext(FlowableSubscribeOn.java:97)
        at io.reactivex.internal.operators.flowable.FlowableConcatArray$ConcatArraySubscriber.onNext(FlowableConcatArray.java:76)
        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmitScalar(FlowableFlatMap.java:234)
        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onNext(FlowableFlatMap.java:152)
        at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:547)
        at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.onNext(FlowableCreate.java:471)
        at org.web3j.protocol.core.filters.BlockFilter.process(BlockFilter.java:42)
        at org.web3j.protocol.core.filters.Filter.pollFilter(Filter.java:144)
        at org.web3j.protocol.core.filters.Filter.lambda$run$0(Filter.java:92)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at net.consensys.eventeum.chain.service.domain.wrapper.Web3jBlock.lambda$new$0(Web3jBlock.java:52)
        at org.modelmapper.internal.TypeMapImpl.addMappings(TypeMapImpl.java:236)
        at net.consensys.eventeum.chain.service.domain.wrapper.Web3jBlock.<init>(Web3jBlock.java:47)
        at net.consensys.eventeum.chain.service.strategy.PollingBlockSubscriptionStrategy.convertToEventeumBlock(PollingBlockSubscriptionStrategy.java:51)
        at net.consensys.eventeum.chain.service.strategy.PollingBlockSubscriptionStrategy.convertToEventeumBlock(PollingBlockSubscriptionStrategy.java:22)
        at net.consensys.eventeum.chain.service.strategy.AbstractBlockSubscriptionStrategy.triggerListeners(AbstractBlockSubscriptionStrategy.java:72)
        at net.consensys.eventeum.chain.service.strategy.PollingBlockSubscriptionStrategy.lambda$subscribe$0(PollingBlockSubscriptionStrategy.java:38)
        at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65)
        ... 16 more
Exception in thread "pool-3-thread-6" io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.lang.NullPointerException
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704)
        at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701)
        at io.reactivex.internal.subscribers.LambdaSubscriber.onError(LambdaSubscriber.java:79)
        at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:69)
        at io.reactivex.internal.operators.flowable.FlowableSubscribeOn$SubscribeOnSubscriber.onNext(FlowableSubscribeOn.java:97)
        at io.reactivex.internal.operators.flowable.FlowableConcatArray$ConcatArraySubscriber.onNext(FlowableConcatArray.java:76)
        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmitScalar(FlowableFlatMap.java:234)
        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.onNext(FlowableFlatMap.java:152)
        at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.drain(FlowableCreate.java:547)
        at io.reactivex.internal.operators.flowable.FlowableCreate$BufferAsyncEmitter.onNext(FlowableCreate.java:471)
        at org.web3j.protocol.core.filters.BlockFilter.process(BlockFilter.java:42)
        at org.web3j.protocol.core.filters.Filter.pollFilter(Filter.java:144)
        at org.web3j.protocol.core.filters.Filter.lambda$run$0(Filter.java:92)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
        at net.consensys.eventeum.chain.service.domain.wrapper.Web3jBlock.lambda$new$0(Web3jBlock.java:52)
        at org.modelmapper.internal.TypeMapImpl.addMappings(TypeMapImpl.java:236)
        at net.consensys.eventeum.chain.service.domain.wrapper.Web3jBlock.<init>(Web3jBlock.java:47)
        at net.consensys.eventeum.chain.service.strategy.PollingBlockSubscriptionStrategy.convertToEventeumBlock(PollingBlockSubscriptionStrategy.java:51)
        at net.consensys.eventeum.chain.service.strategy.PollingBlockSubscriptionStrategy.convertToEventeumBlock(PollingBlockSubscriptionStrategy.java:22)
        at net.consensys.eventeum.chain.service.strategy.AbstractBlockSubscriptionStrategy.triggerListeners(AbstractBlockSubscriptionStrategy.java:72)
        at net.consensys.eventeum.chain.service.strategy.PollingBlockSubscriptionStrategy.lambda$subscribe$0(PollingBlockSubscriptionStrategy.java:38)
        at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65)
        ... 16 more

Add a GET endpoint to list filter subscriptions

A get endpoint to query the current filter subscriptions can be very valuable, when doing troubleshooting or when writing code that invokes Eventeum API to register filters.

#91 is a simple implementation of this.

Node default is down!!

Hi!
I am new at eventeum. I cloned eventeum and did what instructions says. When I compose it, it showed
eventeum_1 | 2020-03-26 08:21:40.380 [eventeum-scheduler1] ERROR net.consensys
.eventeum.chain.service.health.NodeHealthCheckService: checkHealth - Node defaul
t is down!!
eventeum_1 | 2020-03-26 08:21:40.378 [eventeum-scheduler1] ERROR net.consensys
.eventeum.chain.service.health.NodeHealthCheckService: isNodeConnected - Get lat
est block failed with exception on node default

I desperately deleted and cloned it over than 10 times.

SQL Server: Previous events are being replaced with newer events

When using SQL Server, previous events are replaced with newer events in table contract_event_details instead of inserting a new one.

Below is a screenshot before any event is emitted for event filter with ID MachineUsedEvent_Serial05

image

First event emitted:
A new records is inserted in the table with block ID 614

image

Second event emitted:
The record with block ID 614 is gone and replaced with the new record with block ID 878

image

Prometheus metrics are unavailable

Hi there!

I've deployed default eventeum configuration, everything works just great. But I'm confused with Prometheus metrics - I'm getting 404 response by sending a request to the http://localhost:8060/monitoring/prometheus. Should I add some configuration variables to make it work?

Thanks in advance!

Build failure: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project eventeum-core

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for eventeum 0.5.2-RELEASE:
[INFO]
[INFO] eventeum ........................................... SUCCESS [ 2.385 s]
[INFO] eventeum-core ...................................... FAILURE [ 47.969 s]
[INFO] eventeum-server .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.013 s
[INFO] Finished at: 2019-05-27T10:45:09-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project eventeum-core: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTags -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :eventeum-core

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.