I'm using EventStore in my application and currently want to deploy on one of our prod envs. While I'm in developing on my computer, EventStore starts without any issues. The issue comes when I want to start it on our prod server. EventStore starts and logs some of its configuration before it stops silently with a code 1.
On both envs I am using docker. My dev env is under macOS Catalina Version 10.15.3 and the prod env is a Debian GNU/Linux 8 (jessie).
I'm using a docker-compose.yml
configuration to deploy ES.
I did run this config on both envs and it worked only on the dev env.
I'm pretty there is something wrong with the prod env or my docker configuration and I would like to know if somebody has already seen a similar issue or if there is a way to get more information about what is going on inside EventStore?
Note: I'm using only one node.
Thanks you in advance for your help.
Here's my docker compose config:
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:
I run docker-compose up -d
in order to start EventStore. Here's the logs returned when I run docker-compose logs precontrol_eventstore
:
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
You're using the unsupported parameter EVENTSTORE_EXT_HTTP_PORT
. See more in the line from logs:
precontrol_eventstore | [ 1, 1,09:49:42.269,FTL] Error while parsing options: The option ExtHttpPort is not a known option. (Parameter 'ExtHttpPort')
EVENTSTORE_EXT_HTTP_PORT
was made obsolete in EventStoreDB version 20.10. As you're using the :latest
tag, you're getting the latest version, so 21.6. In this version, the configuration check is more strict. It does not allow providing not existing params.
Replace EVENTSTORE_EXT_HTTP_PORT
with EVENTSTORE_HTTP_PORT
in your docker-compose, and it should work fine.
I'd also recommend using the specific version tag instead of latest
. Especially for production, this may be important to not be surprised with the unexpected database version upgrade.
p.s. I also created PR fixing the wrong example in docs: https://github.com/EventStore/EventStore/pull/3057.