首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >EventStore在启动时静默停止

EventStore在启动时静默停止
EN

Stack Overflow用户
提问于 2021-07-20 18:22:46
回答 1查看 204关注 0票数 2

我在我的应用程序中使用了EventStore,并且目前希望在我们的一个prod envs上进行部署。当我在我的计算机上进行开发时,EventStore启动时没有任何问题。当我想在我们的prod服务器上启动它时,问题就出现了。EventStore启动并记录一些配置,然后静默地停止并显示代码1。

在这两个环境中,我都使用docker。我的开发环境是在macOS Catalina version10.15.3下,产品环境是Debian GNU/Linux8 (jessie)。

我正在使用docker-compose.yml配置来部署ES。我在两个环境上都运行了这个配置,它只在dev环境下有效。

我很高兴prod环境或我的docker配置有问题,我想知道是否有人已经看到了类似的问题,或者是否有方法可以获得更多关于EventStore内部发生的事情的信息?

注意:我只使用了一个节点。

提前感谢您的帮助。

这是我的docker组合配置:

代码语言:javascript
复制
version: "3.7"
services:
    precontrol_eventstore:
        image: eventstore/eventstore:latest
        container_name: precontrol_eventstore
        environment:
            - EVENTSTORE_CLUSTER_SIZE=1
            - EVENTSTORE_RUN_PROJECTIONS=All
            - EVENTSTORE_START_STANDARD_PROJECTIONS=true
            - EVENTSTORE_EXT_TCP_PORT=1113
            - EVENTSTORE_EXT_HTTP_PORT=2113
            - EVENTSTORE_INSECURE=true
            - EVENTSTORE_ENABLE_EXTERNAL_TCP=true
            - EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP=true
        ports:
            - "1113:1113"
            - "2113:2113"
        volumes:
            - .docker/eventstore/lib/:/var/lib/eventstore
            - .docker/eventstore/log/:/var/log/eventstore
        networks:
            apps_default_network:
networks:
    apps_default_network:

我运行docker-compose up -d是为了启动EventStore。下面是我运行docker-compose logs precontrol_eventstore时返回的日志

代码语言:javascript
复制
precontrol_eventstore     | [    1, 1,09:49:42.269,FTL] Error while parsing options: The option ExtHttpPort is not a known option. (Parameter 'ExtHttpPort')
precontrol_eventstore     | [    1, 1,09:49:42.318,INF] Options:
precontrol_eventstore     | OPTION                                                    DESCRIPTION
precontrol_eventstore     | 
precontrol_eventstore     | Application Options
precontrol_eventstore     | --help=false                                              Show help.
precontrol_eventstore     | --version=false                                           Show version.
precontrol_eventstore     | --log=/var/log/eventstore                                 Path where to keep log files.
precontrol_eventstore     | --log-config=logconfig.json                               The name of the log configuration file.
precontrol_eventstore     | --log-level=Default                                       Sets the minimum log level. For more granular settings, please edit logconfig.json. (Default, Verbose, Debug, Information, Warning, Error, Fatal)
precontrol_eventstore     | --config=/etc/eventstore/eventstore.conf                  Configuration files.
precontrol_eventstore     | --what-if=false                                           Print effective configuration to console and then exit.
precontrol_eventstore     | --start-standard-projections=false                        Start the built in system projections.
precontrol_eventstore     | --disable-http-caching=false                              Disable HTTP caching.
precontrol_eventstore     | --stats-period-sec=30                                     The number of seconds between statistics gathers.
precontrol_eventstore     | --worker-threads=0                                        The number of threads to use for pool of worker services. Set to '0' to scale automatically (Default)
precontrol_eventstore     | --enable-histograms=false                                 Enables the tracking of various histograms in the backend, typically only used for debugging, etc.
precontrol_eventstore     | --log-http-requests=false                                 Log Http Requests and Responses before processing them.
precontrol_eventstore     | --log-failed-authentication-attempts=false                Log the failed authentication attempts.
precontrol_eventstore     | --skip-index-scan-on-reads=false                          Skip Index Scan on Reads. This skips the index scan which was used to stop reading duplicates.
precontrol_eventstore     | --max-append-size=1048576                                 The maximum size of appends, in bytes. May not exceed 16MB.
precontrol_eventstore     | --insecure=false                                          Disable Authentication, Authorization and TLS on all TCP/HTTP interfaces.
precontrol_eventstore     | 
precontrol_eventstore     | Authentication/Authorization Options
precontrol_eventstore     | --authorization-type=internal                             The type of authorization to use.
precontrol_eventstore     | --authorization-config                                    Path to the configuration file for authorization configuration (if applicable).
precontrol_eventstore     | --authentication-type=internal                            The type of Authentication to use.
precontrol_eventstore     | --authentication-config                                   Path to the configuration file for Authentication configuration (if applicable).
precontrol_eventstore     | --disable-first-level-http-authorization=false            Disables first level authorization checks on all HTTP endpoints. This option can be enabled for backwards compatibility with EventStore 5.0.1 or earlier.
precontrol_eventstore     | 
precontrol_eventstore     | Certificate Options
precontrol_eventstore     | --trusted-root-certificates-path                          The path to a directory which contains trusted X.509 (.pem, .crt, .cer, .der) root certificate files.
precontrol_eventstore     | --certificate-reserved-node-common-name=eventstoredb-node The reserved common name to authenticate EventStoreDB nodes/servers from certificates
precontrol_eventstore     | 
precontrol_eventstore     | Certificate Options (from file)
precontrol_eventstore     | --certificate-file                                        The path to a PKCS #12 (.p12/.pfx) or an X.509 (.pem, .crt, .cer, .der) certificate file.
precontrol_eventstore     | --certificate-private-key-file                            The path to the certificate private key file (.key) if an X.509 (.pem, .crt, .cer, .der) certificate file is provided.
precontrol_eventstore     | --certificate-password                                    The password to the certificate if a PKCS #12 (.p12/.pfx) certificate file is provided.
precontrol_eventstore     | 
precontrol_eventstore     | Certificate Options (from store)
precontrol_eventstore     | --certificate-store-location                              The certificate store location name.
precontrol_eventstore     | --certificate-store-name                                  The certificate store location name.
precontrol_eventstore     | --certificate-subject-name                                The certificate store subject name.
precontrol_eventstore     | --certificate-thumbprint                                  The certificate fingerprint/thumbprint.
precontrol_eventstore     | 
precontrol_eventstore     | Cluster Options
precontrol_eventstore     | --stream-info-cache-capacity=0                            The maximum number of entries to keep in the stream info cache. Set to '0' to scale automatically (Default)
precontrol_eventstore     | --cluster-size=1                                          The number of nodes in the cluster.
precontrol_eventstore     | --node-priority=0                                         The node priority used during leader election.
precontrol_eventstore     | --commit-count=-1                                         The number of nodes which must acknowledge commits before acknowledging to a client.
precontrol_eventstore     | --prepare-count=-1                                        The number of nodes which must acknowledge prepares.
precontrol_eventstore     | --discover-via-dns=true                                   Whether to use DNS lookup to discover other cluster nodes.
precontrol_eventstore     | --cluster-dns=fake.dns                                    DNS name from which other nodes can be discovered.
precontrol_eventstore     | --cluster-gossip-port=2113                                The port on which cluster nodes' managers are running.
precontrol_eventstore     | --gossip-seed                                             Endpoints for other cluster nodes from which to seed gossip.
precontrol_eventstore     | --gossip-interval-ms=2000                                 The interval, in ms, nodes should try to gossip with each other.
precontrol_eventstore     | --gossip-allowed-difference-ms=60000                      The amount of drift, in ms, between clocks on nodes allowed before gossip is rejected.
precontrol_eventstore     | --gossip-timeout-ms=2500                                  The timeout, in ms, on gossip to another node.
precontrol_eventstore     | --read-only-replica=false                                 Sets this node as a read only replica that is not allowed to participate in elections or accept writes from clients.
precontrol_eventstore     | --unsafe-allow-surplus-nodes=false                        Allow more nodes than the cluster size to join the cluster as clones. (UNSAFE: can cause data loss if a clone is promoted as leader)
precontrol_eventstore     | --dead-member-removal-period-sec=1800                     The number of seconds a dead node will remain in the gossip before being pruned.
precontrol_eventstore     | --quorum-size=1                                           
precontrol_eventstore     | --prepare-ack-count=1                                     
precontrol_eventstore     | --commit-ack-count=1                                      
precontrol_eventstore     | 
precontrol_eventstore     | Database Options
precontrol_eventstore     | --min-flush-delay-ms=2                                    The minimum flush delay in milliseconds.
precontrol_eventstore     | --disable-scavenge-merging=false                          Disables the merging of chunks when scavenge is running.
precontrol_eventstore     | --scavenge-history-max-age=30                             The number of days to keep scavenge history.
precontrol_eventstore     | --cached-chunks=-1                                        The number of chunks to cache in unmanaged memory.
precontrol_eventstore     | --chunks-cache-size=536871424                             The amount of unmanaged memory to use for caching chunks in bytes.
precontrol_eventstore     | --max-mem-table-size=1000000                              Adjusts the maximum size of a mem table.
precontrol_eventstore     | --hash-collision-read-limit=100                           The number of events to read per candidate in the case of a hash collision.
precontrol_eventstore     | --db=/var/lib/eventstore                                  The path the db should be loaded/saved to.
precontrol_eventstore     | --index                                                   The path the index should be loaded/saved to.
precontrol_eventstore     | --mem-db=false                                            Keep everything in memory, no directories or files are created.
precontrol_eventstore     | --skip-db-verify=false                                    Bypasses the checking of file hashes of database during startup (allows for faster startup).
precontrol_eventstore     | --write-through=false                                     Enables Write Through when writing to the file system, this bypasses filesystem caches.
precontrol_eventstore     | --unbuffered=false                                        Enables Unbuffered/DirectIO when writing to the file system, this bypasses filesystem caches.
precontrol_eventstore     | --chunk-initial-reader-count=5                            The initial number of readers to start when opening a TFChunk.
precontrol_eventstore     | --prepare-timeout-ms=2000                                 Prepare timeout (in milliseconds).
precontrol_eventstore     | --commit-timeout-ms=2000                                  Commit timeout (in milliseconds).
precontrol_eventstore     | --write-timeout-ms=2000                                   Write timeout (in milliseconds).
precontrol_eventstore     | --unsafe-disable-flush-to-disk=false                      Disable flushing to disk. (UNSAFE: on power off)
precontrol_eventstore     | --unsafe-ignore-hard-delete=false                         Disables Hard Deletes. (UNSAFE: use to remove hard deletes)
precontrol_eventstore     | --skip-index-verify=false                                 Bypasses the checking of file hashes of indexes during startup and after index merges (allows for faster startup and less disk pressure after merges).
precontrol_eventstore     | --index-cache-depth=16                                    Sets the depth to cache for the mid point cache in index.
precontrol_eventstore     | --optimize-index-merge=false                              Makes index merges faster and reduces disk pressure during merges.
precontrol_eventstore     | --always-keep-scavenged=false                             Always keeps the newer chunks from a scavenge operation.
precontrol_eventstore     | --reduce-file-cache-pressure=false                        Change the way the DB files are opened to reduce their stickiness in the system file cache.
precontrol_eventstore     | --initialization-threads=1                                Number of threads to be used to initialize the database. Will be capped at host processor count.
precontrol_eventstore     | --reader-threads-count=0                                  The number of reader threads to use for processing reads. Set to '0' to scale automatically (Default)
precontrol_eventstore     | --max-auto-merge-index-level=2147483647                   During large Index Merge operations, writes may be slowed down. Set this to the maximum index file level for which automatic merges should happen. Merging indexes above this level should be done manually.
precontrol_eventstore     | --write-stats-to-db=false                                 Set this option to write statistics to the database.
precontrol_eventstore     | --max-truncation=268435456                                When truncate.chk is set, the database will be truncated on startup. This is a safety check to ensure large amounts of data truncation does not happen accidentally. This value should be set in the low 10,000s for allow for standard cluster recovery operations. -1 is no max.
precontrol_eventstore     | --chunk-size=268435456                                    
precontrol_eventstore     | --stats-storage=File                                       (None, Stream, File, StreamAndFile)
precontrol_eventstore     | --db-log-format=V2                                        The log format version to use for storing the event log. V3 is currently in development and should only be used for testing purposes. (V2, ExperimentalV3)
precontrol_eventstore     | 
precontrol_eventstore     | gRPC Options
precontrol_eventstore     | --keep-alive-interval=10000                               Controls the period (in milliseconds) after which a keepalive ping is sent on the transport.
precontrol_eventstore     | --keep-alive-timeout=10000                                Controls the amount of time (in milliseconds) the sender of the keepalive ping waits for an acknowledgement. If it does not receive an acknowledgment within this time, it will close the connection.
precontrol_eventstore     | 
precontrol_eventstore     | Interface Options
precontrol_eventstore     | --int-ip=127.0.0.1                                        Internal IP Address.
precontrol_eventstore     | --ext-ip=127.0.0.1                                        External IP Address.
precontrol_eventstore     | --http-port=2113                                          The port to run the HTTP server on.
precontrol_eventstore     | --enable-external-tcp=false                               Whether to enable external TCP communication
precontrol_eventstore     | --int-tcp-port=1112                                       Internal TCP Port.
precontrol_eventstore     | --ext-tcp-port=1113                                       External TCP Port.
precontrol_eventstore     | --ext-host-advertise-as                                   Advertise External Tcp Address As.
precontrol_eventstore     | --int-host-advertise-as                                   Advertise Internal Tcp Address As.
precontrol_eventstore     | --advertise-host-to-client-as                             Advertise Host in Gossip to Client As.
precontrol_eventstore     | --advertise-http-port-to-client-as=0                      Advertise HTTP Port in Gossip to Client As.
precontrol_eventstore     | --advertise-tcp-port-to-client-as=0                       Advertise TCP Port in Gossip to Client As.
precontrol_eventstore     | --ext-tcp-port-advertise-as=0                             Advertise External Tcp Port As.
precontrol_eventstore     | --http-port-advertise-as=0                                Advertise Http Port As.
precontrol_eventstore     | --int-tcp-port-advertise-as=0                             Advertise Internal Tcp Port As.
precontrol_eventstore     | --int-tcp-heartbeat-timeout=700                           Heartbeat timeout for internal TCP sockets.
precontrol_eventstore     | --ext-tcp-heartbeat-timeout=1000                          Heartbeat timeout for external TCP sockets.
precontrol_eventstore     | --int-tcp-heartbeat-interval=700                          Heartbeat interval for internal TCP sockets.
precontrol_eventstore     | --ext-tcp-heartbeat-interval=2000                         Heartbeat interval for external TCP sockets.
precontrol_eventstore     | --gossip-on-single-node                                   When enabled, tells a single node to run gossip as if it is a cluster.
precontrol_eventstore     | --connection-pending-send-bytes-threshold=10485760        The maximum number of pending send bytes allowed before a connection is closed.
precontrol_eventstore     | --connection-queue-size-threshold=50000                   The maximum number of pending connection operations allowed before a connection is closed.
precontrol_eventstore     | --disable-admin-ui=false                                  Disables the admin ui on the HTTP endpoint.
precontrol_eventstore     | --disable-stats-on-http=false                             Disables statistics requests on the HTTP endpoint.
precontrol_eventstore     | --disable-gossip-on-http=false                            Disables gossip requests on the HTTP endpoint.
precontrol_eventstore     | --enable-trusted-auth=false                               Enables trusted authentication by an intermediary in the HTTP.
precontrol_eventstore     | --disable-internal-tcp-tls=false                          Whether to disable secure internal TCP communication.
precontrol_eventstore     | --disable-external-tcp-tls=false                          Whether to disable secure external TCP communication.
precontrol_eventstore     | --enable-atom-pub-over-http=false                         Enable AtomPub over HTTP Interface.
precontrol_eventstore     | 
precontrol_eventstore     | Projection Options
precontrol_eventstore     | --run-projections=None                                    Enables the running of projections. System runs built-in projections, All runs user projections. (None, System, All)
precontrol_eventstore     | --projection-threads=3                                    The number of threads to use for projections.
precontrol_eventstore     | --projections-query-expiry=5                              The number of minutes a query can be idle before it expires.
precontrol_eventstore     | --fault-out-of-order-projections=false                    Fault the projection if the Event number that was expected in the stream differs from what is received. This may happen if events have been deleted or expired.
precontrol_eventstore     | --projection-runtime=Interpreted                          The runtime used for executing user projections. Legacy will run v8, Interpreted will run the new interpreted runtime (Legacy, Interpreted)
precontrol_eventstore     | --projection-compilation-timeout=500                      The time in milliseconds allowed for the compilation phase of user projections
precontrol_eventstore     | --projection-execution-timeout=250                        The time in milliseconds allowed for the executing a handler in a user projection
precontrol_eventstore     | 
precontrol_eventstore exited with code 1
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-07-20 18:35:26

您正在使用不受支持的参数EVENTSTORE_EXT_HTTP_PORT。在日志行中查看更多信息:

代码语言:javascript
复制
precontrol_eventstore     | [    1, 1,09:49:42.269,FTL] Error while parsing options: The option ExtHttpPort is not a known option. (Parameter 'ExtHttpPort')

在EventStoreDB版本20.10中,EVENTSTORE_EXT_HTTP_PORT已被废弃。因为你使用的是:latest标签,所以你得到的是最新版本,所以是21.6。在这个版本中,配置检查更加严格。不允许提供不存在的参数。

在您的docker-compose中用EVENTSTORE_HTTP_PORT替换EVENTSTORE_EXT_HTTP_PORT,它应该可以正常工作。

我还建议使用特定的版本标签,而不是latest。特别是对于生产环境,不要对意外的数据库版本升级感到惊讶,这一点可能很重要。

附注:我还创建了PR来修复文档中的错误示例:https://github.com/EventStore/EventStore/pull/3057

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68453271

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档