yuzutech / kroki

Creates diagrams from textual descriptions!
https://kroki.io
MIT License
2.89k stars 216 forks source link

Cannot build kroki: TooLongFrameException: An HTTP line is larger than 8192 bytes #893

Closed twoi closed 3 years ago

twoi commented 3 years ago

I ran

make installLocalDependencies
make buildServer

The latter is failing with this error:

[INFO] Running io.kroki.server.ServerUriResponseTest
07:57:51.245 [vert.x-eventloop-thread-0] WARN  io.kroki.server.deprecation - KROKI_PORT is deprecated and will be removed in a future version, please use KROKI_LISTEN=0.0.0.0:36189 - documentation: https://docs.kroki.io/kroki/setup/configuration/
07:57:51.260 [vert.x-eventloop-thread-0] ERROR io.kroki.server.error.ErrorHandler - An error occurred
io.netty.handler.codec.TooLongFrameException: An HTTP line is larger than 8192 bytes.
        at io.netty.handler.codec.http.HttpObjectDecoder$LineParser.newException(HttpObjectDecoder.java:1016)
        at io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.increaseCount(HttpObjectDecoder.java:979)
        at io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.process(HttpObjectDecoder.java:967)
        at io.netty.handler.codec.http.HttpObjectDecoder$LineParser.process(HttpObjectDecoder.java:1011)
        at io.netty.buffer.AbstractByteBuf.forEachByteAsc0(AbstractByteBuf.java:1301)
        at io.netty.buffer.AbstractByteBuf.forEachByte(AbstractByteBuf.java:1281)
        at io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.parse(HttpObjectDecoder.java:941)
        at io.netty.handler.codec.http.HttpObjectDecoder$LineParser.parse(HttpObjectDecoder.java:998)
        at io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:262)
        at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
        at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
        at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:829)
ggrossetie commented 3 years ago

The latter is failing with this error:

This is expected, this error is thrown as part of the tests suite. Though, the build should not fail, you should see something like:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for kroki 0.14.0:
[INFO] 
[INFO] kroki .............................................. SUCCESS [  0.608 s]
[INFO] umlet .............................................. SUCCESS [ 13.088 s]
[INFO] kroki-server ....................................... SUCCESS [01:13 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:27 min
[INFO] Finished at: 2021-09-10T08:13:41+02:00
[INFO] ------------------------------------------------------------------------

The command make buildServer is working on both my environment and on the CI environment (GitHub Actions). You can take a look at the logs at: https://github.com/yuzutech/kroki/runs/3552798810

twoi commented 3 years ago

I see. After seeing the build fail, I scrolled up and apparently copied an unrelated error. This is the build failure:

[INFO] Results:
[INFO]
[ERROR] Errors: 
[ERROR]   ServerListenTest.http_server_start_listen_any_check_response » Socket Protocol...
[ERROR]   ServerListenTest.http_server_start_listen_port_check_response » Socket Protoco...
[ERROR]   CommanderTest.should_convert_large_diagram:95 » IO Broken pipe
[INFO]
[ERROR] Tests run: 136, Failures: 0, Errors: 3, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for kroki 0.14.0:
[INFO]
[INFO] kroki .............................................. SUCCESS [  0.125 s]
[INFO] umlet .............................................. SUCCESS [  0.964 s]
[INFO] kroki-server ....................................... FAILURE [  7.344 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE

However, as I was subsequently able to modify and build "bytefield", I personally don't need to build the full project any longer, so I'll just close this issue for now.

ggrossetie commented 3 years ago

After seeing the build fail, I scrolled up and apparently copied an unrelated error. This is the build failure:

Thanks for the follow-up.

However, as I was subsequently able to modify and build "bytefield", I personally don't need to build the full project any longer, so I'll just close this issue for now.

Alright, may I ask on which operating system are you building the project?

twoi commented 3 years ago

@Mogztter

$ uname -a
Linux carbuntu 5.11.0-34-lowlatency #36-Ubuntu SMP PREEMPT Thu Aug 26 20:55:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute