Coder Social home page Coder Social logo

Comments (5)

iredmail avatar iredmail commented on May 23, 2024

New installation with migration from old Centos 7 box.

Please download the latest iRedAPD release and upgrade (no matter which iRedAPD version you're running), so that it can install required Python modules on your server.
https://docs.iredmail.org/upgrade.iredapd.html

Also upgrade mlmmjadmin:
https://docs.iredmail.org/upgrade.mlmmjadmin.html

from iredmail.

kman261 avatar kman261 commented on May 23, 2024

Unfortunately, it did not fix the problem. I upgraded iRedApd, but still have the error.
Upgrade:

[root@mx tools]# bash upgrade_iredapd.sh
* Detected Linux/BSD distribution: RHEL
* Checking dependent Python modules:
  + [required] wheel
  + [required] sqlalchemy
  + [required] dnspython
  + [required] requests
Install packages: python3-PyMySQL
Last metadata expiration check: 2:08:12 ago on Sun Mar 24 05:19:28 2024.
Package python3-PyMySQL-0.10.1-6.el9.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
* Found iRedAPD directory: /opt/iredapd, symbol link of iRedAPD-5.3.3
* Found iRedAPD config file: /opt/iredapd/settings.py
* Add new SQL tables - if there's any
* Copying new version to /opt/iRedAPD-5.3.3
* Copy old config file: settings.py (/opt/iredapd/settings.py -> /opt/iRedAPD-5.3.3/settings.py)
cp: '/opt/iredapd/settings.py' and '/opt/iRedAPD-5.3.3/settings.py' are the same file
* Copy custom plugins: iRedAPD-5.3.3/plugins/custom_*.py.
* Set correct owner and permission for /opt/iRedAPD-5.3.3: root:root, 0500.
* Set permission for iRedAPD config file: /opt/iRedAPD-5.3.3/settings.py -> 0400.
* Re-create symbol link: /opt/iredapd -> /opt/iRedAPD-5.3.3
* Remove existing systemd service files.
* Copy systemd service file: /opt/iredapd/rc_scripts/iredapd.service -> /lib/systemd/system/iredapd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/iredapd.service -> /usr/lib/systemd/system/iredapd.service.
Redirecting to /bin/systemctl restart rsyslog.service
* Replace py2 by py3 in cron jobs.
* Restarting iRedAPD service.
Redirecting to /bin/systemctl restart iredapd.service
* Upgrade completed.

< NOTE > If iRedAPD doesn't work as expected, please post your issue in our
< NOTE > online support forum: http://www.iredmail.org/forum/
< NOTE >
< NOTE > * Turn on debug mode: http://www.iredmail.org/docs/debug.iredapd.html
< NOTE > * iRedAPD log file is /var/log/iredapd/iredapd.log.

Restarting iRedApd:
[root@mx tools]# service iredapd restart
Redirecting to /bin/systemctl restart iredapd.service

Log during restart

Mar 24 07:29:03 mx python3[880411]: iredapd Error while creating SQL connection: ModuleNotFoundError("No module named 'pymysql'")
Mar 24 07:29:03 mx python3[880411]: iredapd Error while creating SQL connection: ModuleNotFoundError("No module named 'pymysql'")
Mar 24 07:29:03 mx python3[880411]: iredapd Error while creating SQL connection: ModuleNotFoundError("No module named 'pymysql'")
Mar 24 07:29:03 mx python3[880411]: iredapd Starting iRedAPD (version: 5.3.3, backend: mysql), listening on 127.0.0.1:7777.
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 100): reject_null_sender
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 99): wblist_rdns
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 90): reject_sender_login_mismatch
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 80): greylisting
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 60): throttle
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 51): sql_ml_access_policy
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 50): sql_alias_access_policy
Mar 24 07:29:03 mx python3[880411]: iredapd Loading plugin (priority: 40): amavisd_wblist
Mar 24 07:29:03 mx python3[880411]: iredapd Starting SRS sender rewriting channel, listening on 127.0.0.1:7778
Mar 24 07:29:03 mx python3[880411]: iredapd Starting SRS recipient rewriting channel, listening on 127.0.0.1:7779

A little later:

Mar 24 08:00:10 mx python3[880415]: iredapd Unexpected error: AttributeError("'NoneType' object has no attribute 'connect'"). Fallback to default action: DUNNO
Mar 24 08:00:10 mx python3[880415]: iredapd Session ended.


from iredmail.

iredmail avatar iredmail commented on May 23, 2024

What's the output of command below?

python3 -c "import pymysql; print(pymysql.__version__)"

from iredmail.

kman261 avatar kman261 commented on May 23, 2024

[root@mx ~]# python3 -c "import pymysql; print(pymysql.version)"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pymysql'

[root@mx ~]#

from iredmail.

kman261 avatar kman261 commented on May 23, 2024

Ok, I ran
pip install pymysql

and now the command returns
1.4.6

I restarted iredapd and the error is gone.

from iredmail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.