Topic: I cannot make the iredadmin service to start
- iRedMail version: 1.3.1 MARIADB edition.
- Deployed with the downloadable installer
- Linux/BSD distribution name and version: Ubuntu 20.04.1 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? NO
I cannot make the iredadmin service to start
service iredadmin status
Sep 05 00:10:47 webserver.zaxaris-energy.gr systemd[1]: Starting iRedAdmin daemon service...
Sep 05 00:10:47 webserver.zaxaris-energy.gr systemd[1]: Started iRedAdmin daemon service.
Sep 05 00:10:47 webserver.zaxaris-energy.gr systemd[202780]: iredadmin.service: Failed to execute command: No such file or directory
Sep 05 00:10:47 webserver.zaxaris-energy.gr systemd[202780]: iredadmin.service: Failed at step EXEC spawning /usr/local/bin/uwsgi: No such file or directory
Sep 05 00:10:47 webserver.zaxaris-energy.gr systemd[1]: iredadmin.service: Main process exited, code=exited, status=203/EXEC
Sep 05 00:10:47 webserver.zaxaris-energy.gr systemd[1]: iredadmin.service: Failed with result 'exit-code'.
tail -n20 /var/log/syslog
Sep 5 00:10:47 webserver systemd[1]: Starting iRedAdmin daemon service...
Sep 5 00:10:47 webserver systemd[1]: Started iRedAdmin daemon service.
Sep 5 00:10:47 webserver systemd[202780]: iredadmin.service: Failed to execute command: No such file or directory
Sep 5 00:10:47 webserver systemd[202780]: iredadmin.service: Failed at step EXEC spawning /usr/local/bin/uwsgi: No such file or directory
Sep 5 00:10:47 webserver systemd[1]: iredadmin.service: Main process exited, code=exited, status=203/EXEC
Sep 5 00:10:47 webserver systemd[1]: iredadmin.service: Failed with result 'exit-code'.
Sep 5 00:11:01 webserver CRON[202797]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Sep 5 00:12:01 webserver CRON[202813]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Sep 5 00:13:01 webserver CRON[202857]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Sep 5 00:14:01 webserver CRON[202872]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Sep 5 00:15:01 webserver CRON[202885]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Sep 5 00:16:01 webserver CRON[202918]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Sep 5 00:16:14 webserver systemd[1]: Starting iRedAdmin daemon service...
Sep 5 00:16:14 webserver systemd[1]: Started iRedAdmin daemon service.
Sep 5 00:16:14 webserver systemd[202957]: iredadmin.service: Failed to execute command: No such file or directory
Sep 5 00:16:14 webserver systemd[202957]: iredadmin.service: Failed at step EXEC spawning /usr/local/bin/uwsgi: No such file or directory
Sep 5 00:16:14 webserver systemd[1]: iredadmin.service: Main process exited, code=exited, status=203/EXEC
Sep 5 00:16:14 webserver systemd[1]: iredadmin.service: Failed with result 'exit-code'.
service uwsgi status
● uwsgi.service - LSB: Start/stop uWSGI server instance(s)
Loaded: loaded (/etc/init.d/uwsgi; generated)
Active: active (exited) since Fri 2020-09-04 23:49:05 CEST; 28min ago
Docs: man:systemd-sysv-generator(8)
Process: 201701 ExecStart=/etc/init.d/uwsgi start (code=exited, status=0/SUCCESS)
Sep 04 23:49:05 webserver.zaxaris-energy.gr systemd[1]: Starting LSB: Start/stop uWSGI server instance(s)...
Sep 04 23:49:05 webserver.zaxaris-energy.gr uwsgi[201701]: * Starting app server(s) uwsgi
Sep 04 23:49:05 webserver.zaxaris-energy.gr uwsgi[201701]: ...done.
Sep 04 23:49:05 webserver.zaxaris-energy.gr systemd[1]: Started LSB: Start/stop uWSGI server instance(s).
which uwsgi
/usr/bin/uwsgi
I saw in another post that is suggested to run pip2 install uwsgi
The command above gives a lot of errors:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting uwsgi
Using cached uWSGI-2.0.19.1.tar.gz (803 kB)
Building wheels for collected packages: uwsgi
Building wheel for uwsgi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Ri7nqu/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-Ri7nqu/uwsgi/setup.py'"'"';f=getattr(tokenize, '"' "'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-vWwfrT
cwd: /tmp/pip-install-Ri7nqu/uwsgi/
Complete output (35 lines):
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying uwsgidecorators.py -> build/lib.linux-x86_64-2.7
installing to build/bdist.linux-x86_64/wheel
running install
using profile: buildconf/default.ini
detected include path: ['/usr/include', '/usr/local/include']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-Ri7nqu/uwsgi/setup.py", line 140, in <module>
'Programming Language :: Python :: 3.8',
File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.7/dist-packages/wheel/bdist_wheel.py", line 326, in run
self.run_command('install')
File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-install-Ri7nqu/uwsgi/setup.py", line 77, in run
conf = uc.uConf(get_profile())
File "uwsgiconfig.py", line 755, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
----------------------------------------
ERROR: Failed building wheel for uwsgi
Running setup.py clean for uwsgi
Failed to build uwsgi
DEPRECATION: Could not build wheels for uwsgi which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is t o fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: uwsgi
Running setup.py install for uwsgi ... error
ERROR: Command errored out with exit status 1:
command: /bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Ri7nqu/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-Ri7nqu/uwsgi/setup.py'"'"';f=getattr(tokenize, ' "'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rqXlkx/install-record.txt --single-ver sion-externally-managed --compile --install-headers /usr/local/include/python2.7/uwsgi
cwd: /tmp/pip-install-Ri7nqu/uwsgi/
Complete output (22 lines):
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'descriptions'
warnings.warn(msg)
running install
using profile: buildconf/default.ini
detected include path: ['/usr/include', '/usr/local/include']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-Ri7nqu/uwsgi/setup.py", line 140, in <module>
'Programming Language :: Python :: 3.8',
File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/tmp/pip-install-Ri7nqu/uwsgi/setup.py", line 77, in run
conf = uc.uConf(get_profile())
File "uwsgiconfig.py", line 755, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
----------------------------------------
ERROR: Command errored out with exit status 1: /bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Ri7nqu/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-Ri7nqu/uwsgi/se tup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-rqXlk
x/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python2.7/uwsgi Check the logs for full command output.
Any ideas?
also in my postmaster email i get a lot of messages with the following message
Subject: Cron <root@webserver> python2 /opt/www/iredadmin/tools/delete_mailboxes.py
Body: <<< ERROR >>> Cannot connect to SQL database, aborted. Error: TypeError("cannot concatenate 'str' and 'exceptions.ImportError' objects",)
Not sure if this is related
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.