Hiddify-Manager icon indicating copy to clipboard operation
Hiddify-Manager copied to clipboard

hiddify- haproxy is not working

Open araadzandi opened this issue 2 years ago • 6 comments

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

araadzandi avatar Dec 14 '23 15:12 araadzandi

Same problem, reinstall not help ubuntu 20.04

liklaysh avatar Dec 19 '23 18:12 liklaysh

mismo problema en unbuntu 22.04 image

AvatarStark avatar Jan 11 '24 03:01 AvatarStark

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.

typerhack avatar Jan 11 '24 22:01 typerhack

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

lymanjre avatar Jan 26 '24 16:01 lymanjre

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

mohsenabiri avatar Jul 05 '24 14:07 mohsenabiri

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

estaji avatar Oct 12 '24 05:10 estaji