I am adding here logs from second build, when containers, volumes,... are already created and logstash is not logging errors anymore:
[2021-09-26T18:26:39,213][WARN ][deprecation.logstash.outputs.elasticsearch] Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[2021-09-26T18:26:40,138][INFO ][logstash.licensechecker.licensereader] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch:9200/]}}
[2021-09-26T18:26:40,409][WARN ][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elasticsearch:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2021-09-26T18:26:40,446][WARN ][logstash.licensechecker.licensereader] Marking url as dead. Last error: [LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError] Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused) {:url=>http://elasticsearch:9200/, :error_message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused)", :error_class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}
[2021-09-26T18:26:40,448][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2021-09-26T18:26:40,464][ERROR][logstash.monitoring.internalpipelinesource] Failed to fetch X-Pack information from Elasticsearch. This is likely due to failure to reach a live Elasticsearch cluster.
[2021-09-26T18:26:40,734][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2021-09-26T18:26:41,962][INFO ][org.reflections.Reflections] Reflections took 248 ms to scan 1 urls, producing 120 keys and 417 values
[2021-09-26T18:26:42,913][WARN ][deprecation.logstash.inputs.jdbc] Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[2021-09-26T18:26:42,935][WARN ][deprecation.logstash.inputs.jdbc] Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[2021-09-26T18:26:43,050][WARN ][deprecation.logstash.outputs.elasticsearch] Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[2021-09-26T18:26:43,092][WARN ][deprecation.logstash.outputs.elasticsearch] Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[2021-09-26T18:26:43,099][INFO ][logstash.outputs.elasticsearch][users_pipeline_delete] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//elasticsearch:9200"]}
[2021-09-26T18:26:43,110][INFO ][logstash.outputs.elasticsearch][users_pipeline_delete] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch:9200/]}}
[2021-09-26T18:26:43,126][INFO ][logstash.outputs.elasticsearch][users_pipeline_upsert] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearch", :hosts=>["//elasticsearch:9200"]}
[2021-09-26T18:26:43,128][WARN ][logstash.outputs.elasticsearch][users_pipeline_delete] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elasticsearch:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2021-09-26T18:26:43,177][INFO ][logstash.outputs.elasticsearch][users_pipeline_upsert] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch:9200/]}}
[2021-09-26T18:26:43,205][WARN ][logstash.outputs.elasticsearch][users_pipeline_upsert] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elasticsearch:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2021-09-26T18:26:43,205][INFO ][logstash.javapipeline ][users_pipeline_delete] Starting pipeline {:pipeline_id=>"users_pipeline_delete", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>500, "pipeline.sources"=>["/usr/share/logstash/pipeline/users_delete.conf"], :thread=>"#<Thread:0x72fcbe5d@/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:125 run>"}
[2021-09-26T18:26:43,246][INFO ][logstash.javapipeline ][users_pipeline_upsert] Starting pipeline {:pipeline_id=>"users_pipeline_upsert", "pipeline.workers"=>4, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>500, "pipeline.sources"=>["/usr/share/logstash/pipeline/users_upsert.conf"], :thread=>"#<Thread:0x6d857eb4@/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:125 run>"}
[2021-09-26T18:26:45,423][INFO ][logstash.javapipeline ][users_pipeline_upsert] Pipeline Java execution initialization time {"seconds"=>2.18}
[2021-09-26T18:26:45,425][INFO ][logstash.javapipeline ][users_pipeline_delete] Pipeline Java execution initialization time {"seconds"=>2.22}
[2021-09-26T18:26:45,544][INFO ][logstash.javapipeline ][users_pipeline_delete] Pipeline started {"pipeline.id"=>"users_pipeline_delete"}
[2021-09-26T18:26:45,562][INFO ][logstash.javapipeline ][users_pipeline_upsert] Pipeline started {"pipeline.id"=>"users_pipeline_upsert"}
[2021-09-26T18:26:45,669][INFO ][logstash.agent ] Pipelines running {:count=>2, :running_pipelines=>[:users_pipeline_delete, :users_pipeline_upsert], :non_running_pipelines=>[]}
[2021-09-26T18:26:48,167][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elasticsearch:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2021-09-26T18:26:48,242][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error {:url=>"http://elasticsearch:9200/", :exception=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :message=>"Elasticsearch Unreachable: [http://elasticsearch:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
[2021-09-26T18:26:58,664][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://elasticsearch:9200/"}
[2021-09-26T18:26:58,663][WARN ][logstash.outputs.elasticsearch] Restored connection to ES instance {:url=>"http://elasticsearch:9200/"}
[2021-09-26T18:26:59,201][INFO ][logstash.outputs.elasticsearch] Elasticsearch version determined (7.14.0) {:es_version=>7}
[2021-09-26T18:26:59,201][INFO ][logstash.outputs.elasticsearch] Elasticsearch version determined (7.14.0) {:es_version=>7}
[2021-09-26T18:26:59,202][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
[2021-09-26T18:26:59,203][WARN ][logstash.outputs.elasticsearch] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
[2021-09-26T18:27:10,461][ERROR][logstash.licensechecker.licensereader] Unable to retrieve license information from license server {:message=>"No Available connections"}
[2021-09-26T18:27:10,784][WARN ][logstash.licensechecker.licensereader] Restored connection to ES instance {:url=>"http://elasticsearch:9200/"}
[2021-09-26T18:27:10,805][INFO ][logstash.licensechecker.licensereader] Elasticsearch version determined (7.14.0) {:es_version=>7}
[2021-09-26T18:27:10,806][WARN ][logstash.licensechecker.licensereader] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
[2021-09-26T18:27:13,175][INFO ][logstash.outputs.elasticsearch] Using a default mapping template {:es_version=>7, :ecs_compatibility=>:disabled}
[2021-09-26T18:27:13,235][INFO ][logstash.outputs.elasticsearch] Using a default mapping template {:es_version=>7, :ecs_compatibility=>:disabled}
[2021-09-26T18:27:13,238][INFO ][logstash.outputs.elasticsearch] Installing Elasticsearch template {:name=>"logstash"}
[2021-09-26T18:27:13,278][INFO ][logstash.outputs.elasticsearch] Installing Elasticsearch template {:name=>"logstash"}
[2021-09-26T18:27:40,497][INFO ][logstash.monitoring.internalpipelinesource] Monitoring License OK
[2021-09-26T18:27:40,497][INFO ][logstash.monitoring.internalpipelinesource] Validated license for monitoring. Enabling monitoring pipeline.
[2021-09-26T18:27:40,936][WARN ][deprecation.logstash.outputs.elasticsearchmonitoring] Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECS Compatibility mode.
[2021-09-26T18:27:40,947][INFO ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] New Elasticsearch output {:class=>"LogStash::Outputs::ElasticSearchMonitoring", :hosts=>["http://elasticsearch:9200"]}
[2021-09-26T18:27:40,958][INFO ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Elasticsearch pool URLs updated {:changes=>{:removed=>[], :added=>[http://elasticsearch:9200/]}}
[2021-09-26T18:27:40,973][WARN ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Restored connection to ES instance {:url=>"http://elasticsearch:9200/"}
[2021-09-26T18:27:40,984][INFO ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Elasticsearch version determined (7.14.0) {:es_version=>7}
[2021-09-26T18:27:40,984][WARN ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Detected a 6.x and above cluster: the `type` event field won't be used to determine the document _type {:es_version=>7}
[2021-09-26T18:27:41,024][WARN ][logstash.outputs.elasticsearchmonitoring][.monitoring-logstash] Configuration is data stream compliant but due backwards compatibility Logstash 7.x will not assume writing to a data-stream, default behavior will change on Logstash 8.0 (set `data_stream => true/false` to disable this warning)
[2021-09-26T18:27:41,025][WARN ][logstash.outputs.elasticsearchmonitoring] Configuration is data stream compliant but due backwards compatibility Logstash 7.x will not assume writing to a data-stream, default behavior will change on Logstash 8.0 (set `data_stream => true/false` to disable this warning)
[2021-09-26T18:27:41,026][WARN ][logstash.javapipeline ][.monitoring-logstash] 'pipeline.ordered' is enabled and is likely less efficient, consider disabling if preserving event order is not necessary
[2021-09-26T18:27:41,031][INFO ][logstash.javapipeline ][.monitoring-logstash] Starting pipeline {:pipeline_id=>".monitoring-logstash", "pipeline.workers"=>1, "pipeline.batch.size"=>2, "pipeline.batch.delay"=>50, "pipeline.max_inflight"=>2, "pipeline.sources"=>["monitoring pipeline"], :thread=>"#<Thread:0x577a9cc5@/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:125 run>"}
[2021-09-26T18:27:41,052][INFO ][logstash.javapipeline ][.monitoring-logstash] Pipeline Java execution initialization time {"seconds"=>0.02}
[2021-09-26T18:27:41,063][INFO ][logstash.javapipeline ][.monitoring-logstash] Pipeline started {"pipeline.id"=>".monitoring-logstash"}
[2021-09-26T18:27:41,091][INFO ][logstash.agent ] Pipelines running {:count=>3, :running_pipelines=>[:users_pipeline_delete, :users_pipeline_upsert, :".monitoring-logstash"], :non_running_pipelines=>[]}
[2021-09-26T18:28:00,212][INFO ][logstash.inputs.jdbc ] (0.002265s) SELECT version()
[2021-09-26T18:28:00,221][INFO ][logstash.inputs.jdbc ] (0.003648s) SELECT id_row AS id FROM User_log
WHERE activity = 'delete' AND time > '2021-09-26 18:27:02'
[2021-09-26T18:28:00,225][INFO ][logstash.inputs.jdbc ] (0.002492s) SELECT version()
[2021-09-26T18:28:00,241][INFO ][logstash.inputs.jdbc ] (0.010021s) SELECT * FROM User
WHERE id IN (SELECT id_row FROM User_log
WHERE activity != 'delete' AND time > '2021-09-26 18:27:02')