Page MenuHomePhabricator

500 server error when pulling Pywikibot i18n
Closed, InvalidPublicBUG REPORT

Description

Since 6th February I get continuous errors.

Step 1:

c:\Pywikibot-dev>git clone --recursive --branch master --depth 3 https://gerrit.wikimedia.org/r/pywikibot/core.git
Cloning into 'core'...
remote: Counting objects: 601, done
[...]
Resolving deltas: 100% (68405/68405), done.
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
fatal: expected 'acknowledgments'
fatal: Fetched in submodule path 'scripts/i18n', but it did not contain c56440375ab011f126d4f7a5bbca6fc0b5893185. Direct fetching of that commit failed.

Step 2:

c:\Pywikibot-dev\core>git submodule update
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
fatal: expected 'acknowledgments'
fatal: Fetched in submodule path 'scripts/i18n', but it did not contain c56440375ab011f126d4f7a5bbca6fc0b5893185. Direct fetching of that commit failed.

git version 2.39.1.windows.1

Main project is successfully cloned, the problem is only with the submodule.

Event Timeline

Unfortunately git does not show, which server causes the error. Is a it different repo?

Have you tried running --verbose to see if this gives you more specific information?

Have you tried running --verbose to see if this gives you more specific information?

Whereever I write --verbose,in "git submodule update", it displays help, but I don't see the option in it.

@binbot Please don't paraphrase but post exact commands and exact outputs, to avoid any misunderstandings. Thanks.

Can't immediately reproduce the problem from over here: works for me in under 5 seconds.

 time git clone --recursive --branch master --depth 3 https://gerrit.wikimedia.org/r/pywikibot/core.git
Cloning into 'core'...
remote: Counting objects: 606, done
remote: Finding sources: 100% (606/606)
remote: Getting sizes: 100% (515/515)
remote: Compressing objects: 100% (4888294/4888294)
remote: Total 606 (delta 127), reused 220 (delta 88)
Receiving objects: 100% (606/606), 1.65 MiB | 4.19 MiB/s, done.
Resolving deltas: 100% (127/127), done.
Submodule 'i18n' (https://gerrit.wikimedia.org/r/pywikibot/i18n) registered for path 'scripts/i18n'
Cloning into '/home/mutante/core/scripts/i18n'...
remote: Finding sources: 100% (23999/23999)           
remote: Getting sizes: 100% (3767/3767)           
remote: Total 23999 (delta 19280), reused 23999 (delta 19280)        
Receiving objects: 100% (23999/23999), 14.13 MiB | 8.73 MiB/s, done.
Resolving deltas: 100% (19280/19280), done.
Submodule path 'scripts/i18n': checked out 'c56440375ab011f126d4f7a5bbca6fc0b5893185'

real	0m4.509s
user	0m1.401s
sys	0m0.241s

Same here:

real	0m3.225s
user	0m1.370s
sys	0m0.242s

But looking at the Gerrit logs, I see a number of the following since around the 6th:

Internal error during upload-pack from Repository[<snip>pywikibot/core.git] [CONTEXT project="pywikibot/core" request="GIT_UPLOAD" ]

Stacktrace contains:

[...]
Caused by: java.io.IOException: Connection reset by peer
[...]

Seeing as @binbot appears to be in central Europe, I figured it might be a location thing (since @Dzahn and I are in the west coast US) but I was able to clone on a Hetzner server (germany) just fine.

@binbot, are you able to replicate on different networks?

Seeing as @binbot appears to be in central Europe, I figured it might be a location thing (since @Dzahn and I are in the west coast US) but I was able to clone on a Hetzner server (germany) just fine.

Thank you, that is a great idea, I could not imagine the cause of the difference. Sure, I am in Hungary.

@binbot, are you able to replicate on different networks?

Please help me, how to set a different network for git. I can easily choose proxies from my block list. :-)

I am wondering if you would mind deleting the local repo dir and git clone from scratch like we did, then run the "git submodule update' and see if the probem goes away.

I am wondering if you would mind deleting the local repo dir and git clone from scratch like we did, then run the "git submodule update' and see if the probem goes away.

I am already over this step a few times. :-(

T287459 T246763 are tickets from the past where a similar error appeared but I am not sure if they tell us a fix

Please help me, how to set a different network for git. I can easily choose proxies from my block list. :-)

It should work with settings like this:

git config --global http.proxy http://<username>:<password>@<proxy.server.com>:<8080>
git config --global https.proxy http://<username>:<password>@<proxy.server.com>:<8080>

But easiest would be if you have access to a VM in some data center or something like this and just try the git clone from there.

Well, I was going for a more basic approach; My thought was that perhaps there was something odd with the client network (firewall, etc.) So I was thinking of testing other networks like phone tethering or a local library. Or maybe even fiddling with Git on Windows since I imagine that's a rarity at WMF.

Just some thoughts, nothing concrete.

Well, I was going for a more basic approach; My thought was that perhaps there was something odd with the client network (firewall, etc.) So I was thinking of testing other networks like phone tethering or a local library.

I restarted my computer, changed network to mobile hotspot, deleted Pywikibot and made a clean install.
Same result. :-(

I installed TortoiseGit, the same result.

@binbot, can you give the output of the following three commands?

  1. git clone --verbose https://gerrit.wikimedia.org/r/pywikibot/i18n.git
  2. git clone --verbose --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git
  3. git config -l
  1. This is very strange, it installed the Pywikibot itself to a directory called i18n rather than core, with two differences: there is no .git in scripts\i18n subdirectory and it did not write the registration of i18n.
c:\Pywikibot-dev>git clone --verbose https://gerrit.wikimedia.org/r/pywikibot/i18n.git
Cloning into 'i18n'...
POST git-upload-pack (122 bytes)
POST git-upload-pack (gzip 3710 to 1841 bytes)
remote: Counting objects: 18, done
remote: Finding sources: 100% (18/18)
remote: Getting sizes: 100% (13/13)
remote: Compressing objects: 100% (83963/83963)


Resolving deltas: 100% (68896/68896), done.
c:\Pywikibot-dev>git clone --verbose --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git
Cloning into 'core'...
POST git-upload-pack (122 bytes)
POST git-upload-pack (gzip 3710 to 1841 bytes)
remote: Counting objects: 18, done
remote: Finding sources: 100% (18/18)
remote: Getting sizes: 100% (13/13)
remote: Compressing objects: 100% (83963/83963)
remote: Total 88558 (delta 4), reused 88546 (delta 2)Receiving objects: 100% (88558/88558), 40.31 MiB | 1.88 MiB/s, done.

Resolving deltas: 100% (68896/68896), done.
Submodule 'i18n' (https://gerrit.wikimedia.org/r/pywikibot/i18n) registered for path 'scripts/i18n'
Cloning into 'C:/Pywikibot-dev/core/scripts/i18n'...
remote: Counting objects: 18, done
remote: Finding sources: 100% (18/18)
remote: Getting sizes: 100% (13/13)
remote: Compressing objects: 100% (83963/83963)
remote: Total 88558 (delta 4), reused 88546 (delta 2)
Receiving objects: 100% (88558/88558), 40.31 MiB | 1.86 MiB/s, done.
Resolving deltas: 100% (68896/68896), done.
error: RPC failed; HTTP 500 curl 22 The requested URL returned error: 500
fatal: expected 'acknowledgments'
fatal: Fetched in submodule path 'scripts/i18n', but it did not contain c56440375ab011f126d4f7a5bbca6fc0b5893185. Direct fetching of that commit failed.
c:\Pywikibot-dev>git config -l
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
core.editor="C:\\Program Files (x86)\\Notepad++\\notepad++.exe" -multiInst -notabbar -nosession -noPlugin
pull.rebase=false
credential.helper=manager
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
user.email=wikiposta@gmail.com
user.name=binbot
remote.origin.url=https://gerrit.wikimedia.org/r/pywikibot/core.git
gitreview.remote=origin
gitreview.username=binbot
gui.recentrepo=C:/Pywikibot-dev/core
http.postbuffer=157286400

I read some Stackoverflow, tried to increase the buffer size, increase depth to 20 and decrease to 1, nothing helped.

Google my friend told me that RPC error may be connected to firewall, so I temporarily suspended my firewall. That did not help either.

Does this error also occur if you clone mirror repos ( https://github.com/wikimedia/pywikibot.git and https://github.com/wikimedia/pywikibot-i18n.git )?

Unfortunately, yes. :-( Additionally, when I tried to clone he second one directly, it created a pywikibot-i18n subdirectory, and cloned another complete copy of Pywikibot rather than i18n.

None of us can reproduce, you've attempted other networks, and your Git config seems reasonable. Perhaps this might be an OS-level issue. Do you have any other (non-vm) computers/OSes that you can try?

None of us can reproduce, you've attempted other networks, and your Git config seems reasonable. Perhaps this might be an OS-level issue. Do you have any other (non-vm) computers/OSes that you can try?

I will be forced to do that, although this is the computer where I want to use it, so cloning to another one is not a great deal.
I also tries to use PowerShell instead of oldschool command line, nothing changed.

Is there a way to install Pywikibot i18n other than git (e.g. from zip version), and then use it with git once it is on my device?

Unfortunately, since you're able to clone the mirror repositories via GitHub, this points to an issue with your computer. I'd love to help further but we're not equipped for individualized support.

I would advise reaching out to the Git community for some more debugging. I'm sorry we couldn't help any more, and good luck on your search!

One more strange thing: when I unpack the Pywikibot zip version, c:\Pywikibot\scripts\i18n\.git is a subdirectory.
When I pull it from git, the same name belongs to a file, containing "gitdir: ../../.git/modules/i18n". Is it the normal behaviour?

Aklapper changed the task status from Declined to Invalid.Mar 23 2023, 3:34 PM

@binbot: Please check https://www.mediawiki.org/wiki/Communication where to bring up support and configuration requests instead. Thanks.