JMDirksen / TransIP-DDNS-Docker

Docker container for updating a TransIP DNS record when public IP changes
4 stars 2 forks source link

Retry API if it fails. #3

Open MastaG opened 5 months ago

MastaG commented 5 months ago

Hi there,

I've several instances of the container running for multiple domains. However it seems Transip sometimes locks the session:

61294ecd8b9cc7f873039380ee2a96fcc94d0bb9d492bda7364ec917377fd00c
2024-06-05 14:25:42 Started

Box Requirements Checker
========================

> Using PHP 8.3.6
> PHP is using the following php.ini file:
  /usr/local/etc/php/php.ini

> Checking Box requirements:
  ✔ This application requires a PHP version matching "^7.2.5|^8.0".
  ✔ This application requires the extension "json".
  ✔ The package "guzzlehttp/guzzle" requires the extension "json".
  ✔ The package "transip/transip-api-php" requires the extension "json".
  ✔ The package "transip/transip-api-php" requires the extension "openssl".
  ✔ The package "symfony/service-contracts" conflicts with the extension "psr".

 [OK] Your system is ready to run the application.                             

Checking API connection to endpoint 'https://api.transip.nl/v6'

API connection failed!
The label 'api.lib-1717590371' is already used in another active access token.

From this point on it will keep on repeating:

In Settings.php line 64:

  Please run the setup command, the config file has not been set  

domain:dns:updatednsentry [--format [FORMAT]] [--configFile [CONFIGFILE]] [--] <DomainName> <Name> <Expire> <Type> <Content>

Could you add a health-check that makes it restart the API connection if it fails?

MastaG commented 5 months ago

Or the ability to supply multiple A-records? Because the reason I'm running multiple instances is because I need to update multiple vhosts.