问:
Elasticsearch cluster on AWS ECS with discovery-ec2 fails to start
I am trying to have my cluster running on AWS' ECS with the discovery-ec2 plugin for clustering. After starting Elasticsearch it seems to hang and nothing is happening happening anymore after the discovery-ec2 plugin is loaded in, logs (at the end of this post) don't seem to provide much help. Following the various configuration files used and logs:

Dockerfile:

```<code>FROM elasticsearch:8.5.3

ENV CLUSTER_NAME default
ENV EC2_INSTANCE_ID undefined

COPY elasticsearch.yml /usr/share/elasticsearch/config/
COPY --chown=elasticsearch:elasticsearch entrypoint.sh /usr/local/bin/new-entrypoint.sh
RUN chmod +x /usr/local/bin/new-entrypoint.sh

RUN echo "y" |bin/elasticsearch-plugin install discovery-ec2

ENTRYPOINT ["/bin/bash", "/usr/local/bin/new-entrypoint.sh"]
</code>```

new-entrypoint.sh:

```<code>#!/bin/bash

export EC2_INSTANCE_ID=$(curl --silent http://169.254.169.254/latest/meta-data/instance-id)

if [[ ! -e "$B64_TLS_CERTIFICATE" ]]; then
    echo -n "$B64_TLS_CERTIFICATE" |base64 -d > /usr/share/elasticsearch/config/elastic-certificates.p12
fi

# Resume to base image entrypoint
/bin/tini -s -- /usr/local/bin/docker-entrypoint.sh "$@"
</code>```

elasticsearch.yaml:

```<code>cluster.name: ${CLUSTER_NAME}
node.name: ${EC2_INSTANCE_ID}
network.host: _ec2_

discovery.seed_providers: ec2
discovery.ec2.host_type: private_ip
discovery.ec2.any_group: true
discovery.ec2.endpoint: ec2.ap-southeast-1.amazonaws.com
cluster.initial_master_nodes: [i-0595b8xxxx, i-07fa13axxxx, i-0a5c21xxxx]

cloud.node.auto_attributes: true
cluster.routing.allocation.awareness.attributes: aws_availability_zone

http.port: 9200
transport.tcp.port: 9300

node.data: true
node.master: true

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
logger.org.elasticsearch.discovery: DEBUG
</code>```

Logs:

```Created elasticsearch keystore in /usr/share/elasticsearch/config/elasticsearch.keystore
{"@timestamp":"2022-12-30T10:05:36.484Z", "log.level": "INFO", "message":"version[8.5.3], pid[175], build[docker/4ed5ee9afac63de92ec98f404ccbed7d3ba9584e/2022-12-05T18:22:22.226119656Z], OS[Linux/4.14.301-224.520.amzn2.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/19.0.1/19.0.1+10-21]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.node.Node","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:36.490Z", "log.level": "INFO", "message":"JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.node.Node","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:36.491Z", "log.level": "INFO", "message":"JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true,-Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -Des.cgroups.hierarchy.override=/, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-13108333766483741156, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms1750m, -Xmx1750m, -XX:MaxDirectMemorySize=917504000, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=docker, --module-path=/usr/share/elasticsearch/lib, --add-modules=jdk.net, -Djdk.module.main=org.elasticsearch.server]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.node.Node","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:39.010Z", "log.level": "INFO", "message":"Package versions: jackson-annotations=2.13.2, jackson-core=2.13.2, jackson-databind=2.13.2.2, jackson-dataformat-xml=2.13.2, jackson-datatype-jsr310=2.13.2, azure-core=1.27.0, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"com.azure.core.implementation.jackson.JacksonVersion","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.062Z", "log.level":"DEBUG", "message":"Using either environment variables, system properties or instance profile credentials", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.discovery.ec2.Ec2ClientSettings","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.144Z", "log.level": "INFO", "message":"loaded module [aggs-matrix-stats]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.144Z", "log.level": "INFO", "message":"loaded module [analysis-common]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.145Z", "log.level": "INFO", "message":"loaded module [apm]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.145Z", "log.level": "INFO", "message":"loaded module [constant-keyword]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [data-streams]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [frozen-indices]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [ingest-attachment]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [ingest-common]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.148Z", "log.level": "INFO", "message":"loaded module [ingest-geoip]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.148Z", "log.level": "INFO", "message":"loaded module [ingest-user-agent]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.148Z", "log.level": "INFO", "message":"loaded module [kibana]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.149Z", "log.level": "INFO", "message":"loaded module [lang-mustache]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.149Z", "log.level": "INFO", "message":"loaded module [lang-painless]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.154Z", "log.level": "INFO", "message":"loaded module [legacy-geo]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.154Z", "log.level": "INFO", "message":"loaded module [mapper-extras]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.155Z", "log.level": "INFO", "message":"loaded module [mapper-version]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.155Z", "log.level": "INFO", "message":"loaded module [old-lucene-versions]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.156Z", "log.level": "INFO", "message":"loaded module [parent-join]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.156Z", "log.level": "INFO", "message":"loaded module [percolator]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.156Z", "log.level": "INFO", "message":"loaded module [rank-eval]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [reindex]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [repositories-metering-api]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [repository-azure]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [repository-encrypted]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.158Z", "log.level": "INFO", "message":"loaded module [repository-gcs]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.158Z", "log.level": "INFO", "message":"loaded module [repository-s3]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.158Z", "log.level": "INFO", "message":"loaded module [repository-url]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [runtime-fields-common]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [search-business-rules]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [searchable-snapshots]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [snapshot-based-recoveries]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.160Z", "log.level": "INFO", "message":"loaded module [snapshot-repo-test-kit]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.160Z", "log.level": "INFO", "message":"loaded module [spatial]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.160Z", "log.level": "INFO", "message":"loaded module [transform]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.161Z", "log.level": "INFO", "message":"loaded module [transport-netty4]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.161Z", "log.level": "INFO", "message":"loaded module [unsigned-long]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.161Z", "log.level": "INFO", "message":"loaded module [vector-tile]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.162Z", "log.level": "INFO", "message":"loaded module [wildcard]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.162Z", "log.level": "INFO", "message":"loaded module [x-pack-aggregate-metric]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.163Z", "log.level": "INFO", "message":"loaded module [x-pack-analytics]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.163Z", "log.level": "INFO", "message":"loaded module [x-pack-async]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.163Z", "log.level": "INFO", "message":"loaded module [x-pack-async-search]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.164Z", "log.level": "INFO", "message":"loaded module [x-pack-autoscaling]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.164Z", "log.level": "INFO", "message":"loaded module [x-pack-ccr]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.164Z", "log.level": "INFO", "message":"loaded module [x-pack-core]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.165Z", "log.level": "INFO", "message":"loaded module [x-pack-deprecation]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.165Z", "log.level": "INFO", "message":"loaded module [x-pack-enrich]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.165Z", "log.level": "INFO", "message":"loaded module [x-pack-eql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-fleet]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-graph]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-identity-provider]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-ilm]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.167Z", "log.level": "INFO", "message":"loaded module [x-pack-logstash]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.167Z", "log.level": "INFO", "message":"loaded module [x-pack-ml]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.167Z", "log.level": "INFO", "message":"loaded module [x-pack-monitoring]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.168Z", "log.level": "INFO", "message":"loaded module [x-pack-ql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.168Z", "log.level": "INFO", "message":"loaded module [x-pack-rollup]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.169Z", "log.level": "INFO", "message":"loaded module [x-pack-security]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.170Z", "log.level": "INFO", "message":"loaded module [x-pack-shutdown]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.171Z", "log.level": "INFO", "message":"loaded module [x-pack-sql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.171Z", "log.level": "INFO", "message":"loaded module [x-pack-stack]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.171Z", "log.level": "INFO", "message":"loaded module [x-pack-text-structure]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.172Z", "log.level": "INFO", "message":"loaded module [x-pack-voting-only-node]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.172Z", "log.level": "INFO", "message":"loaded module [x-pack-watcher]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.172Z", "log.level": "INFO", "message":"loaded plugin [discovery-ec2]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.215Z", "log.level":"DEBUG", "message":"obtaining ec2 [placement/availability-zone] from ec2 meta-data url http://169.254.169.254/latest/meta-data/placement/availability-zone", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.discovery.ec2.Ec2DiscoveryPlugin","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
```

Thanks :)

Body:
I am trying to have my cluster running on AWS' ECS with the discovery-ec2 plugin for clustering. After starting Elasticsearch it seems to hang and nothing is happening happening anymore after the discovery-ec2 plugin is loaded in, logs (at the end of this post) don't seem to provide much help. Following the various configuration files used and logs:

Dockerfile:

FROM elasticsearch:8.5.3

ENV CLUSTER_NAME default
ENV EC2_INSTANCE_ID undefined

COPY elasticsearch.yml /usr/share/elasticsearch/config/
COPY --chown=elasticsearch:elasticsearch entrypoint.sh /usr/local/bin/new-entrypoint.sh
RUN chmod +x /usr/local/bin/new-entrypoint.sh

RUN echo "y" |bin/elasticsearch-plugin install discovery-ec2

ENTRYPOINT ["/bin/bash", "/usr/local/bin/new-entrypoint.sh"]

new-entrypoint.sh:

#!/bin/bash

export EC2_INSTANCE_ID=$(curl --silent http://169.254.169.254/latest/meta-data/instance-id)

if [[ ! -e "$B64_TLS_CERTIFICATE" ]]; then
    echo -n "$B64_TLS_CERTIFICATE" |base64 -d > /usr/share/elasticsearch/config/elastic-certificates.p12
fi

# Resume to base image entrypoint
/bin/tini -s -- /usr/local/bin/docker-entrypoint.sh "$@"

elasticsearch.yaml:

cluster.name: ${CLUSTER_NAME}
node.name: ${EC2_INSTANCE_ID}
network.host: _ec2_

discovery.seed_providers: ec2
discovery.ec2.host_type: private_ip
discovery.ec2.any_group: true
discovery.ec2.endpoint: ec2.ap-southeast-1.amazonaws.com
cluster.initial_master_nodes: [i-0595b8xxxx, i-07fa13axxxx, i-0a5c21xxxx]

cloud.node.auto_attributes: true
cluster.routing.allocation.awareness.attributes: aws_availability_zone

http.port: 9200
transport.tcp.port: 9300

node.data: true
node.master: true

xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.client_authentication: required
xpack.security.transport.ssl.keystore.path: elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: elastic-certificates.p12
logger.org.elasticsearch.discovery: DEBUG

Logs:

Created elasticsearch keystore in /usr/share/elasticsearch/config/elasticsearch.keystore
{"@timestamp":"2022-12-30T10:05:36.484Z", "log.level": "INFO", "message":"version[8.5.3], pid[175], build[docker/4ed5ee9afac63de92ec98f404ccbed7d3ba9584e/2022-12-05T18:22:22.226119656Z], OS[Linux/4.14.301-224.520.amzn2.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/19.0.1/19.0.1+10-21]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.node.Node","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:36.490Z", "log.level": "INFO", "message":"JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.node.Node","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:36.491Z", "log.level": "INFO", "message":"JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true,-Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -Des.cgroups.hierarchy.override=/, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-13108333766483741156, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms1750m, -Xmx1750m, -XX:MaxDirectMemorySize=917504000, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=docker, --module-path=/usr/share/elasticsearch/lib, --add-modules=jdk.net, -Djdk.module.main=org.elasticsearch.server]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.node.Node","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:39.010Z", "log.level": "INFO", "message":"Package versions: jackson-annotations=2.13.2, jackson-core=2.13.2, jackson-databind=2.13.2.2, jackson-dataformat-xml=2.13.2, jackson-datatype-jsr310=2.13.2, azure-core=1.27.0, Troubleshooting version conflicts: https://aka.ms/azsdk/java/dependency/troubleshoot", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"com.azure.core.implementation.jackson.JacksonVersion","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.062Z", "log.level":"DEBUG", "message":"Using either environment variables, system properties or instance profile credentials", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.discovery.ec2.Ec2ClientSettings","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.144Z", "log.level": "INFO", "message":"loaded module [aggs-matrix-stats]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.144Z", "log.level": "INFO", "message":"loaded module [analysis-common]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.145Z", "log.level": "INFO", "message":"loaded module [apm]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.145Z", "log.level": "INFO", "message":"loaded module [constant-keyword]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [data-streams]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [frozen-indices]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [ingest-attachment]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.146Z", "log.level": "INFO", "message":"loaded module [ingest-common]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.148Z", "log.level": "INFO", "message":"loaded module [ingest-geoip]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.148Z", "log.level": "INFO", "message":"loaded module [ingest-user-agent]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.148Z", "log.level": "INFO", "message":"loaded module [kibana]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.149Z", "log.level": "INFO", "message":"loaded module [lang-mustache]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.149Z", "log.level": "INFO", "message":"loaded module [lang-painless]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.154Z", "log.level": "INFO", "message":"loaded module [legacy-geo]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.154Z", "log.level": "INFO", "message":"loaded module [mapper-extras]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.155Z", "log.level": "INFO", "message":"loaded module [mapper-version]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.155Z", "log.level": "INFO", "message":"loaded module [old-lucene-versions]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.156Z", "log.level": "INFO", "message":"loaded module [parent-join]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.156Z", "log.level": "INFO", "message":"loaded module [percolator]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.156Z", "log.level": "INFO", "message":"loaded module [rank-eval]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [reindex]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [repositories-metering-api]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [repository-azure]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.157Z", "log.level": "INFO", "message":"loaded module [repository-encrypted]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.158Z", "log.level": "INFO", "message":"loaded module [repository-gcs]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.158Z", "log.level": "INFO", "message":"loaded module [repository-s3]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.158Z", "log.level": "INFO", "message":"loaded module [repository-url]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [runtime-fields-common]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [search-business-rules]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [searchable-snapshots]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.159Z", "log.level": "INFO", "message":"loaded module [snapshot-based-recoveries]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.160Z", "log.level": "INFO", "message":"loaded module [snapshot-repo-test-kit]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.160Z", "log.level": "INFO", "message":"loaded module [spatial]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.160Z", "log.level": "INFO", "message":"loaded module [transform]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.161Z", "log.level": "INFO", "message":"loaded module [transport-netty4]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.161Z", "log.level": "INFO", "message":"loaded module [unsigned-long]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.161Z", "log.level": "INFO", "message":"loaded module [vector-tile]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.162Z", "log.level": "INFO", "message":"loaded module [wildcard]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.162Z", "log.level": "INFO", "message":"loaded module [x-pack-aggregate-metric]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.163Z", "log.level": "INFO", "message":"loaded module [x-pack-analytics]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.163Z", "log.level": "INFO", "message":"loaded module [x-pack-async]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.163Z", "log.level": "INFO", "message":"loaded module [x-pack-async-search]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.164Z", "log.level": "INFO", "message":"loaded module [x-pack-autoscaling]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.164Z", "log.level": "INFO", "message":"loaded module [x-pack-ccr]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.164Z", "log.level": "INFO", "message":"loaded module [x-pack-core]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.165Z", "log.level": "INFO", "message":"loaded module [x-pack-deprecation]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.165Z", "log.level": "INFO", "message":"loaded module [x-pack-enrich]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.165Z", "log.level": "INFO", "message":"loaded module [x-pack-eql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-fleet]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-graph]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-identity-provider]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.166Z", "log.level": "INFO", "message":"loaded module [x-pack-ilm]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.167Z", "log.level": "INFO", "message":"loaded module [x-pack-logstash]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.167Z", "log.level": "INFO", "message":"loaded module [x-pack-ml]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.167Z", "log.level": "INFO", "message":"loaded module [x-pack-monitoring]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.168Z", "log.level": "INFO", "message":"loaded module [x-pack-ql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.168Z", "log.level": "INFO", "message":"loaded module [x-pack-rollup]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.169Z", "log.level": "INFO", "message":"loaded module [x-pack-security]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.170Z", "log.level": "INFO", "message":"loaded module [x-pack-shutdown]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.171Z", "log.level": "INFO", "message":"loaded module [x-pack-sql]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.171Z", "log.level": "INFO", "message":"loaded module [x-pack-stack]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.171Z", "log.level": "INFO", "message":"loaded module [x-pack-text-structure]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.172Z", "log.level": "INFO", "message":"loaded module [x-pack-voting-only-node]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.172Z", "log.level": "INFO", "message":"loaded module [x-pack-watcher]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.172Z", "log.level": "INFO", "message":"loaded plugin [discovery-ec2]", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.plugins.PluginsService","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}
{"@timestamp":"2022-12-30T10:05:41.215Z", "log.level":"DEBUG", "message":"obtaining ec2 [placement/availability-zone] from ec2 meta-data url http://169.254.169.254/latest/meta-data/placement/availability-zone", "ecs.version": "1.2.0","service.name":"ES_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.discovery.ec2.Ec2DiscoveryPlugin","elasticsearch.node.name":"i-0595b8xxxx","elasticsearch.cluster.name":"monitoring"}

Thanks :)


来源: stackexchange

问:
How to extract headers of all requests coming to application using span and opentelemetry
i have created a seperated java  project for opentelemetry and added it as dependency to department service and calling helper method of opentelemtry project to log data .How to retreive all requests header details coming to the application</p>
```<code>package com.commons.logging.maven;

import io.opentelemetry.exporter.logging.LoggingSpanExporter;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import io.opentelemetry.sdk.trace.SdkTracerProvider;
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;

public class OpenTelemetryInitializer {

    private static OpenTelemetryInitializer openTelemetryInitializer = null;

    private OpenTelemetryInitializer() {

    }

    public static OpenTelemetryInitializer getInstance() {
        if (openTelemetryInitializer == null)
            openTelemetryInitializer = new OpenTelemetryInitializer();

        return openTelemetryInitializer;
    }

    public OpenTelemetrySdk getOpenTelemetrySdk() {
        return OpenTelemetrySdk.builder().setTracerProvider(SdkTracerProvider.builder()
                .addSpanProcessor(SimpleSpanProcessor.create(LoggingSpanExporter.create())).build()).build();
    }

}
</code>```

ContentLicense: CC BY-SA 4.0

Body:
i have created a seperated java  project for opentelemetry and added it as dependency to department service and calling helper method of opentelemtry project to log data .How to retreive all requests header details coming to the application

package com.commons.logging.maven;

import io.opentelemetry.exporter.logging.LoggingSpanExporter;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import io.opentelemetry.sdk.trace.SdkTracerProvider;
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;

public class OpenTelemetryInitializer {

    private static OpenTelemetryInitializer openTelemetryInitializer = null;

    private OpenTelemetryInitializer() {

    }

    public static OpenTelemetryInitializer getInstance() {
        if (openTelemetryInitializer == null)
            openTelemetryInitializer = new OpenTelemetryInitializer();

        return openTelemetryInitializer;
    }

    public OpenTelemetrySdk getOpenTelemetrySdk() {
        return OpenTelemetrySdk.builder().setTracerProvider(SdkTracerProvider.builder()
                .addSpanProcessor(SimpleSpanProcessor.create(LoggingSpanExporter.create())).build()).build();
    }

}


问:
Serilog logging to Azure Blob Table problem. Removed the logging code but an errant process is still writing every 5 minutes, two days later
I have a .Net 6.0 MVC project which i upgraded from 2.1. At the same time i thought that i would change the logging from disk to Azure Table Storage. So during testing all was well. Then after production all was well. Then 3 days ago some weird repetitive logging started. The error message referred to a serialization error - that had never happened in the 4 months of dev period. The offending property was deprecated so i removed it and deployed to production. But the logs are still continuing. Has anyone had any experience of this rogue behaviour?</p>


问:
I am trying to execute npm run serve:ssr but not proceeding
I am using
Angular 7.3.10
Firebase 5.10.0
angularfire2 5.1.2
express 4.16.3

I am going to run this command npm run build:ssr so it was successfully executed. But while I am going to run this command npm run serve:ssr so it has given me an error

This image shows that the error which I faced from last 3 weeks

I have searched so many things to resolved it but does not work. Sometimes I got error of changing firebase import packages like,

```<code>IMPORT * as firebase FROM firebase/app
</code>```

I have changed it to

```<code>IMPORT firebase FROM firebase/app
IMPORT "firebase/auth"
</code>```

Body:
I am using
Angular 7.3.10
Firebase 5.10.0
angularfire2 5.1.2
express 4.16.3

I am going to run this command npm run build:ssr so it was successfully executed. But while I am going to run this command npm run serve:ssr so it has given me an error

This image shows that the error which I faced from last 3 weeks

I have searched so many things to resolved it but does not work. Sometimes I got error of changing firebase import packages like,

IMPORT * as firebase FROM firebase/app

I have changed it to

IMPORT firebase FROM firebase/app
IMPORT "firebase/auth"


问:
Oracle Analytical Desktop Variable Prompt issue
Before Saving

After Saving

In Oracle Analytical Desktop, I am using Variable Prompt (Custom Visualization), After saving my canvas the dropdown values of Variable Prompt Disappear .Only the selected value left in the dropdown.

OAD can't retain values like Tableau.

Need Guidance how to retain values using Variable Prompts.


问:
Delay in updating the UI in Server application
We have been using our blazor for a long time. But still some things about performance are not agreeable.

In the below code, we have sent a JS call that changes the visibility of an element when it returns in a button click, a very small operation.

```<code>@page "1"
@using Microsoft.JSInterop
@inject IJSRuntime JsRuntime;

<div style="width:700px; height:700px; background-color:red">
    <button onclick="@ChangeVisbility">ChangeVisiblity</button>
    <div style="width:50px; height:50px; background-color:yellow;visibility:@visiblity;" id="YellowDiv">    </div>
</div>

@code {
    string visiblity = "visible";
    public async Task ChangeVisbility()
    {
        bool isVisble = await JsRuntime.InvokeAsync<bool>("CheckVisibility");
        if (isVisble)
        {
            visiblity = "hidden";
        }
        else
        {
            visiblity = "visible";
        }
    }
}

</code>```

Note: Here there is necessary to send a JS call and get the result to update the Visibility.

In this, it works very fast in locally. But it's a bit slow when hosting it in Azure or any site.

Hosted link: https://blazorpdfviewerui.azurewebsites.net/

As a blazor developer, we agree it takes some time due to network latency to go to JS and get the result to update the visibility on the C# side. But our customers refuse to recognize this. Because they are all desktop customers. They used fast UI.

Can you give us any tips to increase this performance while hosting?

Note: We are in the IST region application hosted in the US region.

Expected

When i click the button the visibility should update immediately in the hosted environment, even both client and server in different regions as like desktop functionality.

Body:
We have been using our blazor for a long time. But still some things about performance are not agreeable.

In the below code, we have sent a JS call that changes the visibility of an element when it returns in a button click, a very small operation.

@page "1"
@using Microsoft.JSInterop
@inject IJSRuntime JsRuntime;

    <button onclick="@ChangeVisbility">ChangeVisiblity</button>

@code {
    string visiblity = "visible";
    public async Task ChangeVisbility()
    {
        bool isVisble = await JsRuntime.InvokeAsync<bool>("CheckVisibility");
        if (isVisble)
        {
            visiblity = "hidden";
        }
        else
        {
            visiblity = "visible";
        }
    }
}

Note: Here there is necessary to send a JS call and get the result to update the Visibility.

In this, it works very fast in locally. But it's a bit slow when hosting it in Azure or any site.

Hosted link: https://blazorpdfviewerui.azurewebsites.net/

As a blazor developer, we agree it takes some time due to network latency to go to JS and get the result to update the visibility on the C# side. But our customers refuse to recognize this. Because they are all desktop customers. They used fast UI.

Can you give us any tips to increase this performance while hosting?

Note: We are in the IST region application hosted in the US region.

Expected

When i click the button the visibility should update immediately in the hosted environment, even both client and server in different regions as like desktop functionality.


问:
Array disappears after a few clicks with an undefined error - React
I'm trying to make a simulation of a blackjack hand - first user get two random cards, and with each 'hit' they get another one, however after a few 'hit' the app crashes and the 'undefined' error comes up in (array is undefined therefore can't get length). I've tried to save the deck again in the original shuffle, tried putting it all in one, however I can never get it to fully work.

I suspect it's something to do with useState being used incorrectly, however I'm not sure how to fix it.
Here's my code:

```<code>import {useState, useEffect} from 'react'
import Card from '../components/Card';
import Total from '../components/Total';
import {deckArray} from '../utils/data'

export default function Home(){
    const initialHand = 2
    const [dealCards, setDealCards] = useState(false)
    const [isStarted, setIsStarted] = useState(false)
    const [isReset, setIsReset] = useState(false)
    const [hand, setHand] = useState(initialHand)
    const [deck, setDeck] = useState(deckArray)
    const [total, setTotal] = useState(0)

    const [usersCards, setUsersCards] = useState([])

    function shuffle(deck){
        console.log("shuffle called")
        setIsStarted(true)
        let i = deck.length;

        while (--i > 0) {
            let randIndex = Math.floor(Math.random() * (i + 1));
            [deck[randIndex], deck[i]] = [deck[i], deck[randIndex]];
          }

        setUsersCards(deck.slice(-initialHand))
        console.log(usersCards)
        console.log(deck)
    }

    useEffect(() => {
        if(dealCards===true){

            const randomCard = deck[Math.floor(Math.random()*deck.length)];
            const newCardsArray = deck.filter(el => el.index !== randomCard.index)
            const chosenCardArray = deck.filter(el => el.index === randomCard.index)

            const chosenCard = chosenCardArray[0]

            setDeck(newCardsArray)
            setUsersCards(prevCards => [...prevCards, chosenCard])
            console.log(newCardsArray.length)

            setDealCards(false)

        }
    }, [usersCards, dealCards, deck])

    useEffect(() => {
        if(isReset){
            setUsersCards([])
            setDeck(shuffle(deckArray))
            setDealCards(false)
            setTotal(0)
            setIsStarted(true)
        }
        setIsReset(false)
    },[isReset, setIsReset])

    useEffect(() => {
        if(total>=22){
            setIsStarted(true)
            setIsReset(true)
            setDeck(shuffle(deckArray))
        }
    }, [total, setTotal])

    return (
        <>
            {isStarted ? <>
            <Total usersCards={usersCards} total={total} setTotal={setTotal}/>

            <Card usersCards={usersCards} />

            <button onClick={() => setDealCards(true)}>HIT</button>
            <button>STAND</button>
            <button onClick={() => setIsReset(true)}>START OVER</button>
            </> :
            <>
            <p>Game over!</p>
            <button onClick={() => shuffle(deck)}>PLAY AGAIN</button></>}
        </>
    )
}
</code>```

any help much appreciated!

Body:
I'm trying to make a simulation of a blackjack hand - first user get two random cards, and with each 'hit' they get another one, however after a few 'hit' the app crashes and the 'undefined' error comes up in (array is undefined therefore can't get length). I've tried to save the deck again in the original shuffle, tried putting it all in one, however I can never get it to fully work.

I suspect it's something to do with useState being used incorrectly, however I'm not sure how to fix it.
Here's my code:

import {useState, useEffect} from 'react'
import Card from '../components/Card';
import Total from '../components/Total';
import {deckArray} from '../utils/data'

export default function Home(){
    const initialHand = 2
    const [dealCards, setDealCards] = useState(false)
    const [isStarted, setIsStarted] = useState(false)
    const [isReset, setIsReset] = useState(false)
    const [hand, setHand] = useState(initialHand)
    const [deck, setDeck] = useState(deckArray)
    const [total, setTotal] = useState(0)

    const [usersCards, setUsersCards] = useState([])

    function shuffle(deck){
        console.log("shuffle called")
        setIsStarted(true)
        let i = deck.length;

        while (--i > 0) {
            let randIndex = Math.floor(Math.random() * (i + 1));
            [deck[randIndex], deck[i]] = [deck[i], deck[randIndex]];
          }

        setUsersCards(deck.slice(-initialHand))
        console.log(usersCards)
        console.log(deck)
    }

    useEffect(() => {
        if(dealCards===true){

            const randomCard = deck[Math.floor(Math.random()*deck.length)];
            const newCardsArray = deck.filter(el => el.index !== randomCard.index)
            const chosenCardArray = deck.filter(el => el.index === randomCard.index)

            const chosenCard = chosenCardArray[0]

            setDeck(newCardsArray)
            setUsersCards(prevCards => [...prevCards, chosenCard])
            console.log(newCardsArray.length)

            setDealCards(false)

        }
    }, [usersCards, dealCards, deck])

    useEffect(() => {
        if(isReset){
            setUsersCards([])
            setDeck(shuffle(deckArray))
            setDealCards(false)
            setTotal(0)
            setIsStarted(true)
        }
        setIsReset(false)
    },[isReset, setIsReset])

    useEffect(() => {
        if(total>=22){
            setIsStarted(true)
            setIsReset(true)
            setDeck(shuffle(deckArray))
        }
    }, [total, setTotal])

    return (
        <>
            {isStarted ? <>
            <Total usersCards={usersCards} total={total} setTotal={setTotal}/>

            <Card usersCards={usersCards} />

            <button onClick={() => setDealCards(true)}>HIT</button>
            <button>STAND</button>
            <button onClick={() => setIsReset(true)}>START OVER</button>
            </> :
            <>

Game over!

            <button onClick={() => shuffle(deck)}>PLAY AGAIN</button></>}
        </>
    )
}

any help much appreciated!


问:
Adding tailwind directives to a components.scss doesn't work properly
I am building a Web Component with Angular Elements and tailwind and I am using encapsulation ViewEncapsulation.ShadowDom, so I can't import tailwind directives into styles.scss, but instead I am importing them into my custom component. However there is an issue when I am adding a class to the components template and save it, nothing happens. Only when I go to the components scss file which contains the tailwind directives and save it, then the change is visible. So I am assuming, that tailwind checks the template for tailwind classes and only adds the corresponding css classes if they are used.

Example Code:

app.component.html

```<code><div class="text-5xl">Hello World</div>
</code>```

app.component.scss

```<code>@tailwind base;
@tailwind components;
@tailwind utilities;
</code>```

app.component.ts

```<code>import { Component, ViewEncapsulation } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
  encapsulation: ViewEncapsulation.ShadowDom,
})
export class AppComponent {
  title = 'Test';
}
</code>```

I am trying to find a way to enforce Angular to compile a components scss file if the components template file has changed, unfortunately I couldn't find a way yet. Any help is welcome.

Body:
I am building a Web Component with Angular Elements and tailwind and I am using encapsulation ViewEncapsulation.ShadowDom, so I can't import tailwind directives into styles.scss, but instead I am importing them into my custom component. However there is an issue when I am adding a class to the components template and save it, nothing happens. Only when I go to the components scss file which contains the tailwind directives and save it, then the change is visible. So I am assuming, that tailwind checks the template for tailwind classes and only adds the corresponding css classes if they are used.

Example Code:

app.component.html

Hello World

app.component.scss

@tailwind base;
@tailwind components;
@tailwind utilities;

app.component.ts

import { Component, ViewEncapsulation } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
  encapsulation: ViewEncapsulation.ShadowDom,
})
export class AppComponent {
  title = 'Test';
}

I am trying to find a way to enforce Angular to compile a components scss file if the components template file has changed, unfortunately I couldn't find a way yet. Any help is welcome.


问:
Linking to pthread or not determines the different behavior of the program

// main.cpp
#include <iostream>
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <thread>

int main(int nArgCnt, char*ppArgs[]) {
    using namespace std::chrono_literals;
    std::mutex mtx;
    std::unique_lock<decltype(mtx)> lock(mtx);
    std::condition_variable condVar;
    int x = 0;
    condVar.wait(lock, [&] {
            std::this_thread::sleep_for(1ms);
            std::cout << x << std::endl;
            return x > 0;
        });
}
```
<p>I build above code with <code>g++ main.cpp -o test</code>, the the <code>test</code> prints infinite lines:</p>
```0
0
0
0
...
```
<p>However, if I built with <code>g++ main.cpp -lpthread -o test</code>, only one line is printed:</p>
```0
```

I have tested with different versions of Linux and different versions of g++ compilers, and got the same phenomenon.

Why adding -lpthread or not lead to different behavior of the code?

Ps. If I removed the line std::this_thread::sleep_for(1ms); , the test always print infinite lines whether -lpthread is added or not. So weird...

Body:
// main.cpp
#include <iostream>
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <thread>

int main(int nArgCnt, char*ppArgs[]) {
    using namespace std::chrono_literals;
    std::mutex mtx;
    std::unique_lock<decltype(mtx)> lock(mtx);
    std::condition_variable condVar;
    int x = 0;
    condVar.wait(lock, [&] {
            std::this_thread::sleep_for(1ms);
            std::cout << x << std::endl;
            return x > 0;
        });
}

I build above code with g++ main.cpp -o test, the the test prints infinite lines:

0
0
0
0
...

However, if I built with g++ main.cpp -lpthread -o test, only one line is printed:

0

I have tested with different versions of Linux and different versions of g++ compilers, and got the same phenomenon.

Why adding -lpthread or not lead to different behavior of the code?

Ps. If I removed the line std::this_thread::sleep_for(1ms); , the test always print infinite lines whether -lpthread is added or not. So weird...


问:
Is there a way to automatically generate an og:image from a screen snapshot?
Using the Open Graph protocol, an image can be signaled to applications such as Facebook to associate with a site link. For example:

```<code><meta property="og:image" content="https://mysite.any/images/thumbnail.jpg">
</code>```

However, this has a disadvantage: the image is a fixed one, i.e., it is always that same image whatever is the page. Obviously, using PHP, I can also select different existing images depending on the page being called, but doing this for any page on a site with hundreds of constantly updating pages is a mission impossible.

Ideally, I would like to be able to generate that image automatically when the server receives the HTTP call from the agent and generates the page content.

But how? Is there a simple way to do this, taking into account that the page is actually rendered by the browser and so the server actually has no idea how it will be represented? Probably I cannot do that by PHP but I need some JavaScript to do that. Is that correct?

Body:
Using the Open Graph protocol, an image can be signaled to applications such as Facebook to associate with a site link. For example:

<meta property="og:image" content="https://mysite.any/images/thumbnail.jpg">

However, this has a disadvantage: the image is a fixed one, i.e., it is always that same image whatever is the page. Obviously, using PHP, I can also select different existing images depending on the page being called, but doing this for any page on a site with hundreds of constantly updating pages is a mission impossible.

Ideally, I would like to be able to generate that image automatically when the server receives the HTTP call from the agent and generates the page content.

But how? Is there a simple way to do this, taking into account that the page is actually rendered by the browser and so the server actually has no idea how it will be represented? Probably I cannot do that by PHP but I need some JavaScript to do that. Is that correct?


问:
I'm trying to take the full list of followers on Twitter of each US Senator starting from a database and using rtweet
Starting from a data frame containing the full list of usernames of the US Senators, I'm trying to take the full list of their followers using rtweet 0.7.0 version and the function get_followers with the retryonratelimit option set TRUE. If I use the column of the data frame R gives me an error:

```<code>Error in get_followers_(user = c("LisaMurkowski", "SenDanSullivan", "SenTuberville",  :
  isTRUE(length(user) == 1) it's not TRUE
</code>```

While if I just use one user name with the same option, it gives me just 5000 users and not the full list.

Using the last version of rtweet gives me the same problem in both cases.

```<code>library(rtweet)
data <- read.csv("data.csv", sep=";")
follower <- get_followers(data$twitter, retryonratelimit = T)
</code>```
```<code>library(rtweet)
data <- read.csv("data.csv", sep=";")
follower <- get_followers("LisaMurkowski", retryonratelimit = T)
</code>```

I tried those two chunks with both versions of rtweet but I failed to find a solution.

The function lookup_users says that there are 57271024 accounts (the sum of the number of followers of each US Senator). I would like to have this full list to build a network.

Body:
Starting from a data frame containing the full list of usernames of the US Senators, I'm trying to take the full list of their followers using rtweet 0.7.0 version and the function get_followers with the retryonratelimit option set TRUE. If I use the column of the data frame R gives me an error:

Error in get_followers_(user = c("LisaMurkowski", "SenDanSullivan", "SenTuberville",  :
  isTRUE(length(user) == 1) it's not TRUE

While if I just use one user name with the same option, it gives me just 5000 users and not the full list.

Using the last version of rtweet gives me the same problem in both cases.

library(rtweet)
data <- read.csv("data.csv", sep=";")
follower <- get_followers(data$twitter, retryonratelimit = T)

library(rtweet)
data <- read.csv("data.csv", sep=";")
follower <- get_followers("LisaMurkowski", retryonratelimit = T)

I tried those two chunks with both versions of rtweet but I failed to find a solution.

The function lookup_users says that there are 57271024 accounts (the sum of the number of followers of each US Senator). I would like to have this full list to build a network.


问:
Client Validation Not Working in kendo UI Core
my problem is client-side validation doesnt work in .net core. I use the kendo library. I dont know where is the problem.

this is my code:

this my code but its doesnt show a required Message


问:
Is the user-defined object returned by a function an rvalue or lvalue?
The code given is:

#include<iostream>
using namespace std;

class Test{
private:
    int x;
    int y;
public:
    Test (int x = 0, int y = 0) { this->x = x; this->y = y; }
    Test setX(int a) {
        x = a;
        return *this;
    }
    Test setY(int b) {
        y = b;
        return *this;
    }
    void print() {
        cout << "x = " << x << " y = " << y << endl;
     }
};
```
<p>Basically I was returning a user-defined object from a member function of the same class.</p>
<pre class="lang-cpp prettyprint-override"><code>    Test obj1;
    obj1.setX(10).setY(24);
    obj1.print();
</code>```

When cpp obj1.setX(10) was executed, was the returned object an lvalue or an rvalue?

If I use the above code, it gives the output as x = 10 y = 0. This got me thinking, is the user-defined object an rvalue or an lvalue, because in the case of primitive data-types (where the function returns a primitive data types) the returned value is an rvalue.

Also, I want to further add that I get the desired output i.e. x = 10 y = 24 if I write,

Test& setX(int a) {
    x = a;
    return *this;
}
Test& setY(int b) {
    y = b;
    return *this;
}
```

Please explain this too.

Body:
The code given is:

#include<iostream>
using namespace std;

class Test{
private:
    int x;
    int y;
public:
    Test (int x = 0, int y = 0) { this->x = x; this->y = y; }
    Test setX(int a) {
        x = a;
        return *this;
    }
    Test setY(int b) {
        y = b;
        return *this;
    }
    void print() {
        cout << "x = " << x << " y = " << y << endl;
     }
};

Basically I was returning a user-defined object from a member function of the same class.

    Test obj1;
    obj1.setX(10).setY(24);
    obj1.print();

When cpp obj1.setX(10) was executed, was the returned object an lvalue or an rvalue?

If I use the above code, it gives the output as x = 10 y = 0. This got me thinking, is the user-defined object an rvalue or an lvalue, because in the case of primitive data-types (where the function returns a primitive data types) the returned value is an rvalue.

Also, I want to further add that I get the desired output i.e. x = 10 y = 24 if I write,

Test& setX(int a) {
    x = a;
    return *this;
}
Test& setY(int b) {
    y = b;
    return *this;
}

Please explain this too.


问:
vue 3 plugin, how to inject a variable?
Building a Vue 3 plugin for Pouchdb.
PouchDB relies on 'global' being defined by webpack and since Vite does not do that, it errors.

The fix is fairly simple at a manual level, you simply put window.global = window; in a script tag within index.html

I'd like for the plugin to do this automagically instead of the user needing to do it manually.

Is there a way to make this happen?

Title: vue 3 plugin, how to inject a variable?


问:
Swift start Process and read continously changed output
I have this code to continously read the output of a started process:

let task = Process()

        task.arguments = ["-c", command]
        task.launchPath = "/bin/zsh"

        let pipe = Pipe()
        let errorPipe = Pipe()
        task.standardOutput = pipe
        task.standardError = errorPipe
        let outHandle = pipe.fileHandleForReading
        let errorHandle = errorPipe.fileHandleForReading
        outHandle.waitForDataInBackgroundAndNotify()
        errorHandle.waitForDataInBackgroundAndNotify()

        var updateObserver: NSObjectProtocol!
        updateObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outHandle, queue: nil, using: { notification in
            let data = outHandle.availableData
            if !data.isEmpty {
                if let str = String(data: data, encoding: .utf8) {
                    print(str) // This is differently here.
                }
                outHandle.waitForDataInBackgroundAndNotify()
            } else {
                NotificationCenter.default.removeObserver(updateObserver!)
            }
        })

        var errorObserver: NSObjectProtocol!
        errorObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: errorHandle, queue: nil, using: { notification in
            let data = errorHandle.availableData
            if !data.isEmpty {
                if let str = String(data: data, encoding: .utf8) {
                    print(str) // This is differently here.
                }
                errorHandle.waitForDataInBackgroundAndNotify()
            } else {
                NotificationCenter.default.removeObserver(errorObserver!)
            }
        })

        var taskObserver : NSObjectProtocol!
        taskObserver = NotificationCenter.default.addObserver(forName: Process.didTerminateNotification, object: task, queue: nil, using: { notification in
            print("terminated")
            NotificationCenter.default.removeObserver(taskObserver!)
        })

        task.launch()
```

Now this works for processes that print a new line with every change.

What does not work is to get outputs of processes that edit already printed lines (changin percentage or something like that).

In that case, the pipe is not pushing anything.

How would I handle that case. I thought about doing the output into a file, read that and at the end deleting it. Is that a possible solution?

Body:
I have this code to continously read the output of a started process:

let task = Process()

        task.arguments = ["-c", command]
        task.launchPath = "/bin/zsh"

        let pipe = Pipe()
        let errorPipe = Pipe()
        task.standardOutput = pipe
        task.standardError = errorPipe
        let outHandle = pipe.fileHandleForReading
        let errorHandle = errorPipe.fileHandleForReading
        outHandle.waitForDataInBackgroundAndNotify()
        errorHandle.waitForDataInBackgroundAndNotify()

        var updateObserver: NSObjectProtocol!
        updateObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: outHandle, queue: nil, using: { notification in
            let data = outHandle.availableData
            if !data.isEmpty {
                if let str = String(data: data, encoding: .utf8) {
                    print(str) // This is differently here.
                }
                outHandle.waitForDataInBackgroundAndNotify()
            } else {
                NotificationCenter.default.removeObserver(updateObserver!)
            }
        })

        var errorObserver: NSObjectProtocol!
        errorObserver = NotificationCenter.default.addObserver(forName: NSNotification.Name.NSFileHandleDataAvailable, object: errorHandle, queue: nil, using: { notification in
            let data = errorHandle.availableData
            if !data.isEmpty {
                if let str = String(data: data, encoding: .utf8) {
                    print(str) // This is differently here.
                }
                errorHandle.waitForDataInBackgroundAndNotify()
            } else {
                NotificationCenter.default.removeObserver(errorObserver!)
            }
        })

        var taskObserver : NSObjectProtocol!
        taskObserver = NotificationCenter.default.addObserver(forName: Process.didTerminateNotification, object: task, queue: nil, using: { notification in
            print("terminated")
            NotificationCenter.default.removeObserver(taskObserver!)
        })

        task.launch()

Now this works for processes that print a new line with every change.

What does not work is to get outputs of processes that edit already printed lines (changin percentage or something like that).

In that case, the pipe is not pushing anything.

How would I handle that case. I thought about doing the output into a file, read that and at the end deleting it. Is that a possible solution?


问:
BlockingIOError: [Errno 11] write could not complete without blocking
```<code>Please help, I have developed this scraper API and it works with internal commands in Pythionanywhere, but when I try to access it using my use account URL, it gives the error: [errno 11] and I have searched for solutions, I co[enter image description here](https://i.stack.imgur.com/cs9T6.png)uldn't find any.
</code>```

I was expecting a JSON output as it did on the internal server.

#from requests_html import HTMLSession
import json
import requests

class Scraper():

```<code>def scrapedata(self, tag):

    url = "https://www.etenders.gov.za/Home/TenderOpportunities/?status=1"
    headers = {'user-agent': 'Mozilla/5.0'}
    response = requests.get(url, headers=headers)
    data   = response.json()

    file_urs = []

    for e in data:
        item = {
            'province':  (f"{e['province']}"),
            'id'      :  (f"{e['tender_No']}"),
        }

        print(file_urs)
        file_urs.append(item)

    return file_urs
</code>```

quotes    = Scraper()

quotes.scrapedata('cat')

```<code>
</code>```

from flask import Flask
import json
from scrape import Scraper

app = Flask(name)

quotes = Scraper()

@app.route('/', methods =['GET', 'POST'])
async def read_item(cat):
json_dumps = json.dumps.scrapedata(cat)
return json_dumps
#return quotes.scrapedata(cat).jon()

```<code>
</code>```

from flask import Flask
import json
from scrape import Scraper

app = Flask(name)

quotes = Scraper()

@app.route('/', methods =['GET', 'POST'])
async def read_item(cat):
json_dumps = json.dumps.scrapedata(cat)
return json_dumps
#return quotes.scrapedata(cat).jon()

```<code>
</code>```

I was expecting a JSON output as it did on the internal server.

Body:
Please help, I have developed this scraper API and it works with internal commands in Pythionanywhere, but when I try to access it using my use account URL, it gives the error: [errno 11] and I have searched for solutions, I co[enter image description here](https://i.stack.imgur.com/cs9T6.png)uldn't find any.

I was expecting a JSON output as it did on the internal server.

#from requests_html import HTMLSession
import json
import requests

class Scraper():

def scrapedata(self, tag):

    url = "https://www.etenders.gov.za/Home/TenderOpportunities/?status=1"
    headers = {'user-agent': 'Mozilla/5.0'}
    response = requests.get(url, headers=headers)
    data   = response.json()

    file_urs = []

    for e in data:
        item = {
            'province':  (f"{e['province']}"),
            'id'      :  (f"{e['tender_No']}"),
        }

        print(file_urs)
        file_urs.append(item)

    return file_urs

quotes    = Scraper()

quotes.scrapedata('cat')

from flask import Flask
import json
from scrape import Scraper

app = Flask(name)

quotes = Scraper()

@app.route('/', methods =['GET', 'POST'])
async def read_item(cat):
json_dumps = json.dumps.scrapedata(cat)
return json_dumps
#return quotes.scrapedata(cat).jon()

from flask import Flask
import json
from scrape import Scraper

app = Flask(name)

quotes = Scraper()

@app.route('/', methods =['GET', 'POST'])
async def read_item(cat):
json_dumps = json.dumps.scrapedata(cat)
return json_dumps
#return quotes.scrapedata(cat).jon()

I was expecting a JSON output as it did on the internal server.


问:
How do I parse twitter api in javascript
I've started using the twitter API and when you retrieve a user’s timeline it returns this json string. I has multiple of these strings how can i split them up in JavaScript (ideally use them in a function)

[
    {
        "created_at": "Sat Dec 10 21:38:10 +0000 2022",
        "id": 1601692776684736512,
        "id_str": "1601692776684736512",
        "text": "thanks for your patience as we\u2019ve worked to make Blue better \u2013 we\u2019re excited and looking forward to sharing more with you soon!",....
    },
```


问:
CKEDITOR5 and WORD
I’m using ckeditor5 to insert WORD texts to a website.
As an example I have a small roleplay.

Normal Text in WORD

She Fix this for me, will you.

She Roger.

He  (Distracted, still not looking up:) What?

She I can’t get this …

HTML Text

```<code><STRONG>She</STRONG>    Fix this for me, will you.

<STRONG>She</STRONG>    Roger.

<STRONG>He</STRONG> <I>(Distracted, still not looking up:)</I> What?

<STRONG>She</STRONG>    I can’t get this …
</code>```

The first words (she and he) are bold. During copy and paste the ckeditor lost this information bold or not bold and formed the whole sentence bold.
The italic part in line 3 will be inserted correctly.

How can I solve this problem?

Title: CKEDITOR5 and WORD

Body:
I’m using ckeditor5 to insert WORD texts to a website.
As an example I have a small roleplay.

Normal Text in WORD

She Fix this for me, will you.

She Roger.

He  (Distracted, still not looking up:) What?

She I can’t get this …

HTML Text

She    Fix this for me, will you.

She    Roger.

He (Distracted, still not looking up:) What?

She    I can’t get this …

The first words (she and he) are bold. During copy and paste the ckeditor lost this information bold or not bold and formed the whole sentence bold.
The italic part in line 3 will be inserted correctly.

How can I solve this problem?


问:
Boxplot hue labels
I have Boxplot and I want to put hue label at same place rather than to be in different places as in this image Boxplot, how Ican fix it?
this is my code,</p>
```<code>plt.figure(figsize=(30,20))
num_list=Final_dataset.columns.values.tolist()
for i in range(len(num_list)):
        column=num_list[i]
        sns.boxplot(x=typen,y=column,data=Final_dataset, order=[
                 'Social', 'Religion', 'Politics', 'Health','Other'],hue=label, palette='Paired',showfliers = False)
        plt.title(column,fontsize=20)
        plt.rc('xtick', labelsize=15)
        plt.rc('ytick', labelsize=15)
        plt.subplot(4,3,i+1)
        plt.subplots_adjust(left=0.1,
                    bottom=0,
                    right=1,
                    top=1,
                    wspace=0.5,
                    hspace=0.5)

plt.axis("off")
plt.savefig('{}.png'. format(i))
plt.show()
</code>```

Title: Boxplot hue labels

Body:
I have Boxplot and I want to put hue label at same place rather than to be in different places as in this image Boxplot, how Ican fix it?
this is my code,

plt.figure(figsize=(30,20))
num_list=Final_dataset.columns.values.tolist()
for i in range(len(num_list)):
        column=num_list[i]
        sns.boxplot(x=typen,y=column,data=Final_dataset, order=[
                 'Social', 'Religion', 'Politics', 'Health','Other'],hue=label, palette='Paired',showfliers = False)
        plt.title(column,fontsize=20)
        plt.rc('xtick', labelsize=15)
        plt.rc('ytick', labelsize=15)
        plt.subplot(4,3,i+1)
        plt.subplots_adjust(left=0.1,
                    bottom=0,
                    right=1,
                    top=1,
                    wspace=0.5,
                    hspace=0.5)

plt.axis("off")
plt.savefig('{}.png'. format(i))
plt.show()


问:
Why libstdc++-6.dll is so big in gstreamer 1.20.5 MinGW 64-bit installer?
OS: Windows 10

I have QT application ( Qt 5.14.0 ), that uses Gstreamer ( 1.16.2 ). Everything works ok. Now, I would like to change Gst 1.16.2 to 1.20.5.

When I build app, I get an error - I have two different versions of libstdc++ dlls.

I'm using gcc 7.3.0 in QT 5.14.0 and libstdc++-6.dll has 1,35 MB. The gst's libstdc++-6.dll has... 18,4 MB. I check a few libstdc++-6.dll ( for example for gcc 12.2.0 ) and each of them, has <2 MB. So, why libstdc++-6.dll is so big in gstreamer 1.20.5?


问:
Tiny mce maths Equation editor plugin insert bug

This equation editor plugin works pretty well while previewing in the popup editor but after importing the equation into tiny mce editor it's alignment is not same the equation doesn't looks the same.

I tried everything but nothing has worked well. I expecting the equation alignment same as in the plugin preview