On Thu, Sep 5, 2019, at 1:49 PM, Ugnius wrote:
Thank You. This is very valuable information. According documentation I understood that "runserver" should run on some internal port and uwsgi just works like proxy connects to the same as runserver port and serves content to apachi. Because when I was playing with the setup without "runserver" Web interface didn't work. Yes, I have stopped "runserver" and page still works fine. :) This didn't solve me database RO issue, but this information was important. Thank You. I am thinking what to do now... Maybe to recreate database (make initiation once again). It could take 2-3 hours. I did not noticed option to export/import lists setting. Or to try find solution how to make sqlite3 multiple writable.
I think your problem about locked database might be solved. Like I mentioned, it is possible that those two running server could be stepping over each other toes.
After removing the "runserver" process, I think you shouldn't fall into anymore of those locking issues.
FWIW, it is also highly recommended to not use sqlite for any production use cases. Either postgres or mysql is preferred.
SQLite version 3.16.2 2017-01-06 16:32:41 Enter ".help" for usage hints.
BR Ugnius
On 5 Sep 2019, at 23:31, Abhilash Raj <maxking@asynchronous.in> wrote:
On Thu, Sep 5, 2019, at 1:15 PM, Ugnius wrote:
I do not know... In the setup example settings was something like process number = 2. But I understand at least 1 uwsgi and 1 run server should run?
No, only uwsgi needs to run. It is fine if there are two of those, since it probably forks to have 2 worker process. There shouldn't be any "python manage.py runserver" processes running at all, it is meant only for testing purposes.
The doc mentions that it is "development" server[1][2].
[1]: # Run the Django's "development" server at localhost:8000 [2]: http://docs.mailman3.org/en/latest/prodsetup.html#setting-up-django-project
Perhaps it should be more descriptive about what does it mean.
On 5 Sep 2019, at 23:08, Abhilash Raj <maxking@asynchronous.in> wrote:
6644 ? S 0:12 /usr/bin/uwsgi --master --ini /opt/home/uwsgi.ini 6645 ? S 0:00 /usr/bin/python3 /opt/home/manage.py runserver 0:8015 6653 ? Sl 636:28 /usr/bin/python3 /opt/home/manage.py runserver 0:8015 6656 ? Sl 0:27 /usr/bin/uwsgi --master --ini /opt/home/uwsgi.ini
This fishy, why do you have both uwsgi and "python manage.py runserver" running?
You only need one of those, since they both do the exact same thing. Please remove whatever is running the "python manage.py runserver" part and only use uwsgi.
On Thu, Sep 5, 2019, at 1:02 PM, Ugnius S wrote:
Thank You, Abhilash, to helping. I have checked the processes, but also I have read, that sqlite3 can run in multi writing mode. May mailman processes are next:
6644 ? S 0:12 /usr/bin/uwsgi --master --ini /opt/home/uwsgi.ini 6645 ? S 0:00 /usr/bin/python3 /opt/home/manage.py runserver 0:8015 6653 ? Sl 636:28 /usr/bin/python3 /opt/home/manage.py runserver 0:8015 6656 ? Sl 0:27 /usr/bin/uwsgi --master --ini /opt/home/uwsgi.ini 6643 ? S 0:00 /usr/bin/python3 /usr/bin/master -C /opt/home/mailman.cfg 659 ? S 0:46 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=in:0:1 6660 ? S 0:42 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=nntp:0:1 6661 ? S 0:42 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=digest:0:1 6662 ? S 0:48 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=pipeline:0:1 6663 ? S 0:44 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=archive:0:1 6664 ? S 0:41 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=command:0:1 6665 ? S 0:01 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=retry:0:1 6666 ? S 0:45 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=virgin:0:1 6667 ? Sl 0:16 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=lmtp:0:1 6668 ? Sl 1:30 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=rest:0:1 6669 ? S 0:42 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=bounces:0:1 6670 ? S 0:49 /usr/bin/python3 /usr/bin/runner -C /opt/home/mailman.cfg --runner=out:0:1
Looks like there are no double. Nothing more is running.
2019-09-05, kt, 03:16 Abhilash Raj <maxking@asynchronous.in> rašė:
__ On Wed, Sep 4, 2019, at 2:05 PM, Ugnius S wrote: > > I have installed using documentation. My linux distribution version has no full package available. I have installed step by step: > $ sudo pip3 install mailman > $ sudo pip3 install postorius > $ sudo pip3 install hyperkitty > $ sudo pip3 install mailman-hyperkitty > And of course all mandatory components... Everything without errors, I can drop db files and I can download mailman-suite again and start from empty page again. But it will not guarantee that DB will not become READ ONLY again. Here should be logic. No developing support here?
Could you be running two separate processes such that the database is locked by one and so other finds it as READ Only? When you find a read only database, can you check if it is open in some other process?
> > > > 2019-09-03, an, 19:36 Abhilash Raj <maxking@asynchronous.in> rašė: >> >> >> On Sun, Sep 1, 2019, at 3:22 AM,ugniusviln@gmail.com wrote: >> > Hi. All the project installation is under the same user / path and >> > it works. Archiving working as well, (just one remark: no matter what >> > to set in postorius, hyperkitty shows list as public) >> > I have found work around - it is possible to change list as private in >> > "admin" page. >> > I started to get issues with runjobs after I have created couple of >> > new lists with "no archive" option. >> >> How did you install all these components. It seems there the installation is broken in weird ways. >> >> > >> > If as owner user from project home I run: >> > >> > django-admin mailman_sync >> > >> > Traceback (most recent call last): >> > File >> > "/home/user/.local/lib/python3.5/site-packages/django/db/backends/utils.py", >> > line 84, in _execute >> > return self.cursor.execute(sql, params) >> > File >> > "/home/user/.local/lib/python3.5/site-packages/django/db/backends/sqlite3/base.py", >> > line 383, in execute >> > return Database.Cursor.execute(self, query, params) >> > sqlite3.OperationalError: attempt to write a readonly database >> > >> > "django-admin runjob sync_mailman " - makes read only errors as well. >> > "django-admin runjob new_lists_from_mailman" >> > django.db.utils.OperationalError: attempt to write a readonly database >> > END TRACEBACK >> > >> > I did not find information how to fix this. It was worked without errors >> > before. >> > I noticed, that if I stop mailman, "django-admin mailman_sync" starts >> > to work. >> > If I start "mailman start", then "django-admin mailman_sync" failing >> > again. >> > I did not check other jobs, but I think what is related to database, >> > will get errors. >> > Seems mailman locking the database. It is not a file permissions issue. >> > Mailman db location is: /project_directory/var/data/mailman.db >> > >> > if to rename /project_directory/var/data/mailman.db to something, >> > mailman creates database file size 0, django-admin runjobs start >> > working, but of course postorius stops working. I did it for testing. >> > I have returned this database file back, postorius started to work >> > again, but django-admin runjobs does not work, error: "database read >> > only". >> > Please help me how to fix this issue. >> > _______________________________________________ >> > Mailman-users mailing list -- mailman-users@mailman3.org >> > To unsubscribe send an email to mailman-users-leave@mailman3.org >> > https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/ >> > >> >> -- >> thanks, >> Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)
-- thanks, Abhilash Raj (maxking)