cURL and 1.2.2 Release

Just to put it out there, this is a report about an abnormality that I ran into. I’m using Ansible to install and configure Syncthing. I’m aware that it’s not supported in this manner. But, it is an abnormality and I think you’d like to know about them, even if they aren’t supported.

My Ansible plays were starting to fail on POSTing a new configuration to rest/system/config. I was able to GET from the address, so the API itself is working as expected.

For brevity, I’ll post the screenshot at the bottom here and continue with the narrative. The error I was receiving was a connection failure. I had run into these before when I didn’t have my JSON quite right, so I double checked it. It checked out fine.

I looked closer at the GET data and the changes I had made were there. Which means that the POST is going through and processed, but nothing is being returned that Ansible can read, which throws the error below.

I confirmed this by manually putting in the data in a command line curl request and received no response after the request was sent.

I rolled back my installs to explicitly require 1.2.1 and my plays run correctly.

Again, I know that this isn’t something you support and I’m not asking for support. This is a heads up.

You’re not showing a specific error but it sounds like a time out? What’s the config change you’re pushing? Does the Syncthing process log anything interesting? Maybe do this manually to figure out what’s wrong.

Hi, I did format it and submit it as part of a curl request. I took the results of the GET and ran them through a linter to make sure it was valid JSON.

It returned immediately to a prompt. I didn’t see any indication of a timeout, there wasn’t a delay in returning to the prompt or a message indicating a timeout. There’s no accompanying error message. If the JSON or template weren’t correct, Syncthing would have thrown an error at me. I’ve worked enough with Syncthing’s API to notice that.

I think the timeout message in the screenshot is just Ansible’s way of complaining that nobody answered it.

Without an example or an error or anything it’s difficult to help you.

I completely understand. Not really looking for help, just letting you know I ran into this issue. I’ll try to look at the code and get you a better answer.