Skip to content

[WIP] [TEST] appveyor: try re-enabling Windows tests - #1947

Closed
vszakats wants to merge 7 commits into
libssh2:masterfrom
vszakats:appveyor-bridge-merge2
Closed

vszakats wants to merge 7 commits into
libssh2:masterfrom
vszakats:appveyor-bridge-merge2

Conversation

@vszakats

Copy link
Copy Markdown
Member

No description provided.

@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch 2 times, most recently from a1b2e9b to 37fe260 Compare May 18, 2026 15:19
@vszakats
vszakats marked this pull request as draft May 18, 2026 20:40
@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch 3 times, most recently from d4d992e to 3e5827c Compare May 20, 2026 01:07
@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch from 3e5827c to 84d6d46 Compare June 6, 2026 09:58
vszakats added a commit that referenced this pull request Jun 7, 2026
@vszakats

vszakats commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

@mback2k

mback2k commented Jun 8, 2026

Copy link
Copy Markdown
Member

I also saw that the concurrency settings were killing way to many job runs, but the algorithm change may be an additional root cause, yes. How can I help you with this?

@vszakats

vszakats commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

I also saw that the concurrency settings were killing way to many job runs, but the algorithm change may be an additional root cause, yes. How can I help you with this?

Hey @mback2k, thanks for jumping in! I really don't know, this is only the
most recent problem, and even while this was running fine till last month,
there was barely any AppVeyor CI job run successfully. In rare cases it
picked up the server, but in most cases it did not, making basically all
CI runs fail at one point (hence I gradually disabled them). This has been
happening since 2024 (with no apparent local change). I tried reverting
all the changes I made, but none of it seemed to have an effect.

I guess one thing to try is to try rebuilding/re-debugging this from the
start. (I admit to have very little understanding on how this works.)
And/or perhaps think of a different way of running docker tests on
Windows.

@mback2k

mback2k commented Jun 8, 2026

Copy link
Copy Markdown
Member

Hey @vszakats , sure, no problem. For troubleshooting I would need to have starting state with the AppVeyor integrations enabled / restored to (my) original configuration again. Do you know what you have changed?

I know libssh2 (and curl) CI changed quite a lot since I spend time on it, but how can AppVeyor runs use this again?

@vszakats

vszakats commented Jun 8, 2026 •

Copy link
Copy Markdown
Member Author

Hey @vszakats , sure, no problem. For troubleshooting I would need to have starting state with the AppVeyor integrations enabled / restored to (my) original configuration again. Do you know what you have changed?

I know libssh2 (and curl) CI changed quite a lot since I spend time on it, but how can AppVeyor runs use this again?

Besides this one, I can point to #1856 and #1857 where I tried reverting
things to the state you last touched them:

  • going back to MS-DOS batch from docker-bridge.sh
  • going back to RSA keys from ED25519, in the script above.
  • reverting appveyor_docker.yml. (e.g. script tidy-ups and
    concurrency settings.)

CI worked fine after each of these changes. Then, later, it started decaying,
when I switched to run tests in one job where it for some reason
kept running reliably. Then at one point even that decayed and no longer
run reliably. The point it fails at is 'Waiting for SSH connection from GitHub
Actions'. Also tried bumping waiting time, keepalive time.
Then at the end of last month, the GHA job no longer connects anymore
(no related local change).

c321b32 #1768
b5e68bd #1461

I'd blind guess the runners and/or CI infra at GHA/Appveyor CI kept
changing in ways that made connections between them less and less
reliable.

@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch from 84d6d46 to 32f3356 Compare June 9, 2026 14:25
vszakats added a commit that referenced this pull request Jun 9, 2026
Just in case. In practice this is supposed to be as short string.

Ref: #1688 (comment)
Follow-up to e8e6bc2 #1688

Cherry-picked from #1947
@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch from 32f3356 to e9535e3 Compare June 9, 2026 14:30
@vszakats

vszakats commented Jun 9, 2026 •

Copy link
Copy Markdown
Member Author

Looked up before/after AppVeyor runner IPs:

Before: 67.225.165.215 → host7.appveyor.com / AS32244 Liquid Web, L.L.C
After: 172.69.17.14 → AS13335 Cloudflare, Inc.

I wonder if this feature still works:
https://www.appveyor.com/docs/how-to/rdp-to-build-worker/

edit: old IPs remain documented here:
https://www.appveyor.com/docs/build-environment/

@vszakats

vszakats commented Jun 9, 2026 •

Copy link
Copy Markdown
Member Author

Remote access is also broken. I can't think of anything else than
AppVeyor decided to move worker machines behind Cloudflare,
starting June 1, 2026, and with this change the RDP/SSH feature
broke, which libssh2 relied on for Windows docker tests.

Tested here: https://ci.appveyor.com/project/curlorg/curl-for-win/builds/54188624
The Windows App app times out.

edit: Looked around, and couldn't readily find official information,
announcement, or form/chat discussion about this update.

/cc @FeodorFitsner

@FeodorFitsner

Copy link
Copy Markdown

It's www.appveyor.com is behind Cloudflare now. RDP script uses https://www.appveyor.com/tools/my-ip.aspx to "know" the IP of a virtualization server it's calling from. Apparently, Cloudflare is replacing original referrer IP once reaching web server. Let us fix that.

@FeodorFitsner

Copy link
Copy Markdown

Must be fixed now. It uses https://checkip.amazonaws.com/ for checking IP.

@vszakats

vszakats commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

It's www.appveyor.com is behind Cloudflare now. RDP script uses https://www.appveyor.com/tools/my-ip.aspx to "know" the IP of a virtualization server it's calling from. Apparently, Cloudflare is replacing original referrer IP once reaching web server. Let us fix that.

Figuring out the non-Cloudflare IP would fix it indeed.

Thanks a bunch @FeodorFitsner! \o/

vszakats added a commit to vszakats/libssh2 that referenced this pull request Jun 9, 2026
@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch from e9535e3 to 6059c1d Compare June 9, 2026 20:17
@vszakats

vszakats commented Jun 9, 2026 •

Copy link
Copy Markdown
Member Author

RDP tested OK: https://ci.appveyor.com/project/curlorg/curl-for-win/builds/54188813

vszakats added a commit to vszakats/libssh2 that referenced this pull request Jun 9, 2026
@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch from 6059c1d to e4df601 Compare June 9, 2026 20:28
@vszakats

vszakats commented Jun 9, 2026 •

Copy link
Copy Markdown
Member Author

@mback2k with the connection working fine again, here's a fresh
example for the "Waiting for SSH connection from GitHub" failure seen earlier:

https://ci.appveyor.com/project/libssh2org/libssh2/builds/54188922/job/807avu2dhxuamr1g:

Name                  : {594672b0-1252-45ad-a2e4-fecaeb91e2dd}
DisplayName           : SSH via RDP port
Description           : 
DisplayGroup          : 
Group                 : 
Enabled               : True
Profile               : Any
Platform              : {}
Direction             : Inbound
Action                : Allow
EdgeTraversalPolicy   : Block
LooseSourceMapping    : False
LocalOnlyMapping      : False
Owner                 : 
PrimaryStatus         : OK
Status                : The rule was parsed successfully from the store. (65536)
EnforcementStatus     : NotApplicable
PolicyStoreSource     : PersistentStore
PolicyStoreSourceType : Local



Listen on ipv4:             Connect to ipv4:

Address         Port        Address         Port
--------------- ----------  --------------- ----------
10.0.0.166      3389        127.0.0.1       22

ssh-keygen: generating new host keys: RSA ECDSA ED25519 
ecdsa-sha2-nistp256
ssh-ed25519
ssh-rsa
Waiting for SSH connection from GitHub Actions...................................................................................
.................................................................................................................................................................
......................................................... failed.
[...]

https://github.com/libssh2/libssh2/actions/runs/27235990430/job/80428017675:

OpenSSH_9.6p1 Ubuntu-3ubuntu13.16, OpenSSL 3.0.13 30 Jan 2024
debug1: Reading configuration data /home/runner/.ssh/config
debug1: /home/runner/.ssh/config line 2: Applying options for 67.225.165.215
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 67.225.165.215 [67.225.165.215] port 33966.
debug1: Connection established.
debug1: identity file /home/runner/.ssh/id_rsa type 3
debug1: identity file /home/runner/.ssh/id_rsa-cert type -1
debug1: identity file /home/runner/.ssh/id_ecdsa type -1
debug1: identity file /home/runner/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/runner/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/runner/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/runner/.ssh/id_ed25519 type -1
debug1: identity file /home/runner/.ssh/id_ed25519-cert type -1
debug1: identity file /home/runner/.ssh/id_ed25519_sk type -1
debug1: identity file /home/runner/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/runner/.ssh/id_xmss type -1
debug1: identity file /home/runner/.ssh/id_xmss-cert type -1
debug1: identity file /home/runner/.ssh/id_dsa type -1
debug1: identity file /home/runner/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.16
debug1: Remote protocol version 2.0, remote software version OpenSSH_10.3
debug1: compat_banner: match: OpenSSH_10.3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 67.225.165.215:33966 as 'appveyor'
debug1: load_hostkeys: fopen /home/runner/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:YdVPD8ptvtzEJgwO0Sk28nvgqEXHWo/p7KdXkpGEnxk
debug1: load_hostkeys: fopen /home/runner/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: checking without port identifier
debug1: load_hostkeys: fopen /home/runner/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '67.225.165.215' is known and matches the ED25519 host key.
debug1: Found key in /home/runner/.ssh/known_hosts:2
debug1: found matching key w/out port
debug1: check_host_key: hostkey not known or explicitly trusted: disabling UpdateHostkeys
debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: Sending SSH2_MSG_EXT_INFO
debug1: expecting SSH2_MSG_NEWKEYS
debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256,[email protected]>
debug1: kex_ext_info_check_ver: [email protected]=<0>
debug1: kex_ext_info_check_ver: [email protected]=<0>
debug1: kex_ext_info_client_parse: agent-forward (unrecognised)
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256,[email protected]>
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Will attempt key: /home/runner/.ssh/id_rsa ED25519 SHA256:hHCOHWu6sIvKnCV903u2yINfL1snrPq46AOi5gEJ9k8
debug1: Will attempt key: /home/runner/.ssh/id_ecdsa 
debug1: Will attempt key: /home/runner/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /home/runner/.ssh/id_ed25519 
debug1: Will attempt key: /home/runner/.ssh/id_ed25519_sk 
debug1: Will attempt key: /home/runner/.ssh/id_xmss 
debug1: Will attempt key: /home/runner/.ssh/id_dsa 
debug1: Offering public key: /home/runner/.ssh/id_rsa ED25519 SHA256:hHCOHWu6sIvKnCV903u2yINfL1snrPq46AOi5gEJ9k8
debug1: Server accepts key: /home/runner/.ssh/id_rsa ED25519 SHA256:hHCOHWu6sIvKnCV903u2yINfL1snrPq46AOi5gEJ9k8
Authenticated to 67.225.165.215 ([67.225.165.215]:33966) using "publickey".
debug1: Remote connections from 127.0.0.1:2198 forwarded to local address 127.0.0.1:2198
debug1: Remote connections from 127.0.0.1:2375 forwarded to local address /var/run/docker.sock:-2
debug1: ssh_init_forwarding: expecting replies for 1 forwards
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Remote: /home/appveyor/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/appveyor/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: remote forward success for: listen 127.0.0.1:2198, connect 127.0.0.1:2198
debug1: forwarding_success: all expected forwarding replies received
debug1: remote forward success for: listen 127.0.0.1:2375, connect /var/run/docker.sock:-2
debug1: Sending environment.
debug1: channel 0: setting env LANG = "C.UTF-8"
debug1: Sending command: sleep 1h
debug1: pledge: network
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3980, received 4200 bytes, in 446.0 seconds
Bytes per second: sent 8.9, received 9.4
debug1: Exit status 0

vszakats added a commit that referenced this pull request Jun 10, 2026
To fix detecting true external IP after AppVeyor servers moved behind
Cloudflare on 2026-06-01.

Thanks-to: Feodor Fitsner

Refs:
appveyor/ci@4ceb9ed
#1947 (comment)
#1947 (comment)

Bug:
#1947 (comment)
#1947 (comment)

Closes #2010
@vszakats
vszakats force-pushed the appveyor-bridge-merge2 branch from 1a87e5b to 97fd0e8 Compare June 10, 2026 09:54
@vszakats vszakats changed the title [WIP] [TEST] appveyor: move bridge scripts into yml [WIP] [TEST] appveyor: try re-enabling Windows tests Jun 10, 2026
@vszakats

Copy link
Copy Markdown
Member Author

Closing this, due to being out of ideas on why PowerShell is not picking up the SSH process reliably since 2024.

@vszakats vszakats closed this Jun 10, 2026
@vszakats
vszakats deleted the appveyor-bridge-merge2 branch June 10, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants