maniekes commented on PR #13321: URL: https://github.com/apache/kafka/pull/13321#issuecomment-1594900986
some extra research. i rolled back changes for cygpath --windows in MSYS2 MINGW64 i got following error: ```bash *****@rafal-laptok MINGW64 /c/rafal/git/maniekes-kafka $ ./bin/kafka-server-start.sh config/server.properties [0.003s][error][logging] Error opening log file 'C;C:\msys64\rafal\git\maniekes-kafka\logs\kafkaServer-gc.log;time,tags;filecount=10,filesize=100M': Invalid argument [0.003s][error][logging] Initialization of output 'file=C;C:\msys64\rafal\git\maniekes-kafka\logs\kafkaServer-gc.log;time,tags;filecount=10,filesize=100M' using options '(null)' failed. Invalid -Xlog option '-Xlog:gc*:file=C;C:\msys64\rafal\git\maniekes-kafka\logs\kafkaServer-gc.log;time,tags;filecount=10,filesize=100M', see error log for details. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. ``` after i add this to script it work fine(and logs are now properly displayed): ```bash export MSYS2_ARG_CONV_EXCL="*" # this will do the same, but only for 2 faulty arguments: export MSYS2_ARG_CONV_EXCL="-Xlog:gc*:file=;-Dlog4j.configuration=" (since i preffer lean solutions i added this verion to script) ``` in raw MSYS2 i got following error: ```bash *****@@rafal-laptok MSYS /c/rafal/git/maniekes-kafka $ ./bin/kafka-server-start.sh config/server.properties /c/rafal/git/maniekes-kafka/bin/kafka-run-class.sh: linia 352: C:\Program Files\java\jdk-19.0.1/bin/java: Bad address /c/rafal/git/maniekes-kafka/bin/kafka-run-class.sh: linia 352: C:\Program Files\java\jdk-19.0.1/bin/java: No error ``` it was caused by this line: https://github.com/apache/kafka/blob/trunk/bin/kafka-run-class.sh#L243 for some strange reason MSYS2 is not allowing to set `KAFKA_LOG4J_OPTS` in this way. was getting "Bad address" even if i removed usages of `KAFKA_LOG4J_OPTS` from the very bottom of the script. i tried to workaround this and finally i decided just to change name: ```bash KAFKA_LOG4J_CMD_OPTS="-Dkafka.logs.dir=$LOG_DIR $KAFKA_LOG4J_OPTS" ``` wchich worked perfectly for all 4 shelll. here are test results after my commit: ## git bash ```bash *****@rafal-laptok MINGW64 /c/rafal/git/maniekes-kafka (trunk) $ uname -a MINGW64_NT-10.0-22621 rafal-laptok 3.3.6-341.x86_64 2022-09-05 20:28 UTC x86_64 Msys *****@rafal-laptok MINGW64 /c/rafal/git/maniekes-kafka (trunk) $ ./bin/kafka-server-start.sh config/server.properties SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/tools/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/trogdor/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/runtime/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/mirror/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Reload4jLoggerFactory] [2023-06-16 17:43:05,794] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$) [2023-06-16 17:43:05,950] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util) [2023-06-16 17:43:06,014] INFO starting (kafka.server.KafkaServer) [2023-06-16 17:43:06,015] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer) [2023-06-16 17:43:06,023] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient) [2023-06-16 17:43:06,042] INFO Client environment:zookeeper.version=3.6.4--d65253dcf68e9097c6e95a126463fd5fdeb4521c, built on 12/18/2022 18:10 GMT (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:43:06,042] INFO Client environment:host.name=192.168.1.137 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:43:06,044] INFO Client environment:java.version=19.0.1 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:43:06,044] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:43:06,044] INFO Client environment:java.home=C:\Program Files\java\jdk-19.0.1 (org.apache.zookeeper.ZooKeeper) (... rest of logs skipped, all works fine) ``` ## MSYS2 MINGW ```bash *****@rafal-laptok MINGW64 /c/rafal/git/maniekes-kafka $ uname -a MINGW64_NT-10.0-22621 rafal-laptok 3.4.6.x86_64 2023-04-01 11:43 UTC x86_64 Msys *****@rafal-laptok MINGW64 /c/rafal/git/maniekes-kafka $ ./bin/kafka-server-start.sh config/server.properties SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/tools/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/trogdor/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/runtime/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/mirror/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Reload4jLoggerFactory] [2023-06-16 17:44:15,893] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$) [2023-06-16 17:44:16,039] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util) [2023-06-16 17:44:16,101] INFO starting (kafka.server.KafkaServer) [2023-06-16 17:44:16,101] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer) [2023-06-16 17:44:16,109] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient) [2023-06-16 17:44:16,129] INFO Client environment:zookeeper.version=3.6.4--d65253dcf68e9097c6e95a126463fd5fdeb4521c, built on 12/18/2022 18:10 GMT (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:16,129] INFO Client environment:host.name=192.168.1.137 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:16,129] INFO Client environment:java.version=19.0.1 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:16,129] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:16,129] INFO Client environment:java.home=C:\Program Files\java\jdk-19.0.1 (org.apache.zookeeper.ZooKeeper) (... rest of logs skipped, all works fine) ``` ## MSYS2 ```bash *****@rafal-laptok MSYS /c/rafal/git/maniekes-kafka $ uname -a MSYS_NT-10.0-22621 rafal-laptok 3.4.6.x86_64 2023-04-01 11:43 UTC x86_64 Msys *****@rafal-laptok MSYS /c/rafal/git/maniekes-kafka $ ./bin/kafka-server-start.sh config/server.properties SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/tools/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/trogdor/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/runtime/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/mirror/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Reload4jLoggerFactory] [2023-06-16 17:45:11,113] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$) [2023-06-16 17:45:11,269] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util) [2023-06-16 17:45:11,331] INFO starting (kafka.server.KafkaServer) [2023-06-16 17:45:11,332] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer) [2023-06-16 17:45:11,341] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient) [2023-06-16 17:45:11,365] INFO Client environment:zookeeper.version=3.6.4--d65253dcf68e9097c6e95a126463fd5fdeb4521c, built on 12/18/2022 18:10 GMT (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:45:11,365] INFO Client environment:host.name=192.168.1.137 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:45:11,365] INFO Client environment:java.version=19.0.1 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:45:11,366] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:45:11,366] INFO Client environment:java.home=C:\Program Files\java\jdk-19.0.1 (org.apache.zookeeper.ZooKeeper) (... rest of logs skipped, all works fine) ``` ## CYGWIN ```bash *****@rafal-laptok /cygdrive/c/rafal/git/maniekes-kafka $ uname -a CYGWIN_NT-10.0-22621 rafal-laptok 3.4.6-1.x86_64 2023-02-14 13:23 UTC x86_64 Cygwin *****@rafal-laptok /cygdrive/c/rafal/git/maniekes-kafka $ ./bin/kafka-server-start.sh config/server.properties SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/tools/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/trogdor/build/dependant-libs-2.13.10/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/runtime/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/C:/rafal/git/maniekes-kafka/connect/mirror/build/dependant-libs/slf4j-reload4j-1.7.36.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Reload4jLoggerFactory] [2023-06-16 17:44:44,433] INFO Registered kafka:type=kafka.Log4jController MBean (kafka.utils.Log4jControllerRegistration$) [2023-06-16 17:44:44,580] INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util) [2023-06-16 17:44:44,642] INFO starting (kafka.server.KafkaServer) [2023-06-16 17:44:44,642] INFO Connecting to zookeeper on localhost:2181 (kafka.server.KafkaServer) [2023-06-16 17:44:44,650] INFO [ZooKeeperClient Kafka server] Initializing a new session to localhost:2181. (kafka.zookeeper.ZooKeeperClient) [2023-06-16 17:44:44,671] INFO Client environment:zookeeper.version=3.6.4--d65253dcf68e9097c6e95a126463fd5fdeb4521c, built on 12/18/2022 18:10 GMT (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:44,671] INFO Client environment:host.name=192.168.1.137 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:44,671] INFO Client environment:java.version=19.0.1 (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:44,672] INFO Client environment:java.vendor=Oracle Corporation (org.apache.zookeeper.ZooKeeper) [2023-06-16 17:44:44,672] INFO Client environment:java.home=C:\Program Files\java\jdk-19.0.1 (org.apache.zookeeper.ZooKeeper) (... rest of logs skipped, all works fine) ``` let me know if you want me to clarify more -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org