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

hiddify- haproxy is not working #3470

Closed
araadzandi opened this issue Dec 14, 2023 · 6 comments
Closed

hiddify- haproxy is not working #3470

araadzandi opened this issue Dec 14, 2023 · 6 comments

Comments

@araadzandi
Copy link

I face this problem after install
با این مشکل روبرو شدم بعد از نصب
error

@liklaysh
Copy link

Same problem, reinstall not help
ubuntu 20.04

@AvatarStark
Copy link

mismo problema en unbuntu 22.04
image

@typerhack
Copy link

typerhack commented Jan 11, 2024

Title: Troubleshooting HAProxy on Port 443

I recently resolved an issue with HAProxy and wanted to share the solution. This worked for me, but it might not be applicable in all scenarios.

The problem was related to HAProxy operating on port 443. In my case, port 443 was already bound to a different application, causing a conflict. Once I freed up port 443, restarting HAProxy became possible. However, keep in mind that your situation might be different.

To assist you in troubleshooting, here are the steps I followed:

Step 1: Verify HAProxy Configuration

First, ensure your HAProxy configuration is correct. Run the following command:

haproxy -c -f /etc/haproxy/haproxy.cfg

This command checks if the configuration is valid. My setup uses the basic config, but ensure yours is working too.

Step 1.1: Edit HAProxy Configuration

If there's a problem with the configuration, you can use the configuration from my setup (HAProxy version 2.8.5-1) at your own risk. Use this command to edit the config file:

nano /etc/haproxy/haproxy.cfg

Step 1.2: Update Configuration

Replace the existing content in haproxy.cfg with the following configuration. This is specific to my current version (HAProxy 2.8.5-1), so it's advisable to consult the community or the developers for configurations for other versions. Use at your own risk:

global
        log /dev/log    local0
        log /dev/log    local1 notice
        chroot /var/lib/haproxy
        stats socket /run/haproxy/admin.sock mode 660 level admin
        stats timeout 30s
        user haproxy
        group haproxy
        daemon

        # Default SSL material locations
        ca-base /etc/ssl/certs
        crt-base /etc/ssl/private

        # See: https://ssl-config.mozilla.org/#server=haproxy&server-version=2.0.3&config=intermediate
        ssl-default-bind-ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
        ssl-default-bind-ciphersuites TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256
        ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        timeout connect 5000
        timeout client  50000
        timeout server  50000
        errorfile 400 /etc/haproxy/errors/400.http
        errorfile 403 /etc/haproxy/errors/403.http
        errorfile 408 /etc/haproxy/errors/408.http
        errorfile 500 /etc/haproxy/errors/500.http
        errorfile 502 /etc/haproxy/errors/502.http
        errorfile 503 /etc/haproxy/errors/503.http
        errorfile 504 /etc/haproxy/errors/504.http

Step 1.3: Restart HAProxy

After updating the configuration, restart the HAProxy service with:

systemctl restart haproxy.service

Step 2: Check Port 443

Ensure that port 443 is open and not used by other programs (excluding Xray core and Hiddify components, which are fine to run alongside HAProxy):

netstat -tulnp | grep :443

Step 3: Review Logs

If the above steps don't resolve the issue, examine the HAProxy logs for clues:

tail -n 30 /var/log/haproxy.log
# or view the entire file with:
cat /var/log/haproxy.log
# or
nano /var/log/haproxy.log

Feel free to post your log excerpts here for community assistance.

@lymanjre
Copy link
Contributor

لطفا به آخرین نسخه آپدیت کنید. مشکل باید رفع شده باشه. در صورت وجود مشکل ایشو را باز نمایید.

@mohsenabiri
Copy link

مشکل همچنان وجود داره
the problem still exist!!!

@estaji
Copy link

estaji commented Oct 12, 2024

Hi
I had the same error on a clean installation. I disabled IPv6 using these steps and a new installation was successful.
Open the Netplan configuration file in this path:
$ vim /etc/netplan/.yaml
Add link-local: [] to your interface options.
$ netplan try
Check disabling IPv6
$ ip -br -c a
If it is ok now apply it:
$ netplan apply

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

7 participants