Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Paul_Manalaysay
Participant
Jump to solution

Azure service cme test error "a bytes-like object is required, not 'str'"

Hello Checkmates community,

I'm trying to configure VMSS autoprov on Azure but when I run "service cme test" I got this error:

Testing cbccgdr...
ERROR: Controller cbccgdr failed
ERROR details: a bytes-like object is required, not 'str'

 

Hope someone from the community can help.

 

0 Kudos
2 Solutions

Accepted Solutions
AndreTobers
Employee
Employee

Normally you get this error if you run "service cme test" without setting up azure AD application and application access to subscription.

Following the admin guide: Don´t run service cme test before you finished Step 5.

In addition, the CME Log should give a good understanding what´s going on in the background.

Review logs are created by the CME on the Management Server:

/var/log/CPcme/cme.log*

look for an authorization failed message like the following: 

cloud_connectors.https.RequestException: HTTP/1.1 403 Forbidden

b'{"error":{"code":"AuthorizationFailed","message":"The client \'xxxxxxxxxxx' with object id \'xxxxxxxxxx' does not have authorization to perform action \'Microsoft.Network/virtualNetworks/read\' over scope \'/subscriptions/xxxxxxxx\' or the scope is invalid. If access was recently granted, please refresh your credentials."}}'

 

View solution in original post

0 Kudos
Paul_Manalaysay
Participant

Hi Andre,

 

That's is correct, I found out that this is a authorization/IAM issue. I added the service principal application as contributor on VNET and VMSS. 

Now it works fine. Thank you!

View solution in original post

0 Kudos
5 Replies
Rivka-Strilitz
Employee
Employee

 R&D are looking into that and will update once the issue is resolved

0 Kudos
AndreTobers
Employee
Employee

Normally you get this error if you run "service cme test" without setting up azure AD application and application access to subscription.

Following the admin guide: Don´t run service cme test before you finished Step 5.

In addition, the CME Log should give a good understanding what´s going on in the background.

Review logs are created by the CME on the Management Server:

/var/log/CPcme/cme.log*

look for an authorization failed message like the following: 

cloud_connectors.https.RequestException: HTTP/1.1 403 Forbidden

b'{"error":{"code":"AuthorizationFailed","message":"The client \'xxxxxxxxxxx' with object id \'xxxxxxxxxx' does not have authorization to perform action \'Microsoft.Network/virtualNetworks/read\' over scope \'/subscriptions/xxxxxxxx\' or the scope is invalid. If access was recently granted, please refresh your credentials."}}'

 

0 Kudos
Paul_Manalaysay
Participant

Hi Andre,

 

That's is correct, I found out that this is a authorization/IAM issue. I added the service principal application as contributor on VNET and VMSS. 

Now it works fine. Thank you!

0 Kudos
Yurybu
Employee Employee
Employee

This error can occurs if you use wrong VMSS object in the Access control (IAM).

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.