Skip to Content.
Sympa Menu

en - Re: [en@sympa] Trouble with spaw-fcgi on FreeBSD

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: "C. Bernard" <address@concealed>
  • To: Jens Grassel <address@concealed>, sympa-users <address@concealed>
  • Subject: Re: [en@sympa] Trouble with spaw-fcgi on FreeBSD
  • Date: Tue, 19 Sep 2023 15:13:15 +0200

Hi there
(reply or reply-all only sends emails to reply-to address, not back to the sympa list? I am on roundcube...)

On 2023-09-19 13:51, "Jens Grassel" wrote:
Hi,

thanks for your answer.

On Mon Sep 18, 2023 at 6:57 PM CEST, Alan Hicks wrote:
[...]
spawn-fcgi works with sympa but you only mention spawn-fcgi, perhaps
sympa isn't running?

It is running just fine:

# service sympa status
Status of Sympa subsystem:
Status file for subsystem found.
sympa_msg (pid(s) 56216) is active...
bulk (pid(s) 56636) is active...
archived (pid(s) 57242) is active...
bounced (pid(s) 57861) is active...
task_manager (pid(s) 58736) is active...

You can see how spawn-fcgi is launched with the following, it may offer
some insight

sh -x /usr/local/etc/rc.d/spawn-fcgi start

That just gives me logs for the steps until the process is successfully
spawned (I tried with `truss service spawn-fcgi start` and got similar
results.). But the process dies after it has been spawned. :-(

I'll dig into this again once there is some more time.

here are my parameters. In case anything is missing at your site:

[root@beastly /usr/local/etc/rc.d]# grep -E 'fcg|symp' /etc/rc.conf
sympa_enable="YES"
#sympa_enable="NO"
spawn_fcgi_enable="YES"
#spawn_fcgi_enable="NO"
spawn_fcgi_app="/usr/local/bin/perl"
spawn_fcgi_app_args="/usr/local/libexec/sympa/wwsympa.fcgi"
spawn_fcgi_bindsocket="/var/run/sympa/wwsympa.socket"
spawn_fcgi_bindsocket_mode="0600 -U www"
spawn_fcgi_username="sympa"
spawn_fcgi_groupname="sympa"

(that looks same as you have).
fcgi can have problems if user and group are not 'sympa' (As in our configs):

[root@beastly /usr/local/etc/rc.d]# ls -al /usr/local/libexec/sympa/
total 1072
drwxr-xr-x 3 root wheel 2048 Jun 19 2022 .
drwxr-xr-x 6 root wheel 1024 Sep 11 17:17 ..
-rw-r--r-- 1 root wheel 74364 Jun 19 2022 Conf.pm
drwxr-xr-x 17 root wheel 2048 Jun 19 2022 Sympa
-rw-r--r-- 1 root wheel 34649 Jun 19 2022 Sympa.pm
-r-xr-xr-x 1 root wheel 5442 Jun 19 2022 alias_manager.pl
-r-xr-xr-x 1 root wheel 7915 Jun 19 2022 arc2webarc.pl
-r-xr-xr-x 1 root wheel 9744 Jun 19 2022 archived.pl
-r-xr-xr-x 1 root wheel 9460 Jun 19 2022 bounced.pl
-rwsr-xr-x 1 sympa sympa 9112 Jun 19 2022 bouncequeue
-r-xr-xr-x 1 root wheel 7052 Jun 19 2022 bulk.pl
-rw-r--r-- 1 root wheel 12385 Jun 19 2022 cpanfile
-rwsr-xr-x 1 sympa sympa 10048 Jun 19 2022 familyqueue
-r-xr-xr-x 1 root wheel 2491 Jun 19 2022 init_comment.pl
-r-xr-xr-x 1 root wheel 11916 Jun 19 2022 ldap_alias_manager.pl
-r-xr-xr-x 1 root wheel 2319 Jun 19 2022 mod2html.pl
-r-xr-xr-x 1 root wheel 4722 Jun 19 2022 mysql_alias_manager.pl
-r-xr-xr-x 1 root wheel 5793 Jun 19 2022 p12topem.pl
-rwsr-xr-x 1 sympa sympa 9792 Jun 19 2022 queue
-rwxr-x--- 1 root sympa 634 Apr 8 2021 sendmail_refresh_lists_wrapper_cmb.ksh
-r-xr-xr-x 1 root wheel 23012 Jun 19 2022 sympa
lrwxr-xr-x 1 root wheel 5 Jun 19 2022 sympa.pl -> sympa
-r-xr-xr-x 1 root wheel 11820 Jun 19 2022 sympa_automatic.pl
-r-xr-xr-x 1 root wheel 16365 Jun 19 2022 sympa_msg.pl
-rwsr-sr-x 1 sympa sympa 6352 Jun 19 2022 sympa_newaliases-wrapper
-r-xr-xr-x 1 root wheel 7325 Jun 19 2022 sympa_newaliases.pl
-r-xr-xr-x 1 root wheel 9748 Jun 19 2022 sympa_soap_client.pl
-rwsr-sr-x 1 sympa sympa 6352 Jun 19 2022 sympa_soap_server-wrapper.fcgi
-r-xr-xr-x 1 root wheel 3347 Jun 19 2022 sympa_soap_server.fcgi
-r-xr-xr-x 1 root wheel 4637 Jun 19 2022 sympa_test_ldap.pl
-r-xr-xr-x 1 root wheel 23721 Jun 19 2022 sympa_wizard.pl
-r-xr-xr-x 1 root wheel 7824 Jun 19 2022 task_manager.pl
-r-xr-xr-x 1 root wheel 2084 Jun 19 2022 testlogs.pl
-r-xr-xr-x 1 root wheel 10695 Jun 19 2022 tpl2tt2.pl
-r-xr-xr-x 1 root wheel 9976 Jun 19 2022 upgrade_bulk_spool.pl
-r-xr-xr-x 1 root wheel 5793 Jun 19 2022 upgrade_send_spool.pl
-r-xr-xr-x 1 root wheel 8153 Jun 19 2022 upgrade_shared_repository.pl
-r-xr-xr-x 1 root wheel 12868 Jun 19 2022 upgrade_sympa_password.pl
-rwsr-sr-x 1 sympa sympa 6352 Jun 19 2022 wwsympa-wrapper.fcgi
-r-xr-xr-x 1 root wheel 568308 Jun 19 2022 wwsympa.fcgi

Ignore the sendmail_refresh....ksh, In my opinion the mechanism to update sendmail aliases does not work, so I had to hack something via scripts.

Packages from ports:
[root@beastly /usr/local/etc/rc.d]# pkg ver -v | grep symp
sympa-6.2.68 < needs updating (index has 6.2.70)
[root@beastly /usr/local/etc/rc.d]# pkg ver -v | grep fcg
ap24-mod_fcgid-2.3.9 = up-to-date with index
spawn-fcgi-1.6.4_2 = up-to-date with index

apache:
[root@beastly /usr/local/etc/apache24]# grep -E '^LoadModule.*cgi' httpd.conf
LoadModule proxy_fcgi_module libexec/apache24/mod_proxy_fcgi.so
LoadModule fastcgi_module libexec/apache24/mod_fastcgi.so

parts of /usc/local/etc/apache24/extras/httpd-ssl.conf:
<Location /sy>
#SetHandler fcgid-script
#SetHandler fastcgi-script
#Options +ExecCGI
SetHandler "proxy:unix:/var/run/sympa/wwsympa.socket|fcgi://"

# Don't forget to edit lines below!
#Require all denied
Require all granted
</Location>
<Location /static-sympa>
# Don't forget to edit lines below!
#Require local
Require all granted
</Location>

[root@beastly /usr/local/etc/apache24/extra]# ls -al /var/run/sympa/
total 28
drwxr-xr-x 2 sympa sympa 512 Sep 19 14:04 .
drwxr-xr-x 21 root wheel 1024 Sep 19 13:54 ..
-rw-r--r-- 1 sympa sympa 6 Sep 19 13:54 archived.pid
-rw-r--r-- 1 sympa sympa 6 Sep 19 13:54 bounced.pid
-rw-r--r-- 1 sympa sympa 6 Sep 19 13:54 bulk.pid
-rw-r--r-- 1 sympa sympa 6 Sep 19 13:54 sympa_msg.pid
-rw-r--r-- 1 sympa sympa 6 Sep 19 13:54 task_manager.pid
srw------- 1 www www 0 Sep 19 13:54 wwsympa.socket

don't know whether that helps

try running spawn_fcgi with the "-n" Option (see man 1 spawn-fcgi and
https://serverfault.com/questions/473944/how-can-i-debug-spawn-fcgi
)

Cheers
C


Kind regards,

Jens



Archive powered by MHonArc 2.6.19+.

Top of Page