Member since
11-23-2022
3
Posts
1
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
798 | 10-25-2023 05:35 AM |
06-06-2024
04:37 AM
1 Kudo
Hello I'm running apache zookeeper 3.8.4. File zookeeper.log does not get created. Log files are empty except the following message: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder". SLF4J: Defaulting to no-operation MDCAdapter implementation. SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details. How can I configure zookeeper with logs working ? According to the links, this is due to slf4j not detecting logback. The process runs with the following options in the commandline (extract) The classpath does seem to include slf4j and logback jars, as well as the conf directory containing logback.xml /apps/dis/java/jdk/bin/java -Dzookeeper.log.dir=/apps/zookeeper/log -Dzookeeper.log.file=zookeeper.log -cp ... /apps/zookeeper/bin/zkcurrent/bin/../lib/slf4j-api-1.7.30.jar: ... /apps/zookeeper/bin/zkcurrent/bin/../lib/logback-core-1.2.13.jar: ... /apps/zookeeper/bin/zkcurrent/bin/../lib/logback-classic-1.2.13.jar: /apps/zookeeper/bin/zkcurrent/bin/../conf: ... org.apache.zookeeper.server.quorum.QuorumPeerMain /apps/zookeeper/bin/zkcurrent/bin/../conf/zoo.cfg The logback.xml file is in /apps/zookeeper/bin/zkcurrent/bin/../conf with rollingfile and console appenders activated: <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>${zookeeper.console.threshold}</level> </filter> </appender> ... <appender name="ROLLINGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>${zookeeper.log.dir}/${zookeeper.log.file}</File> <encoder> <pattern>%d{ISO8601} [myid:%X{myid}] - %-5p [%t:%C{1}@%L] - %m%n</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>${zookeeper.log.threshold}</level> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <maxIndex>${zookeeper.log.maxbackupindex}</maxIndex> <FileNamePattern>${zookeeper.log.dir}/${zookeeper.log.file}.%i</FileNamePattern> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <MaxFileSize>${zookeeper.log.maxfilesize}</MaxFileSize> </triggeringPolicy> </appender> ... <root level="INFO"> <appender-ref ref="CONSOLE" /> <appender-ref ref="ROLLINGFILE" /> </root> All suggestions welcome. Regards
... View more
Labels:
- Labels:
-
Apache Zookeeper
10-25-2023
05:35 AM
The problem seemed to be caused by wrong access policies on PG under the root. With the wrong credentials the name attribute of certain PG was not returned in the response which caused pg-list to fail. Adding read policy for the credentials on the PGs solved the case. ?! Regards
... View more
10-25-2023
02:42 AM
Hello I'm running Nifi toolkit v1.12.1 with JDK 8 I'm running into a problem when running the following command cli.sh nifi pg-list -p /nifi.properties --verbose I can do a wget --certificate=./my.pem --private-key=./my.key --ca-certificate=./myca.pem https://xxx/nifi-api/flow/process-groups/root and get a correct output Can you help me get the corret output with the toolkit ? Is it possible to log the toolkit requests / responses ? The stack trace I get with the toolkit is: org.apache.nifi.toolkit.cli.api.CommandException: Error executing command 'pg-list' : null at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:65) at org.apache.nifi.toolkit.cli.impl.command.AbstractPropertyCommand.execute(AbstractPropertyCommand.java:74) at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processCommand(CommandProcessor.java:252) at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.processGroupCommand(CommandProcessor.java:233) at org.apache.nifi.toolkit.cli.impl.command.CommandProcessor.process(CommandProcessor.java:188) at org.apache.nifi.toolkit.cli.CLIMain.runSingleCommand(CLIMain.java:145) at org.apache.nifi.toolkit.cli.CLIMain.main(CLIMain.java:72) Caused by: java.lang.NullPointerException at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) at java.util.TimSort.sort(TimSort.java:220) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1462) at org.apache.nifi.toolkit.cli.impl.result.nifi.ProcessGroupsResult.<init>(ProcessGroupsResult.java:50) at org.apache.nifi.toolkit.cli.impl.command.nifi.pg.PGList.doExecute(PGList.java:78) at org.apache.nifi.toolkit.cli.impl.command.nifi.pg.PGList.doExecute(PGList.java:40) at org.apache.nifi.toolkit.cli.impl.command.nifi.AbstractNiFiCommand.doExecute(AbstractNiFiCommand.java:63) ... 6 more Regards
... View more
Labels:
- Labels:
-
Apache NiFi