Gramps Web Docker's First Run wizard

I am trying to stand up a gramps-web … system? It seems to have correctly installed via Docker on Ubuntu, but the First Run wizard [mentioned in step 3] (for whatever reason) has not seem to run. How to I manually do so? TIA

Hi, I don´t know. But did you read the Gramps Web section? Maybe there you can find an answer?

1 Like

Hi @dmgursky, did you use the docker-based setup in the documentation you linked? If so, you can use

docker-compose logs --tail 100 grampsweb

to check the logs.

What does the browser show?

root@ubuntu-s-1vcpu-1gb-intel-nyc3-01:~# docker-compose logs --tail 100 grampsweb
Attaching to root_grampsweb_1
grampsweb_1         | [2023-06-21 18:49:14 +0000] [12] [WARNING] Worker with pid 47 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:49:14 +0000] [64] [INFO] Booting worker with pid: 64
grampsweb_1         | [2023-06-21 18:49:14 +0000] [12] [WARNING] Worker with pid 48 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:49:14 +0000] [65] [INFO] Booting worker with pid: 65
grampsweb_1         | [2023-06-21 18:49:14 +0000] [12] [WARNING] Worker with pid 50 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:49:14 +0000] [12] [WARNING] Worker with pid 49 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:49:14 +0000] [67] [INFO] Booting worker with pid: 67
grampsweb_1         | [2023-06-21 18:49:14 +0000] [12] [WARNING] Worker with pid 52 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:49:14 +0000] [68] [INFO] Booting worker with pid: 68
grampsweb_1         | [2023-06-21 18:49:14 +0000] [69] [INFO] Booting worker with pid: 69
grampsweb_1         | [2023-06-21 18:50:39 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:61)
grampsweb_1         | [2023-06-21 18:50:54 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:62)
grampsweb_1         | [2023-06-21 18:50:54 +0000] [62] [INFO] Worker exiting (pid: 62)
grampsweb_1         | [2023-06-21 18:50:54 +0000] [61] [INFO] Worker exiting (pid: 61)
grampsweb_1         | [2023-06-21 18:50:55 +0000] [12] [WARNING] Worker with pid 61 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:50:55 +0000] [77] [INFO] Booting worker with pid: 77
grampsweb_1         | [2023-06-21 18:50:55 +0000] [12] [WARNING] Worker with pid 62 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:50:55 +0000] [78] [INFO] Booting worker with pid: 78
grampsweb_1         | [2023-06-21 18:51:13 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:63)
grampsweb_1         | [2023-06-21 18:51:25 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:64)
grampsweb_1         | [2023-06-21 18:52:02 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:65)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [64] [INFO] Worker exiting (pid: 64)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:67)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:68)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:69)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [68] [INFO] Worker exiting (pid: 68)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [65] [INFO] Worker exiting (pid: 65)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [67] [INFO] Worker exiting (pid: 67)
grampsweb_1         | [2023-06-21 18:52:03 +0000] [12] [WARNING] Worker with pid 63 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:52:03 +0000] [69] [INFO] Worker exiting (pid: 69)
grampsweb_1         | [2023-06-21 18:52:04 +0000] [81] [INFO] Booting worker with pid: 81
grampsweb_1         | [2023-06-21 18:52:04 +0000] [12] [WARNING] Worker with pid 68 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:52:04 +0000] [82] [INFO] Booting worker with pid: 82
grampsweb_1         | [2023-06-21 18:52:04 +0000] [12] [WARNING] Worker with pid 65 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:52:04 +0000] [12] [WARNING] Worker with pid 64 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:52:04 +0000] [83] [INFO] Booting worker with pid: 83
grampsweb_1         | --- Logging error ---
grampsweb_1         | [2023-06-21 18:52:04 +0000] [12] [WARNING] Worker with pid 69 was terminated due to signal 9
grampsweb_1         | Traceback (most recent call last):
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1082, in emit
grampsweb_1         |     stream.write(msg + self.terminator)
grampsweb_1         | RuntimeError: reentrant call inside <_io.BufferedWriter name='<stderr>'>
grampsweb_1         | 
grampsweb_1         | During handling of the above exception, another exception occurred:
grampsweb_1         | 
grampsweb_1         | Traceback (most recent call last):
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1082, in emit
grampsweb_1         |     stream.write(msg + self.terminator)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 242, in handle_chld
grampsweb_1         |     self.reap_workers()
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 530, in reap_workers
grampsweb_1         |     self.log.warning(
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/glogging.py", line 261, in warning
grampsweb_1         |     self.error_log.warning(msg, *args, **kwargs)
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1454, in warning
grampsweb_1         |     self._log(WARNING, msg, args, **kwargs)
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1585, in _log
grampsweb_1         |     self.handle(record)
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1595, in handle
grampsweb_1         |     self.callHandlers(record)
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1657, in callHandlers
grampsweb_1         |     hdlr.handle(record)
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 948, in handle
grampsweb_1         |     self.emit(record)
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1087, in emit
grampsweb_1         |     self.handleError(record)
grampsweb_1         |   File "/usr/lib/python3.9/logging/__init__.py", line 1000, in handleError
grampsweb_1         |     sys.stderr.write('--- Logging error ---\n')
grampsweb_1         | RuntimeError: reentrant call inside <_io.BufferedWriter name='<stderr>'>
grampsweb_1         | Call stack:
grampsweb_1         |   File "/usr/local/bin/gunicorn", line 8, in <module>
grampsweb_1         |     sys.exit(run())
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/app/wsgiapp.py", line 67, in run
grampsweb_1         |     WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/app/base.py", line 231, in run
grampsweb_1         |     super().run()
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/app/base.py", line 72, in run
grampsweb_1         |     Arbiter(self).run()
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 211, in run
grampsweb_1         |     self.manage_workers()
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 551, in manage_workers
grampsweb_1         |     self.spawn_workers()
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 623, in spawn_workers
grampsweb_1         |     time.sleep(0.1 * random.random())
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 242, in handle_chld
grampsweb_1         |     self.reap_workers()
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/arbiter.py", line 530, in reap_workers
grampsweb_1         |     self.log.warning(
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gunicorn/glogging.py", line 261, in warning
grampsweb_1         |     self.error_log.warning(msg, *args, **kwargs)
grampsweb_1         | Message: 'Worker with pid %s was terminated due to signal %s'
grampsweb_1         | Arguments: (64, 9)
grampsweb_1         | [2023-06-21 18:52:04 +0000] [84] [INFO] Booting worker with pid: 84
grampsweb_1         | [2023-06-21 18:52:04 +0000] [86] [INFO] Booting worker with pid: 86
grampsweb_1         | [2023-06-21 18:52:04 +0000] [85] [INFO] Booting worker with pid: 85
grampsweb_1         | [2023-06-21 18:52:40 +0000] [12] [WARNING] Worker with pid 77 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:52:40 +0000] [93] [INFO] Booting worker with pid: 93
grampsweb_1         | [2023-06-21 18:52:57 +0000] [12] [CRITICAL] WORKER TIMEOUT (pid:78)
grampsweb_1         | [2023-06-21 18:53:05 +0000] [12] [WARNING] Worker with pid 78 was terminated due to signal 9
grampsweb_1         | [2023-06-21 18:53:05 +0000] [94] [INFO] Booting worker with pid: 94
root@ubuntu-s-1vcpu-1gb-intel-nyc3-01:~# version: "3.7"

That’s weird, your workers are constantly crashing. Can you please try limiting the number of workers to 2 (or even 1) as described here?

I am still working on trying this, but some tangentially related information.

1 – I am using a “blank” Ubuntu 20.04 LTS image, not the preconfigured grampsweb image on digitalocean.

2 – There is a problem with that preconfigured image – firstlogin.sh wants to invoked docker-compose, but the image does not include docker-compose, so firstlogin fails…

It helps if I don’t try to start grampsweb over itself (which is say, starting it and starting it again). Still does not work though – here is the log:

rampsweb_1         | Unable to init server: Could not connect: Connection refused
grampsweb_1         | Unable to init server: Could not connect: Connection refused
grampsweb_1         | INFO:gramps_webapi:Rebuilding search index ...
grampsweb_1         | Traceback (most recent call last):
grampsweb_1         |   File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
grampsweb_1         |     return _run_code(code, main_globals, None,
grampsweb_1         |   File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
grampsweb_1         |     exec(code, run_globals)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gramps_webapi/__main__.py", line 199, in <module>
grampsweb_1         |     cli(
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1130, in __call__
grampsweb_1         |     return self.main(*args, **kwargs)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1055, in main
grampsweb_1         |     rv = self.invoke(ctx)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1657, in invoke
grampsweb_1         |     return _process_result(sub_ctx.command.invoke(sub_ctx))
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1657, in invoke
grampsweb_1         |     return _process_result(sub_ctx.command.invoke(sub_ctx))
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
grampsweb_1         |     return ctx.invoke(self.callback, **ctx.params)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
grampsweb_1         |     return __callback(*args, **kwargs)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 26, in new_func
grampsweb_1         |     return f(get_current_context(), *args, **kwargs)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gramps_webapi/__main__.py", line 146, in index_full
grampsweb_1         |     db = db_manager.get_db().db
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gramps_webapi/dbmanager.py", line 172, in get_db
grampsweb_1         |     smgr.open_activate(
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gramps_webapi/dbloader.py", line 112, in open_activate
grampsweb_1         |     self.read_file(filename, mode, username, password)
grampsweb_1         |   File "/usr/local/lib/python3.9/dist-packages/gramps_webapi/dbloader.py", line 99, in read_file
grampsweb_1         |     self.dbstate.db.load(
grampsweb_1         |   File "/usr/lib/python3/dist-packages/gramps/gen/db/generic.py", line 597, in load
grampsweb_1         |     self._create_schema()
grampsweb_1         |   File "/usr/lib/python3/dist-packages/gramps/plugins/db/dbapi/dbapi.py", line 75, in _create_schema
grampsweb_1         |     self.dbapi.execute('CREATE TABLE person '
grampsweb_1         |   File "/usr/lib/python3/dist-packages/gramps/plugins/db/dbapi/sqlite.py", line 133, in execute
grampsweb_1         |     self.__cursor.execute(*args, **kwargs)
grampsweb_1         | sqlite3.OperationalError: table person already exists
grampsweb_1         | INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
grampsweb_1         | INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
grampsweb_1         | [2023-06-21 21:22:58 +0000] [13] [INFO] Starting gunicorn 20.1.0
grampsweb_1         | [2023-06-21 21:22:58 +0000] [13] [INFO] Listening at: http://0.0.0.0:5000 (13)
grampsweb_1         | [2023-06-21 21:22:58 +0000] [13] [INFO] Using worker: sync
grampsweb_1         | [2023-06-21 21:22:58 +0000] [14] [INFO] Booting worker with pid: 14
grampsweb_1         | [2023-06-21 21:22:58 +0000] [15] [INFO] Booting worker with pid: 15
grampsweb_1         | [2023-06-21 21:22:58 +0000] [16] [INFO] Booting worker with pid: 16
grampsweb_1         | [2023-06-21 21:22:58 +0000] [17] [INFO] Booting worker with pid: 17
grampsweb_1         | [2023-06-21 21:22:58 +0000] [18] [INFO] Booting worker with pid: 18
grampsweb_1         | [2023-06-21 21:22:58 +0000] [19] [INFO] Booting worker with pid: 19
grampsweb_1         | [2023-06-21 21:22:58 +0000] [20] [INFO] Booting worker with pid: 20
grampsweb_1         | [2023-06-21 21:22:58 +0000] [21] [INFO] Booting worker with pid: 21
grampsweb_1         | [2023-06-21 21:24:50 +0000] [13] [WARNING] Worker with pid 16 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:24:50 +0000] [30] [INFO] Booting worker with pid: 30
grampsweb_1         | [2023-06-21 21:24:58 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:14)
grampsweb_1         | [2023-06-21 21:25:03 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:15)
grampsweb_1         | [2023-06-21 21:25:12 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:17)
grampsweb_1         | [2023-06-21 21:25:12 +0000] [15] [INFO] Worker exiting (pid: 15)
grampsweb_1         | [2023-06-21 21:25:12 +0000] [14] [INFO] Worker exiting (pid: 14)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:18)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:19)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:20)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [19] [INFO] Worker exiting (pid: 19)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [CRITICAL] WORKER TIMEOUT (pid:21)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [17] [INFO] Worker exiting (pid: 17)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [21] [INFO] Worker exiting (pid: 21)
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [WARNING] Worker with pid 18 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:25:13 +0000] [31] [INFO] Booting worker with pid: 31
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [WARNING] Worker with pid 20 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [WARNING] Worker with pid 15 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:25:13 +0000] [32] [INFO] Booting worker with pid: 32
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [WARNING] Worker with pid 17 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [WARNING] Worker with pid 19 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [WARNING] Worker with pid 21 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:25:13 +0000] [13] [WARNING] Worker with pid 14 was terminated due to signal 9
grampsweb_1         | [2023-06-21 21:25:13 +0000] [33] [INFO] Booting worker with pid: 33
grampsweb_1         | [2023-06-21 21:25:13 +0000] [34] [INFO] Booting worker with pid: 34
grampsweb_1         | [2023-06-21 21:25:13 +0000] [35] [INFO] Booting worker with pid: 35
grampsweb_1         | [2023-06-21 21:25:13 +0000] [36] [INFO] Booting worker with pid: 36

Solved.

As noted, I created this manually (i.e. created an Ubuntu instance, installed docker, then used docker to stand up grampsweb.

You cannot install it in /root, which is the directory you are placed into when you connect via a shell. Changing to /opt/grampsweb solved the issue.

Having just stood up a grampsweb site, I have some feedback on the 1-Click solution.

First and foremost, it did NOT include docker and docker-compose. After standing up the 1-Click, logging in, and having firstrun.sh fail, I then manually added them, as well as net-tools and apache2 (Ubuntu flavor)

apt install apache2 net-tools docker docker-compose
apt update
apt full-upgrade

Since grampsweb has its own HTTP stack, I changed /opt/grampsweb/docker-compose.yml to use port 8000 instead of 80. [You could just as well have used 8080, 8888, 613, etc… Do not use 443, apache will use 80 and 443.]

At this point firstrun.sh would now run, but there were still issues, so I simply built my server manually. [See next post.]

@dmgursky well, if you disable stuff and install things manually, that’s fine, but you can also just start with an empty droplet.

The point of the one-click app is to not have to do that, so that will be confusing to users.

I will try following the exact documentation steps on the Gramps Web doc site later today, and if there as an issue, update the docs. But please don’t confuse a manual installation with the 1-click app.

So any users finding this thread, please do not change any ports etc. manually when using the one-click app!