I’m trying to set up log shipping to Logflare so that I can store and search logs from my app. I’m following the instructions here. As far as I can tell (which is not very far), I’ve set up my log shipper app correctly, but when I go to deploy it, it aborts.
Just to be totally transparent, here are the exact steps I’ve taken – feel free to let me know which one was a stupid mistake, or what I should have known!
- Created a new file folder directory
- Inside the folder, ran this:
flyctl launch --image ghcr.io/superfly/fly-log-shipper:latest --name="loggy" --region=sea
- Updated my
internal_port
to 8686 (like it says in the instructions – I wasn’t sure where to find any other value that it should be?) - Set my Logflare secrets like so:
flyctl secrets set -a loggy LOGFLARE_API_KEY=MY_API_KEY LOGFLARE_SOURCE_TOKEN=MY_TOKEN
- Ran
flyctl deploy
Sorry if this is a bit long, but here is the output from terminal/powershell:
Failure #1
Instance
ID PROCESS VERSION REGION DESIRED STATUS HEALTH CHECKS RESTARTS CREATED
b1798150 app 0 sea run pending 1 total 2 23s ago
Recent Events
TIMESTAMP TYPE MESSAGE
2022-11-22T04:40:25Z Received Task received by client
2022-11-22T04:40:25Z Task Setup Building Task Directory
2022-11-22T04:40:32Z Started Task started by client
2022-11-22T04:40:36Z Terminated Exit Code: 0
2022-11-22T04:40:36Z Restarting Task restarting in 1.086498661s
2022-11-22T04:40:42Z Started Task started by client
2022-11-22T04:40:46Z Terminated Exit Code: 0
2022-11-22T04:40:46Z Restarting Task restarting in 1.114105737s
2022-11-22T04:40:44Z [info]Starting clean up.
2022-11-22T04:40:51Z [info]Starting instance
2022-11-22T04:40:51Z [info]Configuring virtual machine
2022-11-22T04:40:51Z [info]Pulling container image
2022-11-22T04:40:51Z [info]Unpacking image
2022-11-22T04:40:51Z [info]Preparing kernel init
2022-11-22T04:40:52Z [info]Configuring firecracker
2022-11-22T04:40:52Z [info]Starting virtual machine
2022-11-22T04:40:52Z [info]Starting init (commit: 81d5330)...
2022-11-22T04:40:52Z [info]Preparing to run: `bash start-fly-log-transporter.sh` as root
2022-11-22T04:40:52Z [info]2022/11/22 04:40:52 listening on [fdaa:0:d90d:a7b:a45b:b179:8150:2]:22 (DNS: [fdaa::3]:53)
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.600 INFO vector::app: Log level is enabled. level="vector=info,codec=info,vrl=info,file_source=info,tower_limit=trace,rdkafka=info"
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.607 INFO vector::app: Loading configs. paths=["/etc/vector/vector.toml"]
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.651 INFO vector::topology::running: Running healthchecks.
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.651 INFO vector::topology::builder: Healthcheck: Passed.
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.651 INFO vector::topology::builder: Healthcheck: Passed.
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.653 INFO vector::topology::running: Starting source. key=fly_log_metrics
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.653 INFO vector::topology::running: Starting source. key=fly_socket
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.653 INFO vector::topology::running: Starting transform. key=log_json
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.653 INFO vector::topology::running: Starting sink. key=blackhole
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.653 INFO vector::topology::running: Starting sink. key=fly_log_metrics_prometheus
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.654 INFO vector: Vector has started. debug="false" version="0.17.2" arch="x86_64" build_id="cc07286 2021-10-19"
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.654 INFO source{component_kind="source" component_id=fly_socket component_type=socket component_name=fly_socket}: vector::sources::util::unix_stream: Listening. path="/var/run/vector.sock" type="unix"
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.655 INFO vector::internal_events::api: API server running. address=0.0.0.0:8686 playground=http://0.0.0.0:8686/playground
2022-11-22T04:40:52Z [info]Nov 22 04:40:52.657 INFO vector::sinks::blackhole: Total events collected events=0 raw_bytes_collected=0
2022-11-22T04:40:54Z [info]dial tcp [fdaa::3]:4223: i/o timeout
2022-11-22T04:40:54Z [info]Nov 22 04:40:54.996 INFO source{component_kind="source" component_id=fly_socket component_type=socket component_name=fly_socket}:connection: vector::sources::util::unix_stream: Finished sending.
2022-11-22T04:40:54Z [info]Nov 22 04:40:54.997 INFO vector: Vector has stopped.
2022-11-22T04:40:54Z [info]Nov 22 04:40:54.997 INFO vector::sinks::blackhole: Total events collected events=0 raw_bytes_collected=0
2022-11-22T04:40:55Z [info]Starting clean up.
--> v0 failed - Failed due to unhealthy allocations - no stable job version to auto revert to and deploying as v1
--> Troubleshooting guide at https://fly.io/docs/getting-started/troubleshooting/
Error abort
Any insight or pointers would be greatly appreciated!
Edit: I also set the ACESS_TOKEN
secret by…
- Running
flyctl auth token
- Running
flyctl secrets set ACCESS_TOKEN=output_of_previous_line
However, I still get the above error/abort message on deploy.