404 error when accessing mkv file of size greater than 3G
Dave Phillipines
1 March 2017, 17:09
Hello! Can anybody help me with this issue. Every time I clicked a very large file in a browser, say a matroska video or even an ISO file with a size greater than 3Gb, The Hiawatha server on my machine will issue a 404 error or "not found". I am sure the index.html has all valid links to all files because other files including images and videos with a smaller file size is displayed properly. By the way, I am using Hiawatha in a local network to serve local files. Thanks in advance to anyone who can guide me to solve this problem.
Joe Schmoe
2 March 2017, 00:27
I have v10.5 installed on my local mac development machine and I was able to download a 7GB file with no problems.
Hugo Leisink
2 March 2017, 00:35
Could it be an OS issue? What OS are you using to run Hiawatha?
Dave Phillipines
3 March 2017, 09:43
I am using Slax Linux. I also tried if permission settings matters, the result is still the same.
Dave Phillipines
3 March 2017, 09:45
By the way, since there are no packages for hiawatha specific to slax. The binary I am using is a compiled one from the source. Thanks for responding.
Hugo Leisink
3 March 2017, 10:57
Could it be an issue with the filename or the file access rights instead of the size?
Dave Phillipines
3 March 2017, 12:01
I tried that also by setting file access rights so that anybody can access. The file system I am using though is ext3. What troubles me though is that if I try renaming other files with lesser file size to that one which is not found(has 3BG size), there is no problem I encountered. Tested also other files like ISO (4Gb), MP4 1080 movie (4Gb), and IMG (5Gb), and it is confirmed.
Dave Phillipines
3 March 2017, 12:14
to Joe Schmoe... If you wont mind, can you share to me your hiawatha.conf? It might help a lot. Thanks.
Dave Phillipines
3 March 2017, 14:03
Hello Hugo,
I found a similar problem in
this link but I am not using varnish or any reverse proxy.
In
this other link I think is the nearest to my issue that hasn't been fixed yet.
My system uses 32-bit SLAX Linux and HIAWATHA version 10.5
Hugo Leisink
3 March 2017, 14:06
I think the 32-bit OS causes this issue. Try testing a 64-bit OS.
Joe Schmoe
3 March 2017, 15:35
Dave Phillipines, it was pretty much the default installed configuration.
Dave Phillipines
5 March 2017, 02:11
Hello Hugo,
Yes, it is confirmed that 32-bit OS is the issue. I tested it with a 64-bit slax and a 64-bit machine at home to validate. Too bad though that I can not change the machines in the network (government issue) but still requires me to share really big files.
I really like hiawatha with its simplicity and robustness. If only I could ask a request from you as an author of that program to make it work on 32-bit environment capable of serving large files. For now I will just hope for that. Until then, I settled with lighttpd to solve my server issues.
Thank you and more power to you.
Hugo Leisink
7 March 2017, 10:13
Add the following line to config.h.in (for example somewhere in the Settings section) and recompile Hiawatha.
#define _FILE_OFFSET_BITS 64
Dave Phillipines
8 March 2017, 11:33
Hello Hugo,
You solved my problem with just a single line added to config.h.in. Followed your instruction and recompiled hiawatha.
Server now is working fine. I no longer have issue with file size limit.
Already switched back to hiawatha on our local network.
A million thanks to you.
This topic has been closed.