XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. jkrzyz
    J
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Groups 0

    jkrzyz

    @jkrzyz

    1
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    jkrzyz Unfollow Follow

    Latest posts made by jkrzyz

    • Rest api timeout, how to set timeout in xo-cli

      Hi,

      I have problem like below:

      # time /usr/local/bin/xo-cli rest get /rest/v0/backups/logs filter="jobName:backup-job start:>1705222765000 start:<1705309165000" fields=status
      āœ– Error: HTTP connection has timed out
          at ClientRequest.<anonymous> (/usr/local/lib/node_modules/xo-cli/node_modules/http-request-plus/index.js:61:25)
          at ClientRequest.emit (node:events:514:28)
          at TLSSocket.emitRequestTimeout (node:_http_client:840:9)
          at Object.onceWrapper (node:events:628:28)
          at TLSSocket.emit (node:events:526:35)
          at Socket._onTimeout (node:net:589:8)
          at listOnTimeout (node:internal/timers:573:17)
          at process.processTimers (node:internal/timers:514:7) {
        originalUrl: 'https://hxo/rest/v0/backups/logs?filter=jobName%3A+backup-job+start%3A%3E1705222765000+start%3A%3C1705309165000&fields=status',
        url: 'https://hxo/rest/v0/backups/logs?filter=jobName%3A+backup-job+start%3A%3E1705222765000+start%3A%3C1705309165000&fields=status'
      }
      
      real	0m5.283s
      user	0m0.322s
      sys	0m0.134s
      

      It seems there is 5 sec timeout on server response.
      Is there any way to change this timeout?

      posted in REST API
      J
      jkrzyz