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

Git daemon broken on windows (WSAStartup) #1952

Closed
1 task done
learn-more opened this issue Nov 26, 2018 · 17 comments
Closed
1 task done

Git daemon broken on windows (WSAStartup) #1952

learn-more opened this issue Nov 26, 2018 · 17 comments
Assignees
Milestone

Comments

@learn-more
Copy link

learn-more commented Nov 26, 2018

  • I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
    • Git-2.19.2-64-bit.exe
$ git --version --build-options
git version 2.19.2.windows.1
cpu: x86_64
built from commit: 26dcaa1b6b5fd862db3ec40983e33ff3432f1166
sizeof-long: 4
sizeof-size_t: 8
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [Version 10.0.17134.407]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
> type "C:\Program Files\Git\etc\install-options.txt"
Editor Option: Notepad++
Custom Editor Path:
Path Option: Cmd
Plink Path: D:\Tools\Putty\PLINK.EXE
SSH Option: Plink
CURL Option: WinSSL
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?
    • Corporate domain, behind a proxy.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
    • CMD, from a batch script:
start git daemon --base-path="d:\My Projects\Visual Studio Projects" --informative-errors --verbose --enable=receive-pack

Not sure if this is relevant, but in case it might be:
The daemon is not used to serve one repository, but instead it serves all repositories in the selected folder.

git daemon --base-path="d:\My Projects\Visual Studio Projects" --informative-errors --verbose --enable=receive-pack
  • What did you expect to occur after running these commands?

    • A running git daemon
  • What actually happened instead?

    • Git daemon exits with a (localized) error:
[16896] getaddrinfo() for (null) failed: De toepassing heeft WSAStartup niet aangeroepen, of WSAStartup is mislukt.
fatal: unable to allocate any listen sockets on port 9418

Free-handed translation:

[16896] getaddrinfo() for (null) failed: The application has not called WSAStartup, or WSAStartup failed.
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?
    • n/a

update:
Downgrading to v2.19.1 fixes the issue for me.

ps: Nice bug reporting template 👍

@dscho
Copy link
Member

dscho commented Nov 26, 2018

Could you please test the latest snapshot from https://wingit.blob.core.windows.net/files/index.html? I think this bug has been fixed in the meantime.

BTW v2.19.2 has been bumped down to "pre-release" status in part because of that bug.

@dscho dscho self-assigned this Nov 26, 2018
@dscho dscho added this to the v2.19.2(2) milestone Nov 26, 2018
@learn-more
Copy link
Author

https://git-scm.com/download/win still serves this as download.
I will re-test using the provided link.

@learn-more
Copy link
Author

Git-prerelease-2.19.2.windows.1.3.gc6ce1b9b6a-64-bit.exe fixes this indeed.

Steps taken:

  • Install Git-2.19.2-64-bit.exe (as upgrade, not changing any of the already configured settings)
  • Open a new cmd prompt from explorer (to ensure environment variables are propagated)
  • Execute git daemon --base-path="d:\My Projects\Visual Studio Projects" --informative-errors --verbose --enable=receive-pack
  • Same result: [18280] getaddrinfo() for (null) failed: De toepassing heeft WSAStartup niet aangeroepen, of WSAStartup is mislukt.
  • Install Git-prerelease-2.19.2.windows.1.3.gc6ce1b9b6a-64-bit.exe (as upgrade, not changing any of the already configured settings)
  • Open a new cmd prompt from explorer
  • Execute git daemon --base-path="d:\My Projects\Visual Studio Projects" --informative-errors --verbose --enable=receive-pack
  • Result: [23456] Ready to rumble

@dscho
Copy link
Member

dscho commented Nov 26, 2018

Wonderful. I'll close it here, then.

FWIW my current plan is to not release any v2.19.2(2), but to release Git for Windows v2.20.0 short after Git v2.20.0 is released (expected Dec 2nd).

@dscho dscho closed this as completed Nov 26, 2018
@learn-more
Copy link
Author

Thanks for the quick response!

@rosti-il
Copy link

rosti-il commented Dec 8, 2018

This bug also prevents cloning remote repositories with git:// URLs, for example: 'git clone git://git.apache.org/commons-compress.git'. The error message is similar and contains: "(port 9418) (Either the application has not called WSAStartup, or WSAStartup failed. )".

I've switched from 2.19.2.windows.1 into 2.20.0.rc2.windows.1 (both 64 bit) and now I'm able to clone remote repositories with git:// URLs.

@ghost
Copy link

ghost commented May 24, 2019

Still experiencing the error in git 2.21.0.windows1 with gitkraken 5.0.4 on Windows 10 1809.

@dscho
Copy link
Member

dscho commented May 24, 2019

Still experiencing the error in git 2.21.0.windows1 with gitkraken 5.0.4 on Windows 10 1809.

Are you sure that the version that is actually used is v2.21.0? There are two Git versions involved, after all. The client and the server.

@dscho
Copy link
Member

dscho commented May 24, 2019

gitkraken 5.0.4

Also: did you try this without gitkraken in the middle?

@ghost
Copy link

ghost commented May 24, 2019

For the server side, I am working on github and the problem only occurs with Gitkraken in between. But after all Gitkraken is just a drilldown, right? So this is weird.

@dscho
Copy link
Member

dscho commented May 25, 2019

But after all Gitkraken is just a drilldown, right?

I have no idea what GitKraken uses.

@bertyhell
Copy link

bertyhell commented Sep 17, 2020

I'm still having this issue with

  • Gitkraken v7.3.2
  • Windows 10 (2004)
  • cmd git version 2.28.0.windows.1

Only when pushing to gitlab. Github works fine.

If i try without gitkraken in the middle it also works.

Switching branches works in girkraken
Pushing a commit does not work in gitkraken

Maybe gitkraken uses the faulty git version under the hood?

@dscho
Copy link
Member

dscho commented Sep 17, 2020

Maybe gitkraken uses the faulty git version under the hood?

Maybe. Do you have any Git Kraken contact you could ask?

@bertyhell
Copy link

bertyhell commented Sep 17, 2020

no. They only accept support requests from PRO users.

From this article it seems like they use the system's git version though:
https://support.gitkraken.com/git-workflows-and-extensions/intro-and-requirements/

it's also strange that it only fails for one provider: Gitlab and not for Github. So you would think it has to do with how Gitlab works rather than the git version. Or the combination of gitkraken with gitlab.

for reference, this is the error popup:
image

These are some of the logs in the gitkraken log viewer:


[16:15:48] Create ref refs/heads/feature/RENEO-385-resources-per-brand at 02b1bc...2cca: started.
[16:15:48] Create ref refs/heads/feature/RENEO-385-resources-per-brand at 02b1...f2cca: finished.136ms
[16:15:48] Checkout refs/heads/feature/RENEO-385-resources-per-brand: started.
[16:15:49] Checkout refs/heads/feature/RENEO-385-resources-per-brand: finished.431ms
[16:15:51] Stage 10 files for commit: started.
[16:15:51] Stage 10 files for commit: finished.455ms
[16:16:37] Fetch remote origin: failed to connect to gitlab.com: Either the application has not called WSAStartup, or WSAStartup failed.
[16:16:42] Commit: started.
[16:16:42] Commit: finished creating commit 235e....2bac
[16:16:46] Push feature/RENEO-385-resources-per-brand: started.
[16:16:48] Set upstream for feature/RENEO-385-resources-per-brand: started.
[16:16:48] Set upstream for feature/RENEO-385-resources-per-brand: finished.299ms
[16:17:09] Push feature/RENEO-385-resources-per-brand: failed to connect to gitlab.com: Either the application has not called WSAStartup, or WSAStartup failed.
[16:17:09] Push feature/RENEO-385-resources-per-brand: finished with errors.23.034s
[16:17:37] Fetch remote origin: failed to connect to gitlab.com: Either the application has not called WSAStartup, or WSAStartup failed.

and the application log:

[08:37:54] Open repository C:/.../: started.
[08:37:54] Detected Git: 2.28.0
[08:37:54] Detected Git LFS: 2.11.0
[08:37:55] Detecting Git and Git LFS: finished3.635s
[08:38:01] Open repository: finished.6.682s
[08:39:39] Open repository C:/.../: started.
[16:15:14] Open repository: finished.2.249s
[16:15:16] Open repository C:/.../: started.
[16:15:17] Open repository: finished.

@dscho
Copy link
Member

dscho commented Sep 17, 2020

@bertyhell maybe open a separate ticket, then, just to track your issue (which seems to be totally unrelated to a broken git daemon)?

@bertyhell
Copy link

Fair enough. I'll see if i can contact Gitkraken first somehow.

@bertyhell
Copy link

For future reference, here's how to enable the advanced logs for gitkraken:

Hello,

Thank you for taking the time to reach out to support. From my experience, this error is usually caused due to the operating system. You can try to see if the SILLY logging will provide additional details to help you troubleshoot. To enable SILLY mode you can follow the steps below.

1. Remove current logs
- C:\Users\{user}\AppData\Roaming\.gitkraken\logs\repos\{repo-in-question}
- C:\Users\{user}\AppData\Roaming\.gitkraken\logs\app.txt

2. Start GitKraken via the command line
- Via the command line navigate to C:\Users\{user}\AppData\Local\gitkraken\app-7.3.2
- Run gitkraken.exe -d SILLY

Hope this information is helpful. Thank you for using GitKraken!

I could not reproduce the issue anymore though.

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

4 participants