Git: Git daemon broken on windows (WSAStartup)

Created on 26 Nov 2018  路  17Comments  路  Source: git-for-windows/git

  • [x] 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 馃憤

bug git

Most helpful comment

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.

All 17 comments

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.

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

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

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).

Thanks for the quick response!

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.

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

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.

gitkraken 5.0.4

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

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.

But after all Gitkraken is just a drilldown, right?

I have no idea what GitKraken uses.

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?

Maybe gitkraken uses the faulty git version under the hood?

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

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.

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

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drewnoakes picture drewnoakes  路  5Comments

dscho picture dscho  路  3Comments

jesterKing picture jesterKing  路  3Comments

daxelrod picture daxelrod  路  4Comments

sschlesier picture sschlesier  路  3Comments