Used terraform to launch 2 containers. Caddy container works well but the Seq container will just Run for a few seconds and then get stuck at 'Waiting' and terminated state. If I change the Seq to another image such as Rabbit MQ, it works with no issue. What port should I put the Seq image in?
Here is my terraform setting for the seq container:
container {
name = "seq-aci-container"
image = "datalust/seq:latest"
cpu = "1"
memory = "1"
ports {
port = 5341
protocol = "TCP"
}
volume {
name = "seq-aci-data"
mount_path = "/data"
storage_account_name = "seqacistorage"
storage_account_key = "<QUnGu7Iz+4R...c728qLY7+AStEEElJg==>"
share_name = "seq-aci-data"
}
environment_variables = {
"ACCEPT_EULA" = "Y"
"SEQ_API_CANONICALURI" = "http://seq-aci-dns.eastus.azurecontainer.io/"
}
}
Based on your Terraform configuration, you have set up the Seq container to expose port 5341. This is generally the default port for Seq's ingestion over HTTP, so it should be correct. However, based on my experience there are a few other factors to consider, to troubleshoot the problem.
First, check the logs of your Seq container for more details such as Waiting' or 'Terminated' state and associated error message.
Secondly, Seq, as a logging server, can be resource intensive. Based on your workload requirement ensure that the CPU and memory limits specified in your Terraform configuration are sufficient. The values you mentioned currently is (cpu = "1"
and memory = "1"
)
Finally, double-check the environment variables in your Terraform configuration for any missing environment variable in addition to SEQ_API_CANONICALURI
such as ACCEPT_EULA
If Seq stores data on a persistent volume, you might need environment variables to specify the paths. For example, SEQ_STORAGE_PATH
then SEQ_LOG_LEVEL
for Seq's internal logging.
environment_variables = {
"ACCEPT_EULA" = "Y"
"SEQ_API_CANONICALURI" = "http://seq-aci-dns.eastus.azurecontainer.io/"
// Add additional environment variables below
"SEQ_STORAGE_PATH" = "/path/to/seq/storage" // Replace with the actual storage path, if different from default
"SEQ_LOG_LEVEL" = "Information" // Adjust the log level as needed
// Include other environment variables here as necessary
}
Reference Documents: Seq setup