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

[TASK][EASY] IllegalArgumentException: 'ArrayBuffer(PROMETHEUS, REST, THRIFT_BINARY)' in kyuubi.frontend.protocols is invalid. #5212

Closed
3 of 4 tasks
FourSpaces opened this issue Aug 29, 2023 · 8 comments
Assignees
Labels
kind:bug This is a clearly a bug priority:major
Milestone

Comments

@FourSpaces
Copy link
Contributor

Code of Conduct

Search before asking

  • I have searched in the issues and found no similar issues.

Describe the bug

I got this problem when deploying Kyuubi with k8s charts of Kyuubi

Affects Version(s)

1.7.1

Kyuubi Server Log Output

2023-08-29 07:00:05.228 INFO org.apache.kyuubi.zookeeper.EmbeddedZookeeper: Service[EmbeddedZookeeper] is stopped.
Exception in thread "main" java.lang.IllegalArgumentException: 'ArrayBuffer(PROMETHEUS, REST, THRIFT_BINARY)' in kyuubi.frontend.protocols is invalid. the frontend protocol should be one or more of THRIFT_BINARY,THRIFT_HTTP,REST,MYSQL,TRINO
	at org.apache.kyuubi.config.TypedConfigBuilder.$anonfun$checkValue$1(ConfigBuilder.scala:173)
	at org.apache.kyuubi.config.TypedConfigBuilder.$anonfun$transform$1(ConfigBuilder.scala:167)
	at scala.Option.map(Option.scala:230)
	at org.apache.kyuubi.config.ConfigEntryWithDefault.readFrom(ConfigEntry.scala:106)
	at org.apache.kyuubi.config.KyuubiConf.get(KyuubiConf.scala:99)
	at org.apache.kyuubi.server.KyuubiServer.frontendServices$lzycompute(KyuubiServer.scala:150)
	at org.apache.kyuubi.server.KyuubiServer.frontendServices(KyuubiServer.scala:149)
	at org.apache.kyuubi.service.Serverable.initialize(Serverable.scala:45)
	at org.apache.kyuubi.server.KyuubiServer.initialize(KyuubiServer.scala:178)
	at org.apache.kyuubi.server.KyuubiServer$.startServer(KyuubiServer.scala:59)
	at org.apache.kyuubi.server.KyuubiServer$.main(KyuubiServer.scala:99)
	at org.apache.kyuubi.server.KyuubiServer.main(KyuubiServer.scala)
2023-08-29 07:00:07.437 INFO org.apache.zookeeper.server.SessionTrackerImpl: SessionTrackerImpl exited loop!
2023-08-29 07:00:07.439 WARN org.apache.kyuubi.zookeeper.EmbeddedZookeeper: Service[EmbeddedZookeeper] is not started(STOPPED) yet.

Kyuubi Engine Log Output

No response

Kyuubi Server Configurations

## Helm chart provided Kyuubi configurations
kyuubi.kubernetes.namespace=kyuubi
kyuubi.frontend.connection.url.use.hostname=false
kyuubi.frontend.thrift.binary.bind.port=10009
kyuubi.frontend.thrift.http.bind.port=10010
kyuubi.frontend.rest.bind.port=10099
kyuubi.frontend.mysql.bind.port=3309
kyuubi.frontend.protocols=PROMETHEUS,REST,THRIFT_BINARY

# Kyuubi Metrics
kyuubi.metrics.enabled=true
kyuubi.metrics.reporters=

## User provided Kyuubi configurations

Kyuubi Engine Configurations

No response

Additional context

It seems that the configuration generated by the k8s charts of Kyuubi is incorrect. I have found the corresponding logic.

{{- define "kyuubi.frontend.protocols" -}}
{{- $protocols := list }}
{{- range $name, $frontend := .Values.server }}
{{- if $frontend.enabled }}
{{- $protocols = $name | snakecase | upper | append $protocols }}
{{- end }}
{{- end }}
{{- if not $protocols }}
{{ fail "At least one frontend protocol must be enabled!" }}
{{- end }}
{{- $protocols | join "," }}
{{- end }}

The correct logic should exclude 'prometheus'.

{{- define "kyuubi.frontend.protocols" -}}
  {{- $protocols := list }}
  {{- range $name, $frontend := .Values.server }}
    {{- if eq $frontend.enabled (ne $name "prometheus") }}
      {{- $protocols = $name | snakecase | upper | append $protocols }}
    {{- end }}
  {{- end }}
  {{- if not $protocols }}
    {{ fail "At least one frontend protocol must be enabled!" }}
  {{- end }}
  {{- $protocols |  join "," }}
{{- end }}

Are you willing to submit PR?

  • Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
  • No. I cannot submit a PR at this time.
@FourSpaces FourSpaces added kind:bug This is a clearly a bug priority:major labels Aug 29, 2023
@github-actions
Copy link

Hello @FourSpaces,
Thanks for finding the time to report the issue!
We really appreciate the community's efforts to improve Apache Kyuubi.

@yaooqinn
Copy link
Member

cc @dnskr @pan3793

@dnskr
Copy link
Contributor

dnskr commented Aug 29, 2023

@FourSpaces Thanks for reporting the issue.
The bug was introduced in the PR #5132 and the solution you suggest should fix the issue. The alternative solution is to move prometheus outside server and rename it to e.g. monitoring, because it is not a part of Kyuubi server actually.
What do you think?

I’m on vacation at the moment, so I may respond slowly.

@FourSpaces
Copy link
Contributor Author

FourSpaces commented Aug 30, 2023

@dnskr Do you mean to remove 'prometheus' node from 'server' node?

@pan3793
Copy link
Member

pan3793 commented Sep 1, 2023

Seems we can make the following change.

  server:
    ...
-   prometheus:
-     enabled: true
-     port: 10019
-     service:
-      type: ClusterIP
-      port: "{{ .Values.server.prometheus.port }}"
-      nodePort: ~
-      annotations: {}
    ...
+ monitoring:
+   prometheus:
+     enabled: true
+     port: 10019

- metricsReporters: ~
  • move prometheus node from server to monitoring as @dnskr suggested
  • metricsReporters could be inferred from monitoring's keys in runtime thus we can remove it from the values.yaml

@pan3793 pan3793 added this to the v1.8.0 milestone Sep 1, 2023
@dnskr
Copy link
Contributor

dnskr commented Sep 12, 2023

Hi @FourSpaces!
I came back from vacation and I'm ready to assist if needed. Do you want to submit the PR?

@FourSpaces
Copy link
Contributor Author

OK, I will complete and submit the PR before the end of this Sunday.

@FourSpaces
Copy link
Contributor Author

@dnskr I have submitted a PR, please check if there are any issues.

pan3793 pushed a commit that referenced this issue Oct 24, 2023
…metheus services

### _Why are the changes needed?_

This bug will affect k8s deployments.

#5212

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_
No

Closes #5281 from FourSpaces/fix_k8s_deployment_error.

Closes #5212

484da7e [伟程] Remove the monitoring.prometheus.server node that is not being used temporarily
90396c1 [伟程] Specification format
1773c7c [wei.cheng] Separate the configuration of Prometheus from other components.
59159eb [伟程] Fix configuration errors causing by k8s deployment of prometheus services.

Lead-authored-by: 伟程 <cheng1483x@gmail.com>
Co-authored-by: wei.cheng <cheng1483x@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 5eba900)
Signed-off-by: Cheng Pan <chengpan@apache.org>
@pan3793 pan3793 changed the title [Bug] java.lang.IllegalArgumentException: 'ArrayBuffer(PROMETHEUS, REST, THRIFT_BINARY)' in kyuubi.frontend.protocols is invalid. [TASK][EASY] IllegalArgumentException: 'ArrayBuffer(PROMETHEUS, REST, THRIFT_BINARY)' in kyuubi.frontend.protocols is invalid. Oct 24, 2023
davidyuan1223 pushed a commit to davidyuan1223/kyuubi that referenced this issue Oct 26, 2023
…of prometheus services

### _Why are the changes needed?_

This bug will affect k8s deployments.

apache#5212

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_
No

Closes apache#5281 from FourSpaces/fix_k8s_deployment_error.

Closes apache#5212

484da7e [伟程] Remove the monitoring.prometheus.server node that is not being used temporarily
90396c1 [伟程] Specification format
1773c7c [wei.cheng] Separate the configuration of Prometheus from other components.
59159eb [伟程] Fix configuration errors causing by k8s deployment of prometheus services.

Lead-authored-by: 伟程 <cheng1483x@gmail.com>
Co-authored-by: wei.cheng <cheng1483x@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 added a commit that referenced this issue Nov 8, 2023
### _Why are the changes needed?_

Current now, in spark-engine module, some session-level configurations are ignored due to the complexity of get session-level configurations in kyuubi spark engine, so As discussed in #5410 (comment). If we need unit test use withSessionConf method, we need make the code get configuration from the right session

The PR is unfinished, it need wait the pr #5410 success so that i can use the new change in unit test

closes #5438
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_

No

Closes #5487 from davidyuan1223/5438_add_common_method_to_support_session_config.

Closes #5438

e1ded36 [davidyuan] add more optional session level to get conf
84c4568 [davidyuan] add more optional session level to get conf
4d70902 [davidyuan] add more optional session level to get conf
96d7cde [davidyuan] Revert "add more optional session level to get conf"
940f8f8 [davidyuan] add more optional session level to get conf
15641e8 [davidyuan] add more optional session level to get conf
d838931 [davidyuan] Merge branch '5438_add_common_method_to_support_session_config' of https://github.com/davidyuan1223/kyuubi into 5438_add_common_method_to_support_session_config
2de96b5 [davidyuan] add common method to get session level config
3ec73ad [liangbowen] [KYUUBI #5522] [BATCH] Ignore main class for PySpark batch job submission
d8b808d [Cheng Pan] [KYUUBI #5523] [DOC] Update the Kyuubi supported components version
c7d15ae [Cheng Pan] [KYUUBI #5483] Release Spark TPC-H/DS Connectors with Scala 2.13
4a1db42 [zwangsheng] [KYUUBI #5513][BATCH] Always redirect delete batch request to Kyuubi instance that owns batch session
b06e044 [labbomb] [KYUUBI #5517] [UI] Initial implement the SQL Lab page
88bb6b4 [liangbowen] [KYUUBI #5486] Bump Kafka client version from 3.4.0 to 3.5.1
538a648 [davidyuan] [KYUUBI #4186] Spark showProgress with JobInfo
682e5b5 [Xianxun Ye] [KYUUBI #5405] [FLINK] Support Flink 1.18
c71528e [Cheng Pan] [KYUUBI #5484] Remove legacy Web UI
ee52b2a [Angerszhuuuu] [KYUUBI #5446][AUTHZ] Support Create/Drop/Show/Reresh index command for Hudi
6a5bb10 [weixi] [KYUUBI #5380][UT] Create PySpark batch jobs tests for RESTful API
86f692d [Kent Yao] [KYUUBI #5512] [AuthZ] Remove the non-existent query specs in Deletes and Updates
dfdd7a3 [fwang12] [KYUUBI #5499][KYUUBI #2503] Catch any exception when closing idle session
b7b3544 [伟程] [KYUUBI #5212] Fix configuration errors causing by helm charts of prometheus services
d123a5a [liupeiyue] [KYUUBI #5282] Support configure Trino session conf in `kyuubi-default.conf`
0750437 [yangming] [KYUUBI #5294] [DOC] Update supported dialects for JDBC engine
9c75d82 [zwangsheng] [KYUUBI #5435][INFRA][TEST] Improve Kyuubi On Kubernetes IT
1dc264a [Angerszhuuuu] [KYUUBI #5479][AUTHZ] Support Hudi CallProcedureHoodieCommand for stored procedures
bc3fcbb [Angerszhuuuu] [KYUUBI #5472] Permanent View should pass column when child plan no output
a67b824 [Fantasy-Jay] [KYUUBI #5382][JDBC] Duplication cleanup improvement in JdbcDialect and schema helpers
c039e1b [Kent Yao] [KYUUBI #5497] [AuthZ] Simplify debug message for missing field/method in ReflectUtils
0c8be79 [Angerszhuuuu] [KYUUBI #5475][FOLLOWUP] Authz check permanent view's subquery should check view's correct privilege
1293cf2 [Kent Yao] [KYUUBI #5500] Add Kyuubi Code Program to Doc
e2754fe [Angerszhuuuu] [KYUUBI #5492][AUTHZ] saveAsTable create DataSource table miss db info
0c53d00 [Angerszhuuuu] [KYUUBI #5447][FOLLOWUP] Remove unrelated debug prints in TableIdentifierTableExtractor
119c393 [Angerszhuuuu] [KYUUBI #5447][AUTHZ] Support Hudi DeleteHoodieTableCommand/UpdateHoodieTableCommand/MergeIntoHoodieTableCommand
3af5ed1 [yikaifei] [KYUUBI #5427] [AUTHZ] Shade spark authz plugin
503c3f7 [davidyuan] Merge remote-tracking branch 'origin/5438_add_common_method_to_support_session_config' into 5438_add_common_method_to_support_session_config
7a67ace [davidyuan] add common method to get session level config
3f42317 [davidyuan] add common method to get session level config
bb5d5ce [davidyuan] add common method to get session level config
623200f [davidyuan] Merge remote-tracking branch 'origin/5438_add_common_method_to_support_session_config' into 5438_add_common_method_to_support_session_config
8011959 [davidyuan] add common method to get session level config
605ef16 [davidyuan] Merge remote-tracking branch 'origin/5438_add_common_method_to_support_session_config' into 5438_add_common_method_to_support_session_config
bb63ed8 [davidyuan] add common method to get session level config
d9cf248 [davidyuan] add common method to get session level config
c8647ef [davidyuan] add common method to get session level config
618c0f6 [david yuan] Merge branch 'apache:master' into 5438_add_common_method_to_support_session_config
c1024bd [david yuan] Merge branch 'apache:master' into 5438_add_common_method_to_support_session_config
32028f9 [davidyuan] add common method to get session level config
03e2887 [davidyuan] add common method to get session level config

Lead-authored-by: David Yuan <yuanfuyuan@mafengwo.com>
Co-authored-by: davidyuan <yuanfuyuan@mafengwo.com>
Co-authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Co-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: Kent Yao <yao@apache.org>
Co-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: david yuan <51512358+davidyuan1223@users.noreply.github.com>
Co-authored-by: zwangsheng <binjieyang@apache.org>
Co-authored-by: yangming <261635393@qq.com>
Co-authored-by: 伟程 <cheng1483x@gmail.com>
Co-authored-by: weixi <weixi62961@outlook.com>
Co-authored-by: fwang12 <fwang12@ebay.com>
Co-authored-by: Xianxun Ye <yesorno828423@gmail.com>
Co-authored-by: liupeiyue <liupeiyue@yy.com>
Co-authored-by: Fantasy-Jay <13631435453@163.com>
Co-authored-by: yikaifei <yikaifei@apache.org>
Co-authored-by: labbomb <739955946@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
pan3793 added a commit that referenced this issue Nov 8, 2023
### _Why are the changes needed?_

Current now, in spark-engine module, some session-level configurations are ignored due to the complexity of get session-level configurations in kyuubi spark engine, so As discussed in #5410 (comment). If we need unit test use withSessionConf method, we need make the code get configuration from the right session

The PR is unfinished, it need wait the pr #5410 success so that i can use the new change in unit test

closes #5438
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request

### _Was this patch authored or co-authored using generative AI tooling?_

No

Closes #5487 from davidyuan1223/5438_add_common_method_to_support_session_config.

Closes #5438

e1ded36 [davidyuan] add more optional session level to get conf
84c4568 [davidyuan] add more optional session level to get conf
4d70902 [davidyuan] add more optional session level to get conf
96d7cde [davidyuan] Revert "add more optional session level to get conf"
940f8f8 [davidyuan] add more optional session level to get conf
15641e8 [davidyuan] add more optional session level to get conf
d838931 [davidyuan] Merge branch '5438_add_common_method_to_support_session_config' of https://github.com/davidyuan1223/kyuubi into 5438_add_common_method_to_support_session_config
2de96b5 [davidyuan] add common method to get session level config
3ec73ad [liangbowen] [KYUUBI #5522] [BATCH] Ignore main class for PySpark batch job submission
d8b808d [Cheng Pan] [KYUUBI #5523] [DOC] Update the Kyuubi supported components version
c7d15ae [Cheng Pan] [KYUUBI #5483] Release Spark TPC-H/DS Connectors with Scala 2.13
4a1db42 [zwangsheng] [KYUUBI #5513][BATCH] Always redirect delete batch request to Kyuubi instance that owns batch session
b06e044 [labbomb] [KYUUBI #5517] [UI] Initial implement the SQL Lab page
88bb6b4 [liangbowen] [KYUUBI #5486] Bump Kafka client version from 3.4.0 to 3.5.1
538a648 [davidyuan] [KYUUBI #4186] Spark showProgress with JobInfo
682e5b5 [Xianxun Ye] [KYUUBI #5405] [FLINK] Support Flink 1.18
c71528e [Cheng Pan] [KYUUBI #5484] Remove legacy Web UI
ee52b2a [Angerszhuuuu] [KYUUBI #5446][AUTHZ] Support Create/Drop/Show/Reresh index command for Hudi
6a5bb10 [weixi] [KYUUBI #5380][UT] Create PySpark batch jobs tests for RESTful API
86f692d [Kent Yao] [KYUUBI #5512] [AuthZ] Remove the non-existent query specs in Deletes and Updates
dfdd7a3 [fwang12] [KYUUBI #5499][KYUUBI #2503] Catch any exception when closing idle session
b7b3544 [伟程] [KYUUBI #5212] Fix configuration errors causing by helm charts of prometheus services
d123a5a [liupeiyue] [KYUUBI #5282] Support configure Trino session conf in `kyuubi-default.conf`
0750437 [yangming] [KYUUBI #5294] [DOC] Update supported dialects for JDBC engine
9c75d82 [zwangsheng] [KYUUBI #5435][INFRA][TEST] Improve Kyuubi On Kubernetes IT
1dc264a [Angerszhuuuu] [KYUUBI #5479][AUTHZ] Support Hudi CallProcedureHoodieCommand for stored procedures
bc3fcbb [Angerszhuuuu] [KYUUBI #5472] Permanent View should pass column when child plan no output
a67b824 [Fantasy-Jay] [KYUUBI #5382][JDBC] Duplication cleanup improvement in JdbcDialect and schema helpers
c039e1b [Kent Yao] [KYUUBI #5497] [AuthZ] Simplify debug message for missing field/method in ReflectUtils
0c8be79 [Angerszhuuuu] [KYUUBI #5475][FOLLOWUP] Authz check permanent view's subquery should check view's correct privilege
1293cf2 [Kent Yao] [KYUUBI #5500] Add Kyuubi Code Program to Doc
e2754fe [Angerszhuuuu] [KYUUBI #5492][AUTHZ] saveAsTable create DataSource table miss db info
0c53d00 [Angerszhuuuu] [KYUUBI #5447][FOLLOWUP] Remove unrelated debug prints in TableIdentifierTableExtractor
119c393 [Angerszhuuuu] [KYUUBI #5447][AUTHZ] Support Hudi DeleteHoodieTableCommand/UpdateHoodieTableCommand/MergeIntoHoodieTableCommand
3af5ed1 [yikaifei] [KYUUBI #5427] [AUTHZ] Shade spark authz plugin
503c3f7 [davidyuan] Merge remote-tracking branch 'origin/5438_add_common_method_to_support_session_config' into 5438_add_common_method_to_support_session_config
7a67ace [davidyuan] add common method to get session level config
3f42317 [davidyuan] add common method to get session level config
bb5d5ce [davidyuan] add common method to get session level config
623200f [davidyuan] Merge remote-tracking branch 'origin/5438_add_common_method_to_support_session_config' into 5438_add_common_method_to_support_session_config
8011959 [davidyuan] add common method to get session level config
605ef16 [davidyuan] Merge remote-tracking branch 'origin/5438_add_common_method_to_support_session_config' into 5438_add_common_method_to_support_session_config
bb63ed8 [davidyuan] add common method to get session level config
d9cf248 [davidyuan] add common method to get session level config
c8647ef [davidyuan] add common method to get session level config
618c0f6 [david yuan] Merge branch 'apache:master' into 5438_add_common_method_to_support_session_config
c1024bd [david yuan] Merge branch 'apache:master' into 5438_add_common_method_to_support_session_config
32028f9 [davidyuan] add common method to get session level config
03e2887 [davidyuan] add common method to get session level config

Lead-authored-by: David Yuan <yuanfuyuan@mafengwo.com>
Co-authored-by: davidyuan <yuanfuyuan@mafengwo.com>
Co-authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Co-authored-by: Cheng Pan <chengpan@apache.org>
Co-authored-by: Kent Yao <yao@apache.org>
Co-authored-by: liangbowen <liangbowen@gf.com.cn>
Co-authored-by: david yuan <51512358+davidyuan1223@users.noreply.github.com>
Co-authored-by: zwangsheng <binjieyang@apache.org>
Co-authored-by: yangming <261635393@qq.com>
Co-authored-by: 伟程 <cheng1483x@gmail.com>
Co-authored-by: weixi <weixi62961@outlook.com>
Co-authored-by: fwang12 <fwang12@ebay.com>
Co-authored-by: Xianxun Ye <yesorno828423@gmail.com>
Co-authored-by: liupeiyue <liupeiyue@yy.com>
Co-authored-by: Fantasy-Jay <13631435453@163.com>
Co-authored-by: yikaifei <yikaifei@apache.org>
Co-authored-by: labbomb <739955946@qq.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
(cherry picked from commit 9615db5)
Signed-off-by: Cheng Pan <chengpan@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug priority:major
Projects
No open projects
Development

No branches or pull requests

4 participants