Fixing a Comet server after misconfiguring S3

Software

I was configuring an S3 backup target for Comet backup server on Monday, like a gentleman, when the page went blank. I restarted the server and checked its status:

$ sudo service cometd status

And got this result:

cometd.service: Main process exited, code=exited, status=1/FAILURE
cometd.service: Failed with result 'exit-code'.
cometd.service: Scheduled restart job, restart counter is at 5.
Stopped Comet Server
cometd.service: Start request reported too quickly
cometd.service: Failed with result 'exit-code'
cometd.service: Failed to start Comet Server.

Welp! Something I changed must have done something. I tailed the logs and restarted:

$ cd /var/log/cometd/
$ tail -F *log

And found the issue:

Couldn't connect to storage: Connect: Endpoint: $DOMAIN/ does not \
follow ip address or domain name standards.

Comet doesn’t seem to like trailing slashes. Maybe I need to put in a feature request to detect them.

You can fix it checking the config file:

# vi /etc/cometd/cometd.cfg

And removing the trailing forwardslash:

"S3Server": "$DOMAIN"

Now you can restart the server, and it’ll work.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!