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

Connection Timeout to Upstream Registry with Proxy Enabled; Works with Custom Proxy Emulator #1129

Open
Heyzi opened this issue Feb 26, 2025 · 2 comments

Comments

@Heyzi
Copy link

Heyzi commented Feb 26, 2025

Problem

When running openvsx in a Docker container with an upstream registry configured and proxy settings enabled, the application fails to connect to the upstream URL https://openvsx.org:443. The error reported is:

Connect to https://openvsx.org:443 [open-vsx.org/198.41.30.195] failed: Connection timed out

The proxy settings are configured via JVM arguments, and the upstream URL is set to https://openvsx.org. However, if I replace the upstream URL with the address of a custom proxy service (emulating curl behavior), the connection succeeds without issues. This suggests a potential problem with how openvsx handles proxy connections to the default upstream registry.

Steps to Reproduce

  1. Deploy openvsx in a Docker container.
  2. Configure the upstream registry with the following settings:
    upstream:
      proxy:
        enabled: true
      url: https://openvsx.org
  3. Set JVM proxy arguments (e.g., -Dhttp.proxyHost=proxy.company.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.company.com -Dhttps.proxyPort=8080).
  4. Start the container in an environment with a corporate proxy.
  5. Observe the error in logs:
    Connect to https://openvsx.org:443 [open-vsx.org/198.41.30.195] failed: Connection timed out
    
  6. Replace the upstream URL with a custom proxy emulator (e.g., http://localhost:8081), which forwards requests to openvsx.org via CONNECT method.
  7. Restart the container and note that the connection works successfully.

Environment

  • OpenVSX Version: 0.22.2
  • Docker Setup: Running in a Docker container
  • Proxy Configuration:
    • JVM args: -Dhttp.proxyHost=proxy.company.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.company.com -Dhttps.proxyPort=8080
    • Upstream config:
      upstream:
        proxy:
          enabled: true
        url: https://openvsx.org
@amvanbaren
Copy link
Contributor

@Heyzi What happens when you run the Docker container with the --net=host flag?

@Heyzi
Copy link
Author

Heyzi commented Mar 3, 2025

@Heyzi What happens when you run the Docker container with the --net=host flag?

unfortunately the behavior has not changed, the error is the same

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

No branches or pull requests

2 participants