uwsgi cannot open "./router_redirect_plugin.so"

sagaracharya

New Member


Messages: 19

Earlier I installed FreeBSD 13-CURRENT, installed uwsgi through ports

Bash:
cd /usr/ports/www/uwsgi
make install clean
It did work well and I was able to access a plugin named router_redirect . When I'm installing the same in 12.1-STABLE on my RPi3, I'm unable to access the plugin

It prints
!!! UNABLE to load uWSGI plugin: Cannot open "./router_redirect_plugin.so" !!!

My .ini file is as follows:

INI:
...
plugins = router_redirect
...
I also tried uninstalling with port and installing with pkg, doesn't work!
 
OP
sagaracharya

sagaracharya

New Member


Messages: 19

I tried with the latest CURRENT. Same error. The configuration at end of port installation shows
plugin_dir = .
I'm not sure whether it is empty or it's the same directory. What to do now?

I'm unable to find where it's installed. I see some unreadable uwsgi files in /usr/local/bin
 
OP
sagaracharya

sagaracharya

New Member


Messages: 19

Bash:
find / -name uwsgi
shows 4 locations
/usr/local/etc/rc.d/uwsgi
/usr/local/bin/uwsgi
/usr/ports/www/uwsgi
/var/mail/uwsgi

Bash:
find / -name router_redirect_plugin.so
find / -name router_redirect
Above 2 commands show absolutely nothing! There's no such file!
Only the port maintainer can help me now.
 

Elazar

Well-Known Member

Reaction score: 108
Messages: 256

Maybe make config install clean and enable plugins in the config screen?

Freshports shows this under configuration options:
Code:
 Enable plugins     PSGI=off: PSGI embedded plugin
This could explain your error message (UNABLE to load uWSGI plugin).

But I dont know this port, never used it.
 

T-Daemon

Aspiring Daemon

Reaction score: 336
Messages: 815

Only the port maintainer can help me now.
You could also address the problem to the uWSGI mailing list: http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

There is a way to obtain the plugin. Build the plugin manually, execute in /usr/ports/www/uwsgi/work-py37/uwsgi-2.0.18:

python3.7 uwsgiconfig.py --plugin plugins/router_redirect
cp router_redirect_plugin.so /usr/local/lib
service uwsgi restart

But this is not a recommended procedure. It will produce a unregistered library, absent in the package database, invisible to the pkg(8) or ports(7) framework.

Also a default direct build from source tar ball doesn't produce any .so libraries. Maybe it's meant to be modular.

 
OP
sagaracharya

sagaracharya

New Member


Messages: 19

You could also address the problem to the uWSGI mailing list: http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

There is a way to obtain the plugin. Build the plugin manually, execute in /usr/ports/www/uwsgi/work-py37/uwsgi-2.0.18:

python3.7 uwsgiconfig.py --plugin plugins/router_redirect
cp router_redirect_plugin.so /usr/local/lib
service uwsgi restart

But this is not a recommended procedure. It will produce a unregistered library, absent in the package database, invisible to the pkg(8) or ports(7) framework.
That did it. Thanks a ton. I have requested uwsgi guys on the above mailing list to update the port since also, 2.0.19 is out. I will keep this setting till the updated port is out. Then I'll reinstall the port.
 

T-Daemon

Aspiring Daemon

Reaction score: 336
Messages: 815

There is a misunderstanding. Suggesting the uWSGI mailing list was meant to clarify why the plugin is absent.

After further investigation, it's also possible the error message is an error itself, that the module is embedded in the uwsgi binary, the linking to router_redirect_plugin.so faulty. Running make on the port with script(1) recording the build and less verbosity ( Makefile #PYDISTUTILS_BUILDARGS= --verbose):
Code:
...
*** uWSGI compiling embedded plugins ***
...
[thread 3][cc] plugins/router_redirect/router_redirect.o
...
And the binary:
Code:
strings  work-py37/uwsgi-2.0.19.1/uwsgi | grep router_redirect
router_redirect_plugin
router_redirect
You should file a bug report at https://bugs.freebsd.org to clarify the situation.

I have requested uwsgi guys on the above mailing list to update the port since also, 2.0.19 is out.
Thats not the right place. They are not responsible for the port maintenance. You need to address the request at https://bugs.freebsd.org Ports & Packages (latest version is 2.0.19.1) . But the problem with the error message should be clarified first.
 
Last edited:
OP
sagaracharya

sagaracharya

New Member


Messages: 19

After further investigation, it's also possible the error message is an error itself, that the module is embedded in the uwsgi binary, the linking to router_redirect_plugin.so faulty. Running make on the port with script(1) recording the build and less verbosity ( Makefile #PYDISTUTILS_BUILDARGS= --verbose):
Code:
...
*** uWSGI compiling embedded plugins ***
...
[thread 3][cc] plugins/router_redirect/router_redirect.o
...
And the binary:
Code:
grep router_redirect_plugin work-py37/uwsgi-2.0.18/uwsgi
Yes, the plugin worked but once I tried to run my site on server, nothing works well. It shows a template error when my templates are present. It's broken without a doubt. I have filed a bug. I hope they fix it ASAP. I'm totally stuck!
 

T-Daemon

Aspiring Daemon

Reaction score: 336
Messages: 815

My .ini file is as follows:
INI:
...
plugins = router_redirect
Reading though the documentation it seems to be a .ini configuration error on your side (embedded plugins a.k.a modules), try /usr/local/etc/uwsgi/uwsgi.ini:
Code:
[uwsgi]

module=router_redirect
Starting the service doesn't return an error with the above configuration, but I have no setup to see if the plugin/module is working as expected.
 
Top