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

Problem: Semaphore does not obey HTTP Proxy Environment variables #2706

Open
Strimblaster opened this issue Jan 21, 2025 · 2 comments
Open

Comments

@Strimblaster
Copy link

Issue

Summary

A machine running Semaphore while having internet access only through a HTTP(S) proxy cannot clone/pull repositories even if the proxy environment variables "http_proxy" and "https_proxy" are defined correctly.

Context

A old semaphore instance (2.8.?) was running behind a proxy and by defining the variables "http_proxy" and "https_proxy" in the systemd file everything worked fine. After updating to the latest version, 2.11.2, tasks wouldn't go past the cloning/updating phase. Git command timed out every time.

Troubleshooting info

  • By looking at the process list while Semaphore is trying to clone the repository, I can assure that it gets stuck in the "git clone" and internal "git remote-https" commands
  • Checked git configs and tried to add "http_proxy" and "https_proxy" but the result is the same.
  • I CAN simply copy the clone command in the process list and paste it in the cli and it works. With this, I assume that the issues is really on Semahore side.
  • Tried some 2.10 version and this issue also occurs. Sorry for not remembering the exact version.
  • Tried 2.9.112 and the proxy settings work. I can assume that the issue was introduced at some point in 2.10
  • Tried installing 2.11.2 through docker with the proxy setting and got the same issue.

Thanks.

Impact

Ansible (task execution)

Installation method

Package

Database

MySQL

Browser

No response

Semaphore Version

Currently trying to run 2.11.2
Version 2.9.112 does NOT have this issue.

Tried both package and docker installation.

Ansible Version

ansible [core 2.14.5]
This shouldn't be related because the problem occurs before ansible starts running the playbook

Logs & errors

No errors found in semaphore logs.

Manual installation - system information

Ubuntu 22.04

Configuration

This environment variables are defined in semaphore systemd file:

Environment="http_proxy=http://XXXX:XXXX"
Environment="https_proxy=https://XXXX:XXXX"

Additional information

No response

@Strimblaster Strimblaster changed the title Problem: Semaphore does not obey to HTTP Proxy Environment variables Problem: Semaphore does not obey HTTP Proxy Environment variables Jan 22, 2025
@JDog1895
Copy link

JDog1895 commented Jan 23, 2025

I can't provide more information, but we have the same problems in version 2.11.2

Here is the error message:

ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error [Errno -2] Name or service not known>. <urlopen error [Errno -2] Name or service not known>

I'm not sure with which version the problems started. Where it definitely still worked was 2.10.22.

Semahore runs outside of containers for us.

Edit:

Previously, the Teams alert never worked as a notification, but this message is new. Perhaps this is somehow connected.

Can't send microsoft teams alert! Error: Post “https://prod-138.westeurope.logic.azure.com:443/workflows/b5fxxxx8ddb179/triggers/manual/paths/invoke?api-version=2016-06-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=6kyfVfhx9xxxx”: proxyconnect tcp: dial tcp: lookup $PROXY_URL: no such host

@hgjsj
Copy link

hgjsj commented Jan 26, 2025

I am running semaphore with binary, the same proxy problem as I met with version 2.11.2.

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

3 participants