wsgi issue in 5.0.4

2023-04-18 Thread Adam Weremczuk
Hi all,

Trying to install on Debian 11 with Apache2 and MariaDB.

After site installation and apache configuration the html doesn't render
and I'm getting:



 
  HTTP 500 - Review Board is taking a nap
(...)

Error log:

[Tue Apr 18 18:21:03.923609 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Failed to
exec Python script file '/var/www/rebo/htdocs/reviewboard.wsgi'.
[Tue Apr 18 18:21:03.923909 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Exception
occurred processing WSGI script '/var/www/rebo/htdocs/reviewboard.wsgi'.
[Tue Apr 18 18:21:03.924326 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263] Traceback (most recent call
last):
[Tue Apr 18 18:21:03.924542 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263]   File
"/var/www/rebo/htdocs/reviewboard.wsgi", line 9, in 
[Tue Apr 18 18:21:03.924672 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263] from reviewboard.wsgi
import application
[Tue Apr 18 18:21:03.924810 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263]   File
"/usr/local/lib/python3.9/dist-packages/reviewboard/wsgi.py", line 33, in

[Tue Apr 18 18:21:03.924937 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263] application =
get_wsgi_application()
[Tue Apr 18 18:21:03.925055 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263]   File
"/usr/local/lib/python3.9/dist-packages/django/core/wsgi.py", line 12, in
get_wsgi_application
[Tue Apr 18 18:21:03.925176 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263]
django.setup(set_prefix=False)
[Tue Apr 18 18:21:03.925309 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263]   File
"/usr/local/lib/python3.9/dist-packages/django/__init__.py", line 24, in
setup
[Tue Apr 18 18:21:03.925431 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263]
apps.populate(settings.INSTALLED_APPS)
[Tue Apr 18 18:21:03.925537 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263]   File
"/usr/local/lib/python3.9/dist-packages/django/apps/registry.py", line 83,
in populate
[Tue Apr 18 18:21:03.925646 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263] raise
RuntimeError("populate() isn't reentrant")
[Tue Apr 18 18:21:03.925794 2023] [wsgi:error] [pid 647:tid
140449104779008] [client 10.200.20.5:55263] RuntimeError: populate() isn't
reentrant

It looks like a problem with wsgi.

dpkg -l | grep -i wsgi
ii  libapache2-mod-wsgi-py3   4.7.1-3+deb11u1amd64
   Python 3 WSGI adapter module for Apache

How do I fix the error?

Regards,
Adam

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CALC-DAGJfP6LyStj-NmAa1SAAW62J9sVOWkSxOZhEE80BdWuMA%40mail.gmail.com.


Re: wsgi issue in 5.0.4

2023-04-18 Thread Adam Weremczuk
I'm running WSGI in the default embedded mode:

# mod_wsgi Embedded Mode configuration
#
# This default configuration enables Embedded Mode, but you can remove
# this and uncomment Daemon Mode below.
#
# Embedded mode is simpler to configure, but daemon mode is recommended
# in production environments.
WSGIPassAuthorization On
WSGIScriptAlias "/" "/var/www/rebo/htdocs/reviewboard.wsgi"


On Tue, 18 Apr 2023 at 19:28, Adam Weremczuk  wrote:

> Hi all,
>
> Trying to install on Debian 11 with Apache2 and MariaDB.
>
> After site installation and apache configuration the html doesn't render
> and I'm getting:
>
> 
> 
>  
>   HTTP 500 - Review Board is taking a nap
> (...)
>
> Error log:
>
> [Tue Apr 18 18:21:03.923609 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Failed to
> exec Python script file '/var/www/rebo/htdocs/reviewboard.wsgi'.
> [Tue Apr 18 18:21:03.923909 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Exception
> occurred processing WSGI script '/var/www/rebo/htdocs/reviewboard.wsgi'.
> [Tue Apr 18 18:21:03.924326 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] Traceback (most recent call
> last):
> [Tue Apr 18 18:21:03.924542 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/var/www/rebo/htdocs/reviewboard.wsgi", line 9, in 
> [Tue Apr 18 18:21:03.924672 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] from reviewboard.wsgi
> import application
> [Tue Apr 18 18:21:03.924810 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/reviewboard/wsgi.py", line 33, in
> 
> [Tue Apr 18 18:21:03.924937 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] application =
> get_wsgi_application()
> [Tue Apr 18 18:21:03.925055 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/django/core/wsgi.py", line 12, in
> get_wsgi_application
> [Tue Apr 18 18:21:03.925176 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]
> django.setup(set_prefix=False)
> [Tue Apr 18 18:21:03.925309 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/django/__init__.py", line 24, in
> setup
> [Tue Apr 18 18:21:03.925431 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]
> apps.populate(settings.INSTALLED_APPS)
> [Tue Apr 18 18:21:03.925537 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/django/apps/registry.py", line 83,
> in populate
> [Tue Apr 18 18:21:03.925646 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] raise
> RuntimeError("populate() isn't reentrant")
> [Tue Apr 18 18:21:03.925794 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] RuntimeError: populate()
> isn't reentrant
>
> It looks like a problem with wsgi.
>
> dpkg -l | grep -i wsgi
> ii  libapache2-mod-wsgi-py3   4.7.1-3+deb11u1amd64
>Python 3 WSGI adapter module for Apache
>
> How do I fix the error?
>
> Regards,
> Adam
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CALC-DAHzA3WEbW6yX5vrAm2K-mUeJEH_6-fr1KcBNefou6df-g%40mail.gmail.com.


Re: wsgi issue in 5.0.4

2023-04-18 Thread Laurent Marechal
Hello,

Had a similar issue in the past. The error is kind of generic but in my
case it appeared after moving to Python3 for ReviewBoard while Python2 was
still the OS installation (thanks old RH).

The root cause was not having the WSI setup correctly. You need to update
the wsgi file with:

WSGIDaemonProcess ...
WSGIProcessGroup ...

You need to set them-up in the wsgi that you are using (reviewboard.wsgi I
think), the template created by the installation does not contain them.
Note you might get the same error if you try to run multiple wsgi
applications on the same http server.

Regards,

Laurent\


On Tue, Apr 18, 2023 at 8:29 PM Adam Weremczuk  wrote:

> Hi all,
>
> Trying to install on Debian 11 with Apache2 and MariaDB.
>
> After site installation and apache configuration the html doesn't render
> and I'm getting:
>
> 
> 
>  
>   HTTP 500 - Review Board is taking a nap
> (...)
>
> Error log:
>
> [Tue Apr 18 18:21:03.923609 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Failed to
> exec Python script file '/var/www/rebo/htdocs/reviewboard.wsgi'.
> [Tue Apr 18 18:21:03.923909 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Exception
> occurred processing WSGI script '/var/www/rebo/htdocs/reviewboard.wsgi'.
> [Tue Apr 18 18:21:03.924326 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] Traceback (most recent call
> last):
> [Tue Apr 18 18:21:03.924542 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/var/www/rebo/htdocs/reviewboard.wsgi", line 9, in 
> [Tue Apr 18 18:21:03.924672 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] from reviewboard.wsgi
> import application
> [Tue Apr 18 18:21:03.924810 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/reviewboard/wsgi.py", line 33, in
> 
> [Tue Apr 18 18:21:03.924937 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] application =
> get_wsgi_application()
> [Tue Apr 18 18:21:03.925055 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/django/core/wsgi.py", line 12, in
> get_wsgi_application
> [Tue Apr 18 18:21:03.925176 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]
> django.setup(set_prefix=False)
> [Tue Apr 18 18:21:03.925309 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/django/__init__.py", line 24, in
> setup
> [Tue Apr 18 18:21:03.925431 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]
> apps.populate(settings.INSTALLED_APPS)
> [Tue Apr 18 18:21:03.925537 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263]   File
> "/usr/local/lib/python3.9/dist-packages/django/apps/registry.py", line 83,
> in populate
> [Tue Apr 18 18:21:03.925646 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] raise
> RuntimeError("populate() isn't reentrant")
> [Tue Apr 18 18:21:03.925794 2023] [wsgi:error] [pid 647:tid
> 140449104779008] [client 10.200.20.5:55263] RuntimeError: populate()
> isn't reentrant
>
> It looks like a problem with wsgi.
>
> dpkg -l | grep -i wsgi
> ii  libapache2-mod-wsgi-py3   4.7.1-3+deb11u1amd64
>Python 3 WSGI adapter module for Apache
>
> How do I fix the error?
>
> Regards,
> Adam
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "Review Board Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/reviewboard/CALC-DAGJfP6LyStj-NmAa1SAAW62J9sVOWkSxOZhEE80BdWuMA%40mail.gmail.com
> 
> .
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/reviewboard/CA%2B3ehYnW9aY%3D23aNKW3yw

Re: wsgi issue in 5.0.4

2023-04-20 Thread Adam Weremczuk
Hi Laurent,

I have an existing and fully working 3.0.18 site. I've never had to do
anything special about WSGI, just "sudo apt install libapache2-mod-wsgi"
and copy the template config files.

I've compared 3.0.18 and 5.0.4 and key config files differ significantly
(apache-wsgi.conf, reviewboard.wsgi).

What struck me is one apache2 config line:

3.0.18:  *WSGIScriptAlias "/"
"/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi/
"*

5.0.4:  *WSGIScriptAlias "/"
"/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi
"*

Note the lack of trailing slash in the latter. Unfortunately adding a slash
and rebooting hasn't fixed my problem.

Could somebody running 5.0.X on Debian 10 / 11 care to share their working
apache2 config and reviewboard.wsgi?

Not sure how much Red Hat version would differ but no harm sharing that as
well please.

Regards,
Adam


On Tue, 18 Apr 2023 at 21:15, Laurent Marechal  wrote:

> Hello,
>
> Had a similar issue in the past. The error is kind of generic but in my
> case it appeared after moving to Python3 for ReviewBoard while Python2 was
> still the OS installation (thanks old RH).
>
> The root cause was not having the WSI setup correctly. You need to update
> the wsgi file with:
>
> WSGIDaemonProcess ...
> WSGIProcessGroup ...
>
> You need to set them-up in the wsgi that you are using (reviewboard.wsgi I
> think), the template created by the installation does not contain them.
> Note you might get the same error if you try to run multiple wsgi
> applications on the same http server.
>
> Regards,
>
> Laurent\
>
>
> On Tue, Apr 18, 2023 at 8:29 PM Adam Weremczuk 
> wrote:
>
>> Hi all,
>>
>> Trying to install on Debian 11 with Apache2 and MariaDB.
>>
>> After site installation and apache configuration the html doesn't render
>> and I'm getting:
>>
>> 
>> 
>>  
>>   HTTP 500 - Review Board is taking a nap
>> (...)
>>
>> Error log:
>>
>> [Tue Apr 18 18:21:03.923609 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Failed
>> to exec Python script file '/var/www/rebo/htdocs/reviewboard.wsgi'.
>> [Tue Apr 18 18:21:03.923909 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647):
>> Exception occurred processing WSGI script
>> '/var/www/rebo/htdocs/reviewboard.wsgi'.
>> [Tue Apr 18 18:21:03.924326 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263] Traceback (most recent call
>> last):
>> [Tue Apr 18 18:21:03.924542 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263]   File
>> "/var/www/rebo/htdocs/reviewboard.wsgi", line 9, in 
>> [Tue Apr 18 18:21:03.924672 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263] from reviewboard.wsgi
>> import application
>> [Tue Apr 18 18:21:03.924810 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263]   File
>> "/usr/local/lib/python3.9/dist-packages/reviewboard/wsgi.py", line 33, in
>> 
>> [Tue Apr 18 18:21:03.924937 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263] application =
>> get_wsgi_application()
>> [Tue Apr 18 18:21:03.925055 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263]   File
>> "/usr/local/lib/python3.9/dist-packages/django/core/wsgi.py", line 12, in
>> get_wsgi_application
>> [Tue Apr 18 18:21:03.925176 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263]
>> django.setup(set_prefix=False)
>> [Tue Apr 18 18:21:03.925309 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263]   File
>> "/usr/local/lib/python3.9/dist-packages/django/__init__.py", line 24, in
>> setup
>> [Tue Apr 18 18:21:03.925431 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263]
>> apps.populate(settings.INSTALLED_APPS)
>> [Tue Apr 18 18:21:03.925537 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263]   File
>> "/usr/local/lib/python3.9/dist-packages/django/apps/registry.py", line 83,
>> in populate
>> [Tue Apr 18 18:21:03.925646 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263] raise
>> RuntimeError("populate() isn't reentrant")
>> [Tue Apr 18 18:21:03.925794 2023] [wsgi:error] [pid 647:tid
>> 140449104779008] [client 10.200.20.5:55263] RuntimeError: populate()
>> isn't reentrant
>>
>> It looks like a problem with wsgi.
>>
>> dpkg -l | grep -i wsgi
>> ii  libapache2-mod-wsgi-py3   4.7.1-3+deb11u1amd64
>>  Python 3 WSGI adapter module for Apache
>>
>> How do I fix the error?
>>
>> Regards,
>> Adam
>>
>> --
>> Supercharge your Review Board with Power Pack:
>> https://www.reviewboard.org/powerpack/
>> Want us to host Review Board for you? Check out RBCommons:
>> https://rbcommons.com/
>> Happy user? Let us know! https://www.reviewboard.org/users/
>> ---
>> You 

Re: wsgi issue in 5.0.4

2023-05-03 Thread Astro Jetson
I installed on Ubuntu 20.04, Apache + wsgi.  I added logging config as 
described in the Admin Guide. the doc. I had to add 1 line to the generated 
file

This is my Apache .conf file for a 5.0.3 upgraded to 5.0.4.  Note:  I 
configured my site with an rbrd01 prefix.  ignore them.   

Hope this helps.

VirtualHost *:80>
ServerName dev-rim-rbrd01.perceptive.cloud
DocumentRoot "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs"

# Log configuration
#
# NOTE: logrotate configuration is in 
/etc/logrotate.d/dev-rim-rbrd01
ErrorLog /var/www/dev-rim-rbrd01.perceptive.cloud/logs/error.log
CustomLog /var/www/dev-rim-rbrd01.perceptive.cloud/logs/access.log 
combined


# Error handlers
ErrorDocument 500 /errordocs/500.html

WSGIPassAuthorization On
WSGIScriptAlias "/" 
"/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/reviewboard.wsgi"


AllowOverride All
Options -Indexes +FollowSymLinks
#johnp add  nothing works without it.
Require all granted


# Prevent the server from processing or allowing the rendering of
# certain file types.

SetHandler None
Options None

AddType text/plain .html .htm .shtml .php .php3 .php4 .php5 
.phps .asp
AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht 
.jsp .sh .rb


php_flag engine off


# Force all uploaded media files to download.

Header set Content-Disposition "attachment"



# Alias static media requests to filesystem
Alias /rbrd01/media 
"/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/media"
Alias /rbrd01/static 
"/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static"
Alias /rbrd01/errordocs 
"/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/errordocs"
Alias /rbrd01/favicon.ico 
"/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static/rb/images/favicon.png"


On Thursday, April 20, 2023 at 9:59:00 AM UTC-4 Adam Weremczuk wrote:

> Hi Laurent,
>
> I have an existing and fully working 3.0.18 site. I've never had to do 
> anything special about WSGI, just "sudo apt install libapache2-mod-wsgi" 
> and copy the template config files.
>
> I've compared 3.0.18 and 5.0.4 and key config files differ significantly 
> (apache-wsgi.conf, reviewboard.wsgi).
>
> What struck me is one apache2 config line:
>
> 3.0.18:  *WSGIScriptAlias "/" 
> "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi/ 
> "*
>
> 5.0.4:  *WSGIScriptAlias "/" 
> "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi 
> "*
>
> Note the lack of trailing slash in the latter. Unfortunately adding a 
> slash and rebooting hasn't fixed my problem.
>
> Could somebody running 5.0.X on Debian 10 / 11 care to share their working 
> apache2 config and reviewboard.wsgi?
>
> Not sure how much Red Hat version would differ but no harm sharing that as 
> well please.
>
> Regards,
> Adam
>
>
> On Tue, 18 Apr 2023 at 21:15, Laurent Marechal  wrote:
>
>> Hello,
>>
>> Had a similar issue in the past. The error is kind of generic but in my 
>> case it appeared after moving to Python3 for ReviewBoard while Python2 was 
>> still the OS installation (thanks old RH). 
>>
>> The root cause was not having the WSI setup correctly. You need to update 
>> the wsgi file with:
>>
>> WSGIDaemonProcess ...
>> WSGIProcessGroup ...
>>
>> You need to set them-up in the wsgi that you are using (reviewboard.wsgi 
>> I think), the template created by the installation does not contain them. 
>> Note you might get the same error if you try to run multiple wsgi 
>> applications on the same http server.
>>
>> Regards,
>>
>> Laurent\
>>
>>
>> On Tue, Apr 18, 2023 at 8:29 PM Adam Weremczuk  
>> wrote:
>>
>>> Hi all,
>>>
>>> Trying to install on Debian 11 with Apache2 and MariaDB.
>>>
>>> After site installation and apache configuration the html doesn't render 
>>> and I'm getting:
>>>
>>> 
>>> 
>>>  
>>>   HTTP 500 - Review Board is taking a nap
>>> (...)
>>>
>>> Error log:
>>>
>>> [Tue Apr 18 18:21:03.923609 2023] [wsgi:error] [pid 647:tid 
>>> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): Failed 
>>> to exec Python script file '/var/www/rebo/htdocs/reviewboard.wsgi'.
>>> [Tue Apr 18 18:21:03.923909 2023] [wsgi:error] [pid 647:tid 
>>> 140449104779008] [client 10.200.20.5:55263] mod_wsgi (pid=647): 
>>> Exception occurred processing WSGI script 
>>> '/var/www/rebo/htdocs/reviewboard.wsgi'.
>>> [Tue Apr 18 18:21:03.924326 2023] [wsgi:error] [pid 647:tid 
>>> 140449104779008] [client 10.200.20.5:55263] Traceback (most recent call 
>>> last):
>>> [Tue Apr 18 18:21:03.924542 2023] [wsgi:error] [pid 647:tid 
>>> 140449104779008] [client 10.200.

Re: wsgi issue in 5.0.4

2023-05-08 Thread Christian Hammond
Hi Adam,

This is not an error you should be hitting. It's hard to say what may be
triggering it, but it does seem environmental (and is before any real
Review Board code gets loaded).

Can you verify the version of Python that Review Board is installed with,
and the version mod_wsgi is using (it should be in Apache's error_log).

Also, if I could see your $sitedir/htdocs/reviewboard.wsgi, that would help.

Christian

On Wed, May 3, 2023 at 1:30 PM Astro Jetson 
wrote:

> I installed on Ubuntu 20.04, Apache + wsgi.  I added logging config as
> described in the Admin Guide. the doc. I had to add 1 line to the generated
> file
>
> This is my Apache .conf file for a 5.0.3 upgraded to 5.0.4.  Note:  I
> configured my site with an rbrd01 prefix.  ignore them.
>
> Hope this helps.
>
> VirtualHost *:80>
> ServerName dev-rim-rbrd01.perceptive.cloud
> DocumentRoot "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs"
>
> # Log configuration
> #
> # NOTE: logrotate configuration is in
> /etc/logrotate.d/dev-rim-rbrd01
> ErrorLog /var/www/dev-rim-rbrd01.perceptive.cloud/logs/error.log
> CustomLog /var/www/dev-rim-rbrd01.perceptive.cloud/logs/access.log
> combined
>
>
> # Error handlers
> ErrorDocument 500 /errordocs/500.html
>
> WSGIPassAuthorization On
> WSGIScriptAlias "/"
> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/reviewboard.wsgi"
>
> 
> AllowOverride All
> Options -Indexes +FollowSymLinks
> #johnp add  nothing works without it.
> Require all granted
> 
>
> # Prevent the server from processing or allowing the rendering of
> # certain file types.
> 
> SetHandler None
> Options None
>
> AddType text/plain .html .htm .shtml .php .php3 .php4
> .php5 .phps .asp
> AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht
> .jsp .sh .rb
>
> 
> php_flag engine off
> 
>
> # Force all uploaded media files to download.
> 
> Header set Content-Disposition "attachment"
> 
> 
>
> # Alias static media requests to filesystem
> Alias /rbrd01/media
> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/media"
> Alias /rbrd01/static
> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static"
> Alias /rbrd01/errordocs
> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/errordocs"
> Alias /rbrd01/favicon.ico
> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static/rb/images/favicon.png"
> 
>
> On Thursday, April 20, 2023 at 9:59:00 AM UTC-4 Adam Weremczuk wrote:
>
>> Hi Laurent,
>>
>> I have an existing and fully working 3.0.18 site. I've never had to do
>> anything special about WSGI, just "sudo apt install libapache2-mod-wsgi"
>> and copy the template config files.
>>
>> I've compared 3.0.18 and 5.0.4 and key config files differ significantly
>> (apache-wsgi.conf, reviewboard.wsgi).
>>
>> What struck me is one apache2 config line:
>>
>> 3.0.18:  *WSGIScriptAlias "/"
>> "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi/
>> "*
>>
>> 5.0.4:  *WSGIScriptAlias "/"
>> "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi
>> "*
>>
>> Note the lack of trailing slash in the latter. Unfortunately adding a
>> slash and rebooting hasn't fixed my problem.
>>
>> Could somebody running 5.0.X on Debian 10 / 11 care to share their
>> working apache2 config and reviewboard.wsgi?
>>
>> Not sure how much Red Hat version would differ but no harm sharing that
>> as well please.
>>
>> Regards,
>> Adam
>>
>>
>> On Tue, 18 Apr 2023 at 21:15, Laurent Marechal  wrote:
>>
>>> Hello,
>>>
>>> Had a similar issue in the past. The error is kind of generic but in my
>>> case it appeared after moving to Python3 for ReviewBoard while Python2 was
>>> still the OS installation (thanks old RH).
>>>
>>> The root cause was not having the WSI setup correctly. You need to
>>> update the wsgi file with:
>>>
>>> WSGIDaemonProcess ...
>>> WSGIProcessGroup ...
>>>
>>> You need to set them-up in the wsgi that you are using (reviewboard.wsgi
>>> I think), the template created by the installation does not contain them.
>>> Note you might get the same error if you try to run multiple wsgi
>>> applications on the same http server.
>>>
>>> Regards,
>>>
>>> Laurent\
>>>
>>>
>>> On Tue, Apr 18, 2023 at 8:29 PM Adam Weremczuk 
>>> wrote:
>>>
 Hi all,

 Trying to install on Debian 11 with Apache2 and MariaDB.

 After site installation and apache configuration the html doesn't
 render and I'm getting:

 
 
  
   HTTP 500 - Review Board is taking a nap
 (...)

 Error log:

 [Tue Apr 18 18:21:03.923609 2023] [wsgi:error] [

Re: wsgi issue in 5.0.4

2023-05-09 Thread Subodh Konhor
As per the error message there is a generic runtime error being thrown
"RuntimeError:
populate() isn't reentrant"

Check below SO link which helps identify real problem.

https://stackoverflow.com/questions/27093746/django-stops-working-with-runtimeerror-populate-isnt-reentrant/55929118#55929118

On Tue, 9 May 2023, 05:57 Christian Hammond, 
wrote:

> Hi Adam,
>
> This is not an error you should be hitting. It's hard to say what may be
> triggering it, but it does seem environmental (and is before any real
> Review Board code gets loaded).
>
> Can you verify the version of Python that Review Board is installed with,
> and the version mod_wsgi is using (it should be in Apache's error_log).
>
> Also, if I could see your $sitedir/htdocs/reviewboard.wsgi, that would
> help.
>
> Christian
>
> On Wed, May 3, 2023 at 1:30 PM Astro Jetson 
> wrote:
>
>> I installed on Ubuntu 20.04, Apache + wsgi.  I added logging config as
>> described in the Admin Guide. the doc. I had to add 1 line to the generated
>> file
>>
>> This is my Apache .conf file for a 5.0.3 upgraded to 5.0.4.  Note:  I
>> configured my site with an rbrd01 prefix.  ignore them.
>>
>> Hope this helps.
>>
>> VirtualHost *:80>
>> ServerName dev-rim-rbrd01.perceptive.cloud
>> DocumentRoot "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs"
>>
>> # Log configuration
>> #
>> # NOTE: logrotate configuration is in
>> /etc/logrotate.d/dev-rim-rbrd01
>> ErrorLog /var/www/dev-rim-rbrd01.perceptive.cloud/logs/error.log
>> CustomLog
>> /var/www/dev-rim-rbrd01.perceptive.cloud/logs/access.log combined
>>
>>
>> # Error handlers
>> ErrorDocument 500 /errordocs/500.html
>>
>> WSGIPassAuthorization On
>> WSGIScriptAlias "/"
>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/reviewboard.wsgi"
>>
>> 
>> AllowOverride All
>> Options -Indexes +FollowSymLinks
>> #johnp add  nothing works without it.
>> Require all granted
>> 
>>
>> # Prevent the server from processing or allowing the rendering of
>> # certain file types.
>> 
>> SetHandler None
>> Options None
>>
>> AddType text/plain .html .htm .shtml .php .php3 .php4
>> .php5 .phps .asp
>> AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht
>> .jsp .sh .rb
>>
>> 
>> php_flag engine off
>> 
>>
>> # Force all uploaded media files to download.
>> 
>> Header set Content-Disposition "attachment"
>> 
>> 
>>
>> # Alias static media requests to filesystem
>> Alias /rbrd01/media
>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/media"
>> Alias /rbrd01/static
>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static"
>> Alias /rbrd01/errordocs
>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/errordocs"
>> Alias /rbrd01/favicon.ico
>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static/rb/images/favicon.png"
>> 
>>
>> On Thursday, April 20, 2023 at 9:59:00 AM UTC-4 Adam Weremczuk wrote:
>>
>>> Hi Laurent,
>>>
>>> I have an existing and fully working 3.0.18 site. I've never had to do
>>> anything special about WSGI, just "sudo apt install libapache2-mod-wsgi"
>>> and copy the template config files.
>>>
>>> I've compared 3.0.18 and 5.0.4 and key config files differ significantly
>>> (apache-wsgi.conf, reviewboard.wsgi).
>>>
>>> What struck me is one apache2 config line:
>>>
>>> 3.0.18:  *WSGIScriptAlias "/"
>>> "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi/
>>> "*
>>>
>>> 5.0.4:  *WSGIScriptAlias "/"
>>> "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi
>>> "*
>>>
>>> Note the lack of trailing slash in the latter. Unfortunately adding a
>>> slash and rebooting hasn't fixed my problem.
>>>
>>> Could somebody running 5.0.X on Debian 10 / 11 care to share their
>>> working apache2 config and reviewboard.wsgi?
>>>
>>> Not sure how much Red Hat version would differ but no harm sharing that
>>> as well please.
>>>
>>> Regards,
>>> Adam
>>>
>>>
>>> On Tue, 18 Apr 2023 at 21:15, Laurent Marechal 
>>> wrote:
>>>
 Hello,

 Had a similar issue in the past. The error is kind of generic but in my
 case it appeared after moving to Python3 for ReviewBoard while Python2 was
 still the OS installation (thanks old RH).

 The root cause was not having the WSI setup correctly. You need to
 update the wsgi file with:

 WSGIDaemonProcess ...
 WSGIProcessGroup ...

 You need to set them-up in the wsgi that you are using
 (reviewboard.wsgi I think), the template created by the installation does
 not contain them.
 Note you might get the same error if you try to run mul

Re: wsgi issue in 5.0.4

2023-05-11 Thread Christian Hammond
We have a lot of familiarity with this internal layer of Django and the
sort of issues that can cause it, but it’s not something that should happen
in a typical Review Board setup unless there’s something happening before
our initialization code gets to run or if there’s a system packaging issue
breaking some part of that initialization.

This will take some investigation involving copies of some files (the
aforementioned ones, and some log files and potentially Python package
listings).

Under a support contract, we can also send custom builds with additional
logging, and gather this information privately, but if anyone affected on
the mailing list is in a position to publicly provide these copies of these
files, we’ll take a look.

Christian


On Tue, May 9, 2023 at 23:31 Subodh Konhor  wrote:

> As per the error message there is a generic runtime error being thrown 
> "RuntimeError:
> populate() isn't reentrant"
>
> Check below SO link which helps identify real problem.
>
>
> https://stackoverflow.com/questions/27093746/django-stops-working-with-runtimeerror-populate-isnt-reentrant/55929118#55929118
>
> On Tue, 9 May 2023, 05:57 Christian Hammond, 
> wrote:
>
>> Hi Adam,
>>
>> This is not an error you should be hitting. It's hard to say what may be
>> triggering it, but it does seem environmental (and is before any real
>> Review Board code gets loaded).
>>
>> Can you verify the version of Python that Review Board is installed with,
>> and the version mod_wsgi is using (it should be in Apache's error_log).
>>
>> Also, if I could see your $sitedir/htdocs/reviewboard.wsgi, that would
>> help.
>>
>> Christian
>>
>> On Wed, May 3, 2023 at 1:30 PM Astro Jetson 
>> wrote:
>>
>>> I installed on Ubuntu 20.04, Apache + wsgi.  I added logging config as
>>> described in the Admin Guide. the doc. I had to add 1 line to the generated
>>> file
>>>
>>> This is my Apache .conf file for a 5.0.3 upgraded to 5.0.4.  Note:  I
>>> configured my site with an rbrd01 prefix.  ignore them.
>>>
>>> Hope this helps.
>>>
>>> VirtualHost *:80>
>>> ServerName dev-rim-rbrd01.perceptive.cloud
>>> DocumentRoot "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs"
>>>
>>> # Log configuration
>>> #
>>> # NOTE: logrotate configuration is in
>>> /etc/logrotate.d/dev-rim-rbrd01
>>> ErrorLog /var/www/dev-rim-rbrd01.perceptive.cloud/logs/error.log
>>> CustomLog
>>> /var/www/dev-rim-rbrd01.perceptive.cloud/logs/access.log combined
>>>
>>>
>>> # Error handlers
>>> ErrorDocument 500 /errordocs/500.html
>>>
>>> WSGIPassAuthorization On
>>> WSGIScriptAlias "/"
>>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/reviewboard.wsgi"
>>>
>>> 
>>> AllowOverride All
>>> Options -Indexes +FollowSymLinks
>>> #johnp add  nothing works without it.
>>> Require all granted
>>> 
>>>
>>> # Prevent the server from processing or allowing the rendering of
>>> # certain file types.
>>> 
>>> SetHandler None
>>> Options None
>>>
>>> AddType text/plain .html .htm .shtml .php .php3 .php4
>>> .php5 .phps .asp
>>> AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht
>>> .jsp .sh .rb
>>>
>>> 
>>> php_flag engine off
>>> 
>>>
>>> # Force all uploaded media files to download.
>>> 
>>> Header set Content-Disposition "attachment"
>>> 
>>> 
>>>
>>> # Alias static media requests to filesystem
>>> Alias /rbrd01/media
>>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/media"
>>> Alias /rbrd01/static
>>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static"
>>> Alias /rbrd01/errordocs
>>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/errordocs"
>>> Alias /rbrd01/favicon.ico
>>> "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static/rb/images/favicon.png"
>>> 
>>>
>>> On Thursday, April 20, 2023 at 9:59:00 AM UTC-4 Adam Weremczuk wrote:
>>>
 Hi Laurent,

 I have an existing and fully working 3.0.18 site. I've never had to do
 anything special about WSGI, just "sudo apt install libapache2-mod-wsgi"
 and copy the template config files.

 I've compared 3.0.18 and 5.0.4 and key config files differ
 significantly (apache-wsgi.conf, reviewboard.wsgi).

 What struck me is one apache2 config line:

 3.0.18:  *WSGIScriptAlias "/"
 "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi/
 "*

 5.0.4:  *WSGIScriptAlias "/"
 "/var/www/rebo.mydomain.com/htdocs/reviewboard.wsgi
 "*

 Note the lack of trailing slash in the latter. Unfortunately adding a
 slash and rebooting hasn't fixed my problem.

Re: wsgi issue in 5.0.4

2023-05-11 Thread Christian Hammond
To get the list in one place, this set of information will help:

* $sitedir/htdocs/reviewboard.wsgi
* $sitedir/logs/error_log
* $sitedir/logs/reviewboard.log
* Result of `pipX.Y list` (where X.Y corresponds to the version of Python
being used by mod_wsgi)
* That Python version number
* The OS and version
* Whether or not any extensions are enabled (and which ones), particularly
if there are any third-party or in-house ones enabled.

Also, we can learn a lot from running:

$ rb-site manage $sitedir shell
from reviewboard import initialize
initialize()


If that shows any errors or warnings, seeing those can point us in the
right direction.

Thanks 🙂

Christian


On Thu, May 11, 2023 at 12:19 Christian Hammond 
wrote:

> We have a lot of familiarity with this internal layer of Django and the
> sort of issues that can cause it, but it’s not something that should happen
> in a typical Review Board setup unless there’s something happening before
> our initialization code gets to run or if there’s a system packaging issue
> breaking some part of that initialization.
>
> This will take some investigation involving copies of some files (the
> aforementioned ones, and some log files and potentially Python package
> listings).
>
> Under a support contract, we can also send custom builds with additional
> logging, and gather this information privately, but if anyone affected on
> the mailing list is in a position to publicly provide these copies of these
> files, we’ll take a look.
>
> Christian
>
>
> On Tue, May 9, 2023 at 23:31 Subodh Konhor  wrote:
>
>> As per the error message there is a generic runtime error being thrown 
>> "RuntimeError:
>> populate() isn't reentrant"
>>
>> Check below SO link which helps identify real problem.
>>
>>
>> https://stackoverflow.com/questions/27093746/django-stops-working-with-runtimeerror-populate-isnt-reentrant/55929118#55929118
>>
>> On Tue, 9 May 2023, 05:57 Christian Hammond, 
>> wrote:
>>
>>> Hi Adam,
>>>
>>> This is not an error you should be hitting. It's hard to say what may be
>>> triggering it, but it does seem environmental (and is before any real
>>> Review Board code gets loaded).
>>>
>>> Can you verify the version of Python that Review Board is installed
>>> with, and the version mod_wsgi is using (it should be in Apache's
>>> error_log).
>>>
>>> Also, if I could see your $sitedir/htdocs/reviewboard.wsgi, that would
>>> help.
>>>
>>> Christian
>>>
>>> On Wed, May 3, 2023 at 1:30 PM Astro Jetson <
>>> john.prock.liqu...@gmail.com> wrote:
>>>
 I installed on Ubuntu 20.04, Apache + wsgi.  I added logging config as
 described in the Admin Guide. the doc. I had to add 1 line to the generated
 file

 This is my Apache .conf file for a 5.0.3 upgraded to 5.0.4.  Note:  I
 configured my site with an rbrd01 prefix.  ignore them.

 Hope this helps.

 VirtualHost *:80>
 ServerName dev-rim-rbrd01.perceptive.cloud
 DocumentRoot "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs"

 # Log configuration
 #
 # NOTE: logrotate configuration is in
 /etc/logrotate.d/dev-rim-rbrd01
 ErrorLog /var/www/dev-rim-rbrd01.perceptive.cloud/logs/error.log
 CustomLog
 /var/www/dev-rim-rbrd01.perceptive.cloud/logs/access.log combined


 # Error handlers
 ErrorDocument 500 /errordocs/500.html

 WSGIPassAuthorization On
 WSGIScriptAlias "/"
 "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/reviewboard.wsgi"

 
 AllowOverride All
 Options -Indexes +FollowSymLinks
 #johnp add  nothing works without it.
 Require all granted
 

 # Prevent the server from processing or allowing the rendering
 of
 # certain file types.
 
 SetHandler None
 Options None

 AddType text/plain .html .htm .shtml .php .php3 .php4
 .php5 .phps .asp
 AddType text/plain .pl .py .fcgi .cgi .phtml .phtm .pht
 .jsp .sh .rb

 
 php_flag engine off
 

 # Force all uploaded media files to download.
 
 Header set Content-Disposition "attachment"
 
 

 # Alias static media requests to filesystem
 Alias /rbrd01/media
 "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/media"
 Alias /rbrd01/static
 "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static"
 Alias /rbrd01/errordocs
 "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/errordocs"
 Alias /rbrd01/favicon.ico
 "/var/www/dev-rim-rbrd01.perceptive.cloud/htdocs/static/rb/images/favicon.png"
 

 On Thursday, Ap