Topic: iRedAdmin pro - API not working
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.1 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Linux Debian 11
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? YES
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
Tries to import email accounts via the script import_users.py
In the /opt/www/iredadmin/settings.py configuration I added to the file:
ENABLE_RESTFUL_API = True
RESTFUL_API_CLIENTS = ['127.0.0.1']
and restarted the whole server to be sure.
Additionally, to run the script itself,
I have edited variables in import_users.py
api_endpoint = 'h t t p: // 127.0.0.1 : 8080/api'
verify_cert = False
admin = 'firstname.lastname@example.org'
pw = '12sd12fak12am'
Unfortunately, calling the script receives: "requests.exceptions.ConnectionError: HTTPConnectionPool (host = '127.0.0.1', port = 8080): Max retries exceeded with url: / api / login (Caused by NewConnectionError ('<urllib3.ection.HTTPConnection object at 0x7fa0c3a12f10>: Failed to establish a new connection: [Errno 111] Connect "
lsof also doesn't show something listening on port 8080
lsof -i -P -n | grep LISTEN | grep 8080
What am I doing wrong ?
Thank you in advance for your help !
----Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Stable release is out.