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 #1144

Closed
rgaudin opened this issue Sep 2, 2024 · 17 comments · Fixed by kiwix/kiwix-build#761
Closed

kiwix-serve cant instantiate HTTP daemon on windows #1144

rgaudin opened this issue Sep 2, 2024 · 17 comments · Fixed by kiwix/kiwix-build#761
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 kiwix/kiwix-tools#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
Copy link
Collaborator

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
Collaborator

@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 kiwix/kiwix-tools#703 or else I have an idea.

@kelson42 kelson42 assigned sgourdas and unassigned veloman-yunkan Sep 23, 2024
@kelson42
Copy link
Collaborator

kelson42 commented Oct 2, 2024

@sgourdas Can you please look at this issue (and test with latest nightly - tomorrow)?

@sgourdas
Copy link
Collaborator

sgourdas commented Oct 2, 2024

@sgourdas Can you please look at this issue (and test with latest nightly - tomorrow)?

Yes, definitely in mind.

@sgourdas
Copy link
Collaborator

sgourdas commented Oct 3, 2024

@kelson42 issue is still present. It seems to have to do with attaching to ipv6 on Windows (this is why -i ipv4 works). I will have to investigate to know what specifically though. Will try tonight or tomorrow morning.

@kelson42
Copy link
Collaborator

kelson42 commented Oct 3, 2024

@sgourdas Should I move the issue to libkiwix?

@sgourdas
Copy link
Collaborator

sgourdas commented Oct 3, 2024

@sgourdas Should I move the issue to libkiwix?

Yes, the issue should probably be addressed there.

The hard thing will be testing, since kiwix-tools Windows compilation with kiwix-build is broken AFAIK. I will try to investigate properly regardless.

@kelson42 kelson42 transferred this issue from kiwix/kiwix-tools Oct 3, 2024
@kelson42 kelson42 added this to the 14.0.0 milestone Oct 3, 2024
@sgourdas
Copy link
Collaborator

sgourdas commented Oct 4, 2024

@kelson42 I have identified the issue and will try to put out a PR by tomorrow morning.

Also, it seems that Windows kiwix-build is working with kiwix-tools. We should update the wiki page.

@kelson42
Copy link
Collaborator

kelson42 commented Oct 4, 2024

Also, it seems that Windows kiwix-build is working with kiwix-tools. We should update the wiki page.

Can you please open a dedicated issue in kiwix-build repo?

@sgourdas
Copy link
Collaborator

sgourdas commented Oct 5, 2024

Also, it seems that Windows kiwix-build is working with kiwix-tools. We should update the wiki page.

Can you please open a dedicated issue in kiwix-build repo?

Opened kiwix/kiwix-build#760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: DONE
5 participants