-
Notifications
You must be signed in to change notification settings - Fork 18
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
AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8 #86
Comments
Hi, thank's for reporting this. Is this happening every time? There is no stacktrace from inside Tjahzi logger, but I think I know what might be the problem. If you have that stacktrace I would appreciate if you add it to the ticket. I will try to trigger that condition and release a fix shortly. |
Yes.An error will be reported at startup. I checked the problem, because there is a problem with the initialization of the constructor of StandardMonitoringModule. I currently rewrite the constructor in this class, but I am not sure if there are other problems.
I rewrite it like this: public StandardMonitoringModule() {
this is my error logger: 15:42:53.076 [preorder-gateway-service,,,] [main] ERROR o.springframework.boot.SpringApplication - Application run failed Caused by: java.lang.IllegalStateException: Logback configuration error detected: Caused by: java.lang.IllegalStateException: Logback configuration error detected: Caused by: java.lang.IllegalStateException: Logback configuration error detected: |
After I rewrite it, it can be used normally. If you use your previous writing method, you will always report an error. |
I have another question. I use logLevelLabel Loki to receive INFo level logs. What should I configure if I only want to push ERROR logs?Thanks!
|
Hello, sorry for the inconvenience, I don't know why you don't have feedback? |
Hi, I’m very sorry, but I have been pretty busy as of late. I will get to your issue in a few days. |
Regarding your question about log level filtering - I created branch where I added test that uses configuration similar to yours (here): <configuration debug="true">
<appender name="Loki" class="pl.tkowalcz.tjahzi.logback.LokiAppender">
<host>${loki.host}</host>
<port>${loki.port}</port>
<efficientLayout>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</efficientLayout>
<header>
<name>X-Org-Id</name>
<value>Circus</value>
</header>
<label>
<name>server</name>
<value>127.0.0.1</value>
</label>
<logLevelLabel>
GATEWAY
</logLevelLabel>
</appender>
<root level="ERROR">
<appender-ref ref="Loki"/>
</root>
</configuration> The test class logs two messages with level |
Regarding your error - what is the JVM, OS and CPU platform you are running on? Is it 32bit? |
OK, |
@Zhupro so you get that error on windows? I would like to fix it, but I don't have windows computer to test on. I might just use your proposed code change just in case it's enough. |
Yes, I used the idea to start it on the windows system. For compatibility with the system, I wrote it like this.
|
|
Hello, I would like to look into this issue but need more data to understand what is happening. I see that Logback cannot stop the plugin - Tjahzi internally cannot stop the LogShipper thread. This is something I am looking at. But how did you arrive at that state? You configured Loki (Tjahzi?) with invalid 'host' config - right? Then the service started and Logback could not start? I don't know where that first line ("Failed to initialize using configuration from") comes from. Can you share your config and some steps to reproduce? Thanks |
Hi, Note: I am using log4j2 appender ''pl.tkowalcz.tjahzi:log4j2-appender:0.9.31'' |
Which JVM are you using and how do you run in 32bit mode? I can't find any JDK that will work with the |
What is the output of |
Try configuring Tjahzi to not use off heap buffers: <useOffHeapBuffer>false</useOffHeapBuffer> |
I'm sorry, but I don't know how to run a 32bit JVM. I'll try to think more about this. Why is that urgent? |
It is urgent because of the delivery dead line. I had tested it earlier on 64 bit and committed the changes and just realized that the prod environment would need 32-bit support. |
I did something that might help (I have no way of verifying this). The version 0.9.32 should be up in maven central in a few hours. |
Hi @akshu90. I would greatly appreciate feedback on the new version. Does it solve your problem? |
thank you! I will test it and get back to you! |
Tested with new version 0.9.32. The problem is solved now. Error is not seen anymore. |
Thanks for verifying. Was happy to help. |
FYI: @Zhupro. |
hello,I use version 9.20, the following error will appear when starting, what is the problem? thanks
ERROR in ch.qos.logback.core.joran.spi.Interpreter@108:16 - RuntimeException in Action for tag [appender] java.lang.IllegalStateException: AtomicBuffer is not correctly aligned: addressOffset=12 is not divisible by 8
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:318)
... 24 more
The text was updated successfully, but these errors were encountered: