Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    HAProxy non parte dopo l'upgrade di pfSense alla versione 2.7.2

    Scheduled Pinned Locked Moved Italiano
    2 Posts 1 Posters 374 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pfzen
      last edited by pfzen

      Ciao a tutti, come da oggetto ho un problema con il servizio ACME + HAProxy, l'attuale configurazione punta ad ottenere da parte di Let's Encrypt il rilascio del certificato ssl verso il Captive Portal.

      Con la versione 2.6.0 non ho avuto nessun problema, finchè ho effettuato l'upgrade direttamente alla versione {2.7.2} con installazione pulita.
      Dopo aver applicato il backup della v.2.6.0 tutti i servizi sono stati installati e avviati correttamente, tranne appunto HAProxy.

      Questo è l'errore che ricevo al tentativo di avvio manuale del servizio:

      Errors found while starting haproxy
      [NOTICE] (98863) : haproxy version is 2.8.3-86e043a
      [NOTICE] (98863) : path to executable is /usr/local/sbin/haproxy
      [ALERT] (98863) : config : parsing [/var/etc/haproxy_test/haproxy.cfg:24] : errorfile : '/var/etc/haproxy_test/errorfile_Acme-Frontend_503_MAINTENANCE': unable to parse headers (error offset: 0)
      [ALERT] (98863) : config : Error(s) found in configuration file : /var/etc/haproxy_test/haproxy.cfg
      [ALERT] (98863) : config : Fatal errors found in configuration.
      

      Da alcune ricerche effettuate in rete, è sembrato di capire che la struttura del file .cfg di HAProxy sia cambiata con l'aggiunta di una nuova sezione " http-errors myerrors " .
      Oltre a questa direttiva il daemon haproxy dovrebbe creare una nuova sottodirectory in /var/etc/haproxy denominata 'errors' al cui interno andrebbe il file 503.http

      Qui mi fermo.

      Allego il settings config.

      # Automaticaly generated, dont edit manually.
      # Generated on: 2024-01-12 13:19
      global
      	maxconn			1000
      	stats socket /tmp/haproxy.socket level admin  expose-fd listeners
      	uid			80
      	gid			80
      	nbthread		1
      	hard-stop-after		15m
      	chroot			/tmp/haproxy_chroot
      	daemon
      	server-state-file /tmp/haproxy_server_state
      
      frontend ACME-CAPTIVE
      	bind			192.168.xx.xxx:80 name 192.168.xx.xxx:80   
      	mode			http
      	log			global
      	option			http-keep-alive
      	option			forwardfor
      	acl https ssl_fc
      	http-request set-header		X-Forwarded-Proto http if !https
      	http-request set-header		X-Forwarded-Proto https if https
      	timeout client		30000
      	errorfile			503 /var/etc/haproxy/errorfile_ACME-CAPTIVE_503_MAINTENANCE
      	acl					ACME	var(txn.txnpath) -m beg -i ./well-known/acme-challenge/
      	http-request set-var(txn.txnpath) path
      	use_backend ACME-CAPTIVE_ipvANY  if  ACME 
      
      backend ACME-CAPTIVE_ipvANY
      	mode		                http
      	id			        100
      	log			        global
      	timeout connect		        30000
      	timeout server		        30000
      	retries			        3
      	load-server-state-from-file	global
      	server			ACME-BACKEND 127.0.0.1:4002 id 101
      

      Su pfsense non trovo dove effettuare queste modifiche, chiedo cortesemente se qualcuno può darmi una mano.

      1 Reply Last reply Reply Quote 0
      • P
        pfzen
        last edited by

        RESOLVED
        Mi rispondo da solo. problema risolto con l'aggiunta nell'header " errorfile_ACME-CAPTIVE_503_MAINTENANCE " del seguente codice:

        HTTP/1.0 503 Service Unavailable
        Cache-Control: no-cache
        Connection: close
        Content-Type: text/html
        

        Codice completo:

        HTTP/1.0 503 Service Unavailable
        Cache-Control: no-cache
        Connection: close
        Content-Type: text/html
        
        !DOCTYPE html>
        <html>
        <head>
           <meta charset="utf-8" />
           <title>Site Undergoing Maintenance</title>
        </head>
        <body>
           <center><h1>The site is undergoing scheduled maintenance.</h1></center>
        </body>
        </html>
        

        p.s. Attualmente ho in produzione HAProxy version 2.9-dev6-f75a369, released 2023/09/22. Nel fine settimana provo a ritornare alla versione no-dev {haproxy 0.63_1} per confrontare eventuali differenze.

        Saluti🔹

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.