我已尽力按照本网站教程在我的 MacBook Pro M1 Max 上本地安装 Kafka,然后使用以下命令运行它:
arch -x86_64 confluent local services start
. 每次我启动它时,即使修改了 control-center-production.properties 文件中的以下行,我也会在 Control center 上得到随机有趣的错误:
confluent.controlcenter.internal.topics.replication=1
confluent.controlcenter.command.topic.replication=1
confluent.monitoring.interceptor.topic.replication=1
confluent.metrics.topic.replication=1
这些已更新,因为我目前只在本地机器上运行一个 Kafka 代理。我现在遇到的错误如下所示:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/Users/samuelifere/Documents/Tutorials/Udemy/Kafka/confluent-7.0.1/share/java/acl/acl-7.0.1.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[2022-01-07 12:05:21,790] INFO [main] Capturing metrics for topic names _confluent-monitoring _confluent-metrics (io.confluent.controlcenter.streams.WindowExtractor)
[2022-01-07 12:05:21,792] INFO [main] transformerStore=MonitoringVerifierStore (io.confluent.controlcenter.streams.StreamsModule)
[2022-01-07 12:05:21,793] INFO [main] transformerStore=MonitoringTriggerStore (io.confluent.controlcenter.streams.StreamsModule)
[2022-01-07 12:05:21,793] INFO [main] transformerStore=TriggerActionsStore (io.confluent.controlcenter.streams.StreamsModule)
[2022-01-07 12:05:21,793] INFO [main] transformerStore=TriggerEventsStore (io.confluent.controlcenter.streams.StreamsModule)
[2022-01-07 12:05:21,793] INFO [main] transformerStore=AlertHistoryStore (io.confluent.controlcenter.streams.StreamsModule)
Exception in thread "main" com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Error in custom provider, java.io.IOException: Unable to create parent directories of /var/lib/confluent/control-center/1/kafka-streams
at io.confluent.controlcenter.streams.StreamsConfigModule.getStreamsStateDir(StreamsConfigModule.java:142) (via modules: com.google.inject.util.Modules$OverrideModule -> io.confluent.controlcenter.streams.StreamsConfigModule)
while locating java.nio.file.Path annotated with @io.confluent.controlcenter.streams.StreamsConfigModule$StreamsStateDir()
for the 4th parameter of io.confluent.controlcenter.streams.StreamsConfigModule.provideMonitoringStreamsConfig(StreamsConfigModule.java:56)
at io.confluent.controlcenter.streams.StreamsConfigModule.provideMonitoringStreamsConfig(StreamsConfigModule.java:56) (via modules: com.google.inject.util.Modules$OverrideModule -> io.confluent.controlcenter.streams.StreamsConfigModule)
while locating org.apache.kafka.streams.StreamsConfig
for the 2nd parameter of io.confluent.controlcenter.streams.StreamsModule.provideMonitoringHeartbeatSender(StreamsModule.java:406)
at io.confluent.controlcenter.streams.StreamsModule.provideMonitoringHeartbeatSender(StreamsModule.java:406) (via modules: com.google.inject.util.Modules$OverrideModule -> io.confluent.controlcenter.streams.StreamsModule)
while locating io.confluent.controlcenter.streams.verify.MonitoringHeartbeatSender
for the 5th parameter of io.confluent.controlcenter.streams.StreamsModule.provideVerifyTransformerSupplier(StreamsModule.java:290)
at io.confluent.controlcenter.streams.StreamsModule.provideVerifyTransformerSupplier(StreamsModule.java:290) (via modules: com.google.inject.util.Modules$OverrideModule -> io.confluent.controlcenter.streams.StreamsModule)
while locating io.confluent.controlcenter.streams.verify.VerifyTransformerSupplier
for the 5th parameter of io.confluent.controlcenter.streams.StreamBuilderProvider.<init>(StreamBuilderProvider.java:219)
while locating io.confluent.controlcenter.streams.StreamBuilderProvider
at io.confluent.controlcenter.streams.StreamsModule.configure(StreamsModule.java:109) (via modules: com.google.inject.util.Modules$OverrideModule -> io.confluent.controlcenter.streams.StreamsModule)
while locating io.confluent.controlcenter.streams.C3Streams$Builder
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:543)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:186)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)
at com.google.inject.Guice.createInjector(Guice.java:87)
at com.google.inject.Guice.createInjector(Guice.java:69)
at com.google.inject.Guice.createInjector(Guice.java:59)
at io.confluent.controlcenter.util.InjectorFactory.createInjectorHelper(InjectorFactory.java:109)
at io.confluent.controlcenter.util.InjectorFactory.createInjectorForApplication(InjectorFactory.java:65)
at io.confluent.controlcenter.application.ControlCenter.setInjector(ControlCenter.java:156)
at io.confluent.controlcenter.application.ControlCenter.run(ControlCenter.java:69)
at io.confluent.controlcenter.ControlCenter.main(ControlCenter.java:46)
Caused by: java.io.IOException: Unable to create parent directories of /var/lib/confluent/control-center/1/kafka-streams
at com.google.common.io.Files.createParentDirs(Files.java:485)
at io.confluent.controlcenter.streams.StreamsConfigModule.getStreamsStateDir(StreamsConfigModule.java:147)
at io.confluent.controlcenter.streams.StreamsConfigModule$$FastClassByGuice$$35c672b2.invoke(<generated>)
at com.google.inject.internal.ProviderMethod$FastClassProviderMethod.doProvision(ProviderMethod.java:264)
at com.google.inject.internal.ProviderMethod.doProvision(ProviderMethod.java:173)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl.java:185)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.get(InternalProviderInstanceBindingImpl.java:162)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ProviderMethod.doProvision(ProviderMethod.java:173)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl.java:185)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.get(InternalProviderInstanceBindingImpl.java:162)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:148)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ProviderMethod.doProvision(ProviderMethod.java:173)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl.java:185)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.get(InternalProviderInstanceBindingImpl.java:162)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:148)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ProviderMethod.doProvision(ProviderMethod.java:173)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.provision(InternalProviderInstanceBindingImpl.java:185)
at com.google.inject.internal.InternalProviderInstanceBindingImpl$CyclicFactory.get(InternalProviderInstanceBindingImpl.java:162)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:148)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
at com.google.inject.internal.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.internal.SingleParameterInjector.getAll(SingleParameterInjector.java:65)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:113)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:306)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:60)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:148)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:39)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:211)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:182)
... 9 more
请,任何帮助将不胜感激!提前致谢。