Clients cannot connect to web server
After following the steps, creating a database, updating it with the update 1.1/1.2/1.3 .sql files, and making sure everything is listed properly in the config, I am able to boot the server and web server without issue. However, whenever a user attempt to connect to the server on http://<SERVER IP>:80, the webserver throws an error and refuses to let the client connect.
Version 1.5.1, obtained from the releases tab. Ubuntu 22.04 LTS on an x64 device. Config changed to be accessible from 0.0.0.0 in both game server and web server.
The following is an error output from such a case. This happens on multiple browsers, on a variety on devices:
root@nitro-linux-server:~/Havana/Havana# ./run_web.sh
2025-10-29T10:08:14.356 INFO [org.alexdev.http.HavanaWeb] - HavanaWeb by Quackster
2025-10-29T10:08:14.357 INFO [org.alexdev.http.HavanaWeb] - Loading configuration..
2025-10-29T10:08:14.368 INFO [org.alexdev.havana.dao.Storage] - Connecting to MySQL server
2025-10-29T10:08:14.393 INFO [com.zaxxer.hikari.HikariDataSource] - processing - Starting...
2025-10-29T10:08:14.501 INFO [com.zaxxer.hikari.HikariDataSource] - processing - Start completed.
2025-10-29T10:08:14.682 INFO [org.alexdev.http.HavanaWeb] - Loading figuredata for Avatara4j
2025-10-29T10:08:15.361 INFO [org.alexdev.http.HavanaWeb] - Loaded 9762 figure offsets!
2025-10-29T10:08:15.362 INFO [org.alexdev.http.HavanaWeb] - Registering web routes..
2025-10-29T10:08:15.464 INFO [org.alexdev.http.HavanaWeb] - Registered 257 route(s)!
2025-10-29T10:08:15.464 INFO [org.alexdev.http.HavanaWeb] - Starting http service on port 80
2025-10-29T10:08:22.522 ERROR [ErrorLogger] - Error occurred:
java.lang.NullPointerException: value
at io.netty.util.internal.ObjectUtil.checkNotNull(ObjectUtil.java:40)
at io.netty.handler.codec.http.cookie.DefaultCookie.setValue(DefaultCookie.java:61)
at io.netty.handler.codec.http.cookie.DefaultCookie.<init>(DefaultCookie.java:46)
at org.alexdev.duckhttpd.queries.WebCookies.set(WebCookies.java:70)
at org.alexdev.duckhttpd.queries.WebCookies.set(WebCookies.java:66)
at org.alexdev.duckhttpd.server.connection.WebConnection.validateSession(WebConnection.java:66)
at org.alexdev.duckhttpd.server.WebChannelHandler.channelRead0(WebChannelHandler.java:38)
at org.alexdev.duckhttpd.server.WebChannelHandler.channelRead0(WebChannelHandler.java:22)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:434)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:249)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:354)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1429)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:794)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.handle(AbstractEpollChannel.java:482)
at io.netty.channel.epoll.EpollIoHandler$DefaultEpollIoRegistration.handle(EpollIoHandler.java:317)
at io.netty.channel.epoll.EpollIoHandler.processReady(EpollIoHandler.java:514)
at io.netty.channel.epoll.EpollIoHandler.run(EpollIoHandler.java:459)
at io.netty.channel.SingleThreadIoEventLoop.runIo(SingleThreadIoEventLoop.java:225)
at io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:196)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1193)
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:840)
2025-10-29T10:08:22.526 WARN [io.netty.channel.AbstractChannelHandlerContext] - An exception 'java.lang.NullPointerException: Cannot invoke "org.alexdev.duckhttpd.server.connection.WebConnection.session()" because "client" is null' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception:
java.lang.NullPointerException: value
at io.netty.util.internal.ObjectUtil.checkNotNull(ObjectUtil.java:40)
at io.netty.handler.codec.http.cookie.DefaultCookie.setValue(DefaultCookie.java:61)
at io.netty.handler.codec.http.cookie.DefaultCookie.<init>(DefaultCookie.java:46)
at org.alexdev.duckhttpd.queries.WebCookies.set(WebCookies.java:70)
at org.alexdev.duckhttpd.queries.WebCookies.set(WebCookies.java:66)
at org.alexdev.duckhttpd.server.connection.WebConnection.validateSession(WebConnection.java:66)
at org.alexdev.duckhttpd.server.WebChannelHandler.channelRead0(WebChannelHandler.java:38)
at org.alexdev.duckhttpd.server.WebChannelHandler.channelRead0(WebChannelHandler.java:22)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:107)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:356)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:434)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:249)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:354)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1429)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)
at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:794)
at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.handle(AbstractEpollChannel.java:482)
at io.netty.channel.epoll.EpollIoHandler$DefaultEpollIoRegistration.handle(EpollIoHandler.java:317)
at io.netty.channel.epoll.EpollIoHandler.processReady(EpollIoHandler.java:514)
at io.netty.channel.epoll.EpollIoHandler.run(EpollIoHandler.java:459)
at io.netty.channel.SingleThreadIoEventLoop.runIo(SingleThreadIoEventLoop.java:225)
at io.netty.channel.SingleThreadIoEventLoop.run(SingleThreadIoEventLoop.java:196)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:1193)
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:840)
sigh so tired of these notications
Is it really that bad? That it doesn't work at all, and Qwek doesn't notice because "it works on my machine"? Really?!
You people are baiting me, into spending too much time on this again.
Without much to show for it besides a giant waste of time; getting some PRs closed and Qwek going "oh ye fixed it with this commit". Fuck me.
You figure it out. Fuck it. You do it. Let me enjoy my GTA IV play time in peace.
Start up that IntelliJ IDEA right now and launch it, see where it breakpoints and go from there.
It seems like it has no permission to create the /tmp/ folder to store session data.
Hello,
Recently I got the same issue using the lastest version of Havana web server, I use it on Windows, not Linux so the /tmp file which is located?
Thank you
Hello,
Recently I got the same issue using the lastest version of Havana web server, I use it on Windows, not Linux so the /tmp file which is located?
Thank you
... 😖
We are not your debugging servants and this is not an help forum. I wish Qwek's QA process was better too; but it is what it is.
Have you launched that IntelliJ IDEA yet? To debug the breakpoints?
No? Okay, then there's litte to contribute. Go to the forums for help instead.
I'm a busy person, this project is open source. I don't have time to try and solve this but somebody else can.
We are not your debugging servants and this is not an help forum. I wish Qwek's QA process was better too; but it is what it is.
Have you launched that IntelliJ IDEA yet? To debug the breakpoints?
No? Okay, then there's litte to contribute. Go to the forums for help instead.
Yes, I checked, and it was an error in managing the cookies, so I don't want to contribute to an open-source project with this attitude.
Thank you
Yes, I checked, and it was an error in managing the cookies, so I don't want to contribute to an open-source project with this attitude.
Thank you
Seeing as your GH account of you and your dislike bot buddy is empty, you both seem to be acquainted to not ever contributing much.
Your initial comment was also more of an help request and not adding valueable information to this issue, e.g. logs, debug traces etc. This is not an help forum, there's oldskooler.org (and RaGEZONE, DevBest etc.) for that purpose.
On that forum, you could start asking questions. Preferably formulated in an way where people can help you, including actual information about your environment. See this guide on how to do that:
https://github.com/selfteaching/How-To-Ask-Questions-The-Smart-Way/blob/master/How-To-Ask-Questions-The-Smart-Way.md
Then once there's an conclusion made on the kind of bug in that topic on the forum, you can come back here and try to report that with more precise contextual information.
Not contributing, because someone calls you out for not providing any valueable information for the developer to further investigate, and thus wasting his time, is very immature. I'm not the maintainer even.
By "checked" do you mean you read the error/exception it threw? Or more than that? And by contribute, do you mean code PRs or "i experience bug too" comments? I wonder.
"Thank you" too.
@HerrForehead
Btw I tried with 1.5.1 and get the same error.
An exception 'java.lang.NullPointerException: Cannot invoke "org.alexdev.duckhttpd.server.connection.WebConnection.session()" because "client" is null' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception: java.lang.NullPointerException: value at io.netty.util.internal.ObjectUtil.checkNotNull(ObjectUtil.java:40) at io.netty.handler.codec.http.cookie.DefaultCookie.setValue(DefaultCookie.java:61) at io.netty.handler.codec.http.cookie.DefaultCookie.<init>(DefaultCookie.java:46)
But with 1.5.0 it run smoothly. You can try it, just need to edit the run script for web. Got some typo there. I suspect got something to do with "Use duckHTTPD from jitpack".
Please try this and tell me if it works: https://github.com/Quackster/Havana/releases/v1.5.2
The fix was here: https://github.com/Quackster/duckHTTPD/commit/d671a1b1efaf0208ef1ec7dc2de027950be53b91
Hi, I can confirm that v1.5.2 is working now.
Excellent!