trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
9.83k stars 2.85k forks source link

Deployment trino-server-445 NullPointerException #21669

Open jxlining opened 2 months ago

jxlining commented 2 months ago

/opt/programs/trino-server/etc/resource-groups.properties resource-groups.configuration-manager=db resource-groups.config-db-url=jdbc:mysql://xxxxx:3306/resource_groups_445 resource-groups.config-db-user=mytrino resource-groups.config-db-password=xxxxx

2024-04-23T17:47:03.808+0800 INFO main io.trino.plugin.resourcegroups.db.FlywayMigration Performed 0 migrations 2024-04-23T17:47:03.819+0800 ERROR main io.trino.server.Server null java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:233) at com.google.common.collect.Maps.fromProperties(Maps.java:1429) at io.airlift.configuration.ConfigurationLoader.getSystemProperties(ConfigurationLoader.java:70) at io.airlift.bootstrap.Bootstrap.configure(Bootstrap.java:177) at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:246) at io.trino.plugin.resourcegroups.db.DbResourceGroupConfigurationManagerFactory.create(DbResourceGroupConfigurationManagerFactory.java:57) at io.trino.execution.resourcegroups.InternalResourceGroupManager.setConfigurationManager(InternalResourceGroupManager.java:162) at io.trino.execution.resourcegroups.InternalResourceGroupManager.loadConfigurationManager(InternalResourceGroupManager.java:146) at io.trino.server.Server.doStart(Server.java:174) at io.trino.server.Server.lambda$start$0(Server.java:94) at io.trino.$gen.Trino_445____20240423_094644_1.run(Unknown Source) at io.trino.server.Server.start(Server.java:94) at io.trino.server.TrinoServer.main(TrinoServer.java:38)

not using the resource groups properties method is success

### Tasks
jxlining commented 2 months ago

trino-403 using the resource groups properties issuccess

akenO8 commented 2 months ago

I thought it was the polyglot.engine.WarnInterpreterOnly 's value was set incorrectly, not string, cause NullPointerException.

10.11.0 Add `-Dpolyglot.engine.WarnInterpreterOnly=false` to jvm.config. @ebyhr That seems to be the reason. https://github.com/flyway/flyway/issues/3866 and https://github.com/flyway/flyway/issues/3882 @jxlining It looks like it will be fixed in trino-446 (flyway-10.11.1), so let's look forward to 446~
ebyhr commented 1 month ago

Closing as https://github.com/trinodb/trino/pull/21641. Please reopen if this issue still happens with newer versions.

findepi commented 1 month ago

I believe the problem remains.

findepi commented 1 month ago

This should help: https://github.com/airlift/airlift/pull/1167

findepi commented 1 month ago

airlift change merged. let's close this issue when we upgrade airlift.

akenO8 commented 1 month ago

I think your pr does not solve this problem. When the initial system properties have null, it is inevitable. Should we check or avoid these illegal system properties in getSystemProperties()?

findepi commented 1 month ago

@akenO8 System.setProperty("xxx", null) fails on machine. How can i enter the state when initial system properties have null value?

akenO8 commented 1 month ago

image I'm sorry I didn't understand you. As far as validate properties are concerned, I think we can add a method to remove validate property. I implemented it and avoided the exception of this issue.