Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error log from compute client sdk #40081

Open
2 tasks done
mnsc opened this issue May 8, 2024 · 4 comments
Open
2 tasks done

Error log from compute client sdk #40081

mnsc opened this issue May 8, 2024 · 4 comments
Assignees
Labels
ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@mnsc
Copy link

mnsc commented May 8, 2024

Query/Question
We are seeing error logs in production when using the resourcemanager sdk (compute client sdk) that is hard to trace back to what we are doing. It does not seem to affect our code so the sdk must do some retry or something to get this working? The error seem to indicate that some endpoint(?) returns unexpected html (white lable error?).

The log row in question with labels from grafana (our own labels redacted)

level	
ERROR

logger	
com.azure.core.implementation.MethodHandleReflectiveInvoker

message	
Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number (or 'NaN'/'INF'/'+INF'), Array, Object or token 'null', 'true' or 'false') at [Source: (byte[])"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head><meta content='text/html; charset=utf-8' http-equiv='content-type'/><style type='text/css'>body {font-family:Arial; margin-left:40px; }img { border:0 none; }#content { margin-left: auto; margin-right: auto }#message h2 { font-size: 20px; font-weight: normal; color: #000000; margin: 34px 0px 0px 0px }#message p { font-size: 13p"[truncated 488 bytes]; line: 1, column: 2]

stacktrace	

thread
reactor-http-epoll-1

So the question is if this is expected and if so are there any documentation on what different log levels mean?

Why is this not a Bug or a feature Request?
It's not a bug because it's about log levels and I don't think "too noisy" is a bug.

Setup (please complete the following information if applicable):

  • Library/Libraries:
+--- com.azure.resourcemanager:azure-resourcemanager-compute:2.38.0
|    +--- com.azure.resourcemanager:azure-resourcemanager-resources:2.38.0
|    |    +--- com.azure:azure-core:1.48.0 -> 1.49.0 (*)
|    |    \--- com.azure:azure-core-management:1.13.0 (*)
|    +--- com.azure.resourcemanager:azure-resourcemanager-storage:2.38.0
|    |    +--- com.azure.resourcemanager:azure-resourcemanager-resources:2.38.0 (*)
|    |    +--- com.azure.resourcemanager:azure-resourcemanager-msi:2.38.0
|    |    |    +--- com.azure.resourcemanager:azure-resourcemanager-resources:2.38.0 (*)
|    |    |    \--- com.azure.resourcemanager:azure-resourcemanager-authorization:2.38.0
|    |    |         \--- com.azure.resourcemanager:azure-resourcemanager-resources:2.38.0 (*)
|    |    \--- com.azure.resourcemanager:azure-resourcemanager-authorization:2.38.0 (*)
|    +--- com.azure.resourcemanager:azure-resourcemanager-network:2.38.0
|    |    \--- com.azure.resourcemanager:azure-resourcemanager-resources:2.38.0 (*)
|    +--- com.azure.resourcemanager:azure-resourcemanager-msi:2.38.0 (*)
|    \--- com.azure.resourcemanager:azure-resourcemanager-authorization:2.38.0 (*)

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

  • Query Added
  • Setup information Added
@mnsc mnsc changed the title [QUERY] Error log from compute client sdk May 8, 2024
@github-actions github-actions bot added ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels May 8, 2024
Copy link

github-actions bot commented May 8, 2024

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented May 11, 2024

You may enable the HTTP logging https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/resourcemanager#enabling-logging

It may help find which API having this probelm.

The error looks like some response is expected to be application/json, but actually is HTML.
I didn't remember API in compute would behave like this. However, if auth fails (REST API called with invalid AUTH token etc.), management.azure.com may give HTML response.

@weidongxu-microsoft weidongxu-microsoft added the needs-author-feedback More information is needed from author to address the issue. label May 14, 2024
@github-actions github-actions bot removed the needs-team-attention This issue needs attention from Azure service team or SDK team label May 14, 2024
Copy link

Hi @mnsc. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@mnsc
Copy link
Author

mnsc commented May 17, 2024

You may enable the HTTP logging

Looking at your link, do you mean the part about adding this to the resource manager?

.withLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)

If so, do you think this spring application config would achieve the same result?

spring:
  cloud:
    azure:
      client:
        http:
          logging:
            level: body_and_headers

@github-actions github-actions bot added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARM customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants