RESTful knowledge exchange
Post Reply
Captnspdr
Veeam Vanguard
Posts: 4
Liked: 1 time
Joined: Apr 16, 2019 4:50 pm
Full Name: Jonah May
Contact:

REST API does not allow concurrent connections

Post by Captnspdr » 1 person likes this post

The REST API appears to have a bug where multiple concurrent connections are not allowed, even if different user accounts are used to generate tokens. For example, here is a snippet from the REST API service logs if two users try to connect to the API within one minute of each other:

Code: Select all

[01.04.2021 21:58:54] <17> Info         [User: Anonymous][POST] request to [/api/oauth2/token] deserialized. Message: [grant_type=password&username=INTERNAL\SvcDRAutomation&password=****]; Parameters: [x-api-version: 1.0-rev1; Connection: keep-alive,Keep-Alive; Content-Length: 75; Content-Type: application/x-www-form-urlencoded; Accept: application/json; Expect: 100-continue; Host: localhost:9419; ].
[01.04.2021 21:58:55] <17> Info         Current license edition is EnterprisePlus. Checking expiration and type...
[01.04.2021 21:58:55] <17> Info         Authenticated user: [INTERNAL\SvcDRAutomation]
[01.04.2021 21:58:55] <17> Info         User 'INTERNAL\SvcDRAutomation' authenticated successfully.
[01.04.2021 21:58:55] <17> Info         Using certificate: 0CC2F9F70550AD2BE530C3E4F4AAB1A3FC37B451 for access token
[01.04.2021 22:00:34] <04> Info         [DEBUG] Cache has been prepared successfully
[01.04.2021 22:00:39] <06> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backups] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Connection: keep-alive,Keep-Alive; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:00:39] <21> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backupInfrastructure/repositories] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Connection: Keep-Alive; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:00:39] <20> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backups] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Connection: keep-alive,Keep-Alive; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:00:42] <21> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backupInfrastructure/repositories] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:00:43] <21> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backupInfrastructure/repositories] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:00:43] <21> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/objectrestorepoints/] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Connection: keep-alive; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:01:19] <23> Info         [User: Anonymous][POST] request to [/api/oauth2/token] deserialized. Message: [grant_type=password&username=JonahM&password=****]; Parameters: [x-api-version: 1.0-rev1; Postman-Token: 292ccd38-c7ac-4199-ac7d-747a0cb00ef8; Connection: keep-alive; Content-Length: 106; Content-Type: application/x-www-form-urlencoded; Accept: application/json; Accept-Encoding: gzip, deflate, br; Host: dl-builddev:9419; User-Agent: PostmanRuntime/7.26.10; ].
[01.04.2021 22:01:19] <23> Info         Current license edition is EnterprisePlus. Checking expiration and type...
[01.04.2021 22:01:19] <23> Info         Authenticated user: [.\JonahM]
[01.04.2021 22:01:19] <23> Info         User 'JonahM' authenticated successfully.
[01.04.2021 22:01:19] <23> Info         Using certificate: 0CC2F9F70550AD2BE530C3E4F4AAB1A3FC37B451 for access token
[01.04.2021 22:01:39] <27> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backups] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Connection: keep-alive; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:01:39] <27> Error        Token expired
[01.04.2021 22:01:39] <23> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backupInfrastructure/repositories] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:01:39] <23> Error        Token expired
[01.04.2021 22:01:39] <28> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/backups] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Connection: keep-alive; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:01:39] <28> Error        Token expired
[01.04.2021 22:01:39] <28> Info         [User: INTERNAL\SvcDRAutomation][GET] request to [/api/v1/objectrestorepoints/] deserialized. Message: [null]; Parameters: [x-api-version: 1.0-rev1; Connection: keep-alive; Accept: application/json; Authorization: Bearer :**** Host: localhost:9419; ].
[01.04.2021 22:01:39] <28> Error        Token expired

oleg.feoktistov
Veeam Software
Posts: 847
Liked: 297 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: REST API does not allow concurrent connections

Post by oleg.feoktistov » 2 people like this post

Hi Jonah,

Thanks, that's definitely a bug. Looks like the token for the first user gets expired as soon as another user is authenticated. I have just brought that up with Dev/QA and will keep you posted on your bug report status.

Best regards,
Oleg

oleg.feoktistov
Veeam Software
Posts: 847
Liked: 297 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: REST API does not allow concurrent connections

Post by oleg.feoktistov » 1 person likes this post

Hi Jonah,

Confirmed as a bug with QA. The fix is scheduled to vNext.

Thanks!
Oleg

Captnspdr
Veeam Vanguard
Posts: 4
Liked: 1 time
Joined: Apr 16, 2019 4:50 pm
Full Name: Jonah May
Contact:

Re: REST API does not allow concurrent connections

Post by Captnspdr »

Thanks for passing it along Oleg. When you say vNext, do you mean the next major release, such as v12 or v11a, or the next cumulative update?

oleg.feoktistov
Veeam Software
Posts: 847
Liked: 297 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: REST API does not allow concurrent connections

Post by oleg.feoktistov »

It won't make it to the cumulative patch for sure. So, no sooner than v11a. Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest