Skip to content
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

kiwix-serve cant instantiate HTTP daemon on windows #701

Open
rgaudin opened this issue Sep 2, 2024 · 9 comments
Open

kiwix-serve cant instantiate HTTP daemon on windows #701

rgaudin opened this issue Sep 2, 2024 · 9 comments
Assignees
Milestone

Comments

@rgaudin
Copy link
Member

rgaudin commented Sep 2, 2024

Using https://tmp.kiwix.org/ci/dev_preview/zim-tools_windows/kiwix-tools_win-x86_64-2024-09-02.zip on Windows 11 (VM) I can't seem to start kiwix-serve.

Either as regular user or administrator, I always get the following error:

C:\Users\reg\test-tools>kiwix-serve.exe -p 8001 ..\python-libzim\rlz\test.zim
Unable to instantiate the HTTP daemon. The port 8001 is maybe already occupied or need more permissions to be open. Please try as root or with a port number higher or equal to 1024.
@rgaudin rgaudin added the bug label Sep 2, 2024
@mgautierfr
Copy link
Member

This may be related to #673
Can you test with kiwix-serve.exe -i ipv4 -p 8001 foo.zim ?

@rgaudin
Copy link
Member Author

rgaudin commented Sep 2, 2024

It works ; I got the same dialog btw.

Screenshot 2024-09-02 at 16 33 18

@rgaudin
Copy link
Member Author

rgaudin commented Sep 2, 2024

Should we update the error message then?

@kelson42 kelson42 changed the title kiwix-serve cant instantiate HTTP daemon kiwix-serve cant instantiate HTTP daemon on windows Sep 2, 2024
@kelson42 kelson42 added this to the 3.8.0 milestone Sep 2, 2024
@kelson42
Copy link
Contributor

kelson42 commented Sep 2, 2024

What happens exactly here which leads to this error? @sgourdas Any idea?

@sgourdas
Copy link
Collaborator

sgourdas commented Sep 2, 2024

That is pretty strange.

From a quick look at the code, the only difference in flow that I can see, when no -i parameter is supplied, is the address variable being left unitialized. But regardless, without explicitly assigned it to "" it should still have that value.

Regardless, even though it should be automatically initialized as an empty string we could still assign it explicitly when the -i option is not provided, just to ensure consistency, or remove the other assignments that do the same.

I will try to test when as soon as I get time.

@sgourdas
Copy link
Collaborator

sgourdas commented Sep 3, 2024

@kelson42 is there a way for me to build kiwix-serve for Windows?

@rgaudin
Copy link
Member Author

rgaudin commented Sep 3, 2024

@sgourdas ; you can using kiwix-build ; see the windows notes on the Wiki

@kelson42
Copy link
Contributor

@sgourdas I believe this bug might be just fixed by properly analysing the code.

@sgourdas
Copy link
Collaborator

@kelson42 let's see if this is fixed with #703 or else I have an idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants