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

Errors messages do not include full message from server. #99

Open
lathspell opened this issue Mar 10, 2021 · 8 comments
Open

Errors messages do not include full message from server. #99

lathspell opened this issue Mar 10, 2021 · 8 comments

Comments

@lathspell
Copy link

I tried creating a used and just got:

Error: Failed to parse server response: invalid character 'P' looking for beginning of value.

This is not very helpful, it would be better if the complete response or at least the first e.g. 80 chars would be printed.
Maybe I used the wrong URL or my authentication was wrong (doesn't matter here, the issue is not abount my config mistake just about the error messsage.

I'm using aminueza/minio-1.2.0 with terraform 0.14.7


2021/03/10 14:57:39 [TRACE] GRPCProvider: PlanResourceChange
2021/03/10 14:57:39 [WARN] Provider "registry.terraform.io/aminueza/minio" produced an invalid plan for minio_iam_user.minio_user, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .update_secret: planned value cty.False does not match config value cty.NullVal(cty.Bool)
      - .disable_user: planned value cty.False does not match config value cty.NullVal(cty.Bool)
      - .force_destroy: planned value cty.False does not match config value cty.NullVal(cty.Bool)
2021/03/10 14:57:39 [TRACE] EvalCheckPlannedChange: Verifying that actual change (action Create) matches planned change (action Create)
2021/03/10 14:57:39 [TRACE] EvalReadState: reading state for minio_iam_user.minio_user
2021/03/10 14:57:39 [TRACE] EvalReadState: no state present for minio_iam_user.minio_user
minio_iam_user.minio_user: Creating...
2021/03/10 14:57:39 [DEBUG] EvalApply: ProviderMeta config value set
2021/03/10 14:57:39 [DEBUG] minio_iam_user.minio_user: applying the planned Create change
2021/03/10 14:57:39 [TRACE] GRPCProvider: ApplyResourceChange

2021/03/10 14:57:44 [TRACE] dag/walk: vertex "meta.count-boundary (EachMode fixup)" is waiting for "minio_iam_user.minio_user"
2021/03/10 14:57:44 [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/aminueza/minio\"] (close)" is waiting for "minio_iam_user.minio_user"
2021/03/10 14:57:44 [TRACE] dag/walk: vertex "root" is waiting for "meta.count-boundary (EachMode fixup)"
2021/03/10 14:57:44 [DEBUG] minio_iam_user.minio_user: apply errored, but we're indicating that via the Error pointer rather than returning it: Failed to parse server response: invalid character 'P' looking for beginning of value.
2021/03/10 14:57:44 [TRACE] EvalMaybeTainted: minio_iam_user.minio_user encountered an error during creation, so it is now marked as tainted

@toabi
Copy link

toabi commented Mar 17, 2021

Indeed it would make debugging much easier. My example:

module.minio.minio_iam_user.my_user: Creating...

Error: Failed to parse server response: invalid character '<' looking for beginning of value.

  on modules/minio/configuration.tf line 6, in resource "minio_iam_user" "my_user":
   6: resource "minio_iam_user" "my_user" {

@ntdt
Copy link

ntdt commented Apr 7, 2021

It'll helpful to debug, I have no problem using this provider to create an user on a minio docker, but with minio deployed on k8s and a ingress-nginx, I have this error message
Error: Failed to parse server response: invalid character '<' looking for beginning of value. so my focus is on ingress-nginx.

@selfuryon
Copy link

I have similar problem with kubernetes #112

@selfuryon
Copy link

Test it without nginx-ingress, and it works fine, so problem really is in ingress controller

@ntdt
Copy link

ntdt commented May 21, 2021

Agreed, I'll close this issue.

@selfuryon
Copy link

In my case the problem was in TLS provider configuration. This provider sets minio_ssl to false by default, so it was the reason of weird message outputs and not working apply.
Needs to set minio_ssl to true for tls/ssl

provider "minio" {
  ...
  minio_ssl    = true
}

@ntdt
Copy link

ntdt commented May 25, 2021

In my case the problem was in TLS provider configuration. This provider sets minio_ssl to false by default, so it was the reason of weird message outputs and not working apply.
Needs to set minio_ssl to true for tls/ssl

provider "minio" {
  ...
  minio_ssl    = true
}

It works with this option minio_ssl = true

@enmanuelmoreira
Copy link

enmanuelmoreira commented Nov 30, 2023

It works for me with this option minio_ssl = true

(Minio on k3s cluster behind nginx ingress)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants