Closed SvbZ3r0 closed 1 week ago
Thanks, downgrade to 2.1.4 for the time being, I will look into this
It looks like the named tags of 2.1.4
and 2.1.5
are fine, but for some reason the latest
tag got broken, and is still pointing to 2.0.24
. And the 2.0.x
versions of webtrees don't like php 8, hence it doesn't work.
This should be fixed now by https://github.com/NathanVaughn/webtrees-docker/commit/e5bce827775889bcbdfb236608a33c6da346cd76 and re-publishing 2.1.5 and 2.0.24
Thanks for the quick update! I think the latest
tag is still broken because it still shows the same error but the 2.1.5
tag doesn't. But that might be a caching issue.
I still can't get it to work however. I'll be the first to admit I don't know a peep about getting docker to work well. I'm on unRaid, and all the popular containers come with templates, so I haven't had a problem before. Would you mind taking a look at my configuration and telling me what I'm doing that is wrong.
I am currently getting a HTTP 500 or a HTTP 408 instead of the Fatal Error that I got before.
Edit: I switched to MariaDB and was able to get all the way up to the login page. However, the username and password provided using WT_USER and WT_PASS do not work. I checked the wt_user table and it was empty. Is there a default admin user I'm supposed to use?
Edit: So I guess that's the wrong table to be looking at. I manually inserted a user into the table, but the credentials still don't work.
Edit: It's been a couple hours but I've managed to get in by setting canadmin
, verified
, and verified_by_admin
to 1 in wt_user_setting
. I got to the home page but there's just a huge error message that begins with Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails ("webtrees"."wt_block", CONSTRAINT "wt_block_user_id_foreign" FOREIGN KEY ("user_id") REFERENCES "wt_user" ("user_id")) (SQL: insert into wt_block (user_id, location, block_order, module_name) values (-1, main, 1, todays_events)) …/vendor/illuminate/database/Connection.php:712
. I checked wt_block
and it is empty. I think there is a problem with the database initiation, since every table in the database is empty. I will continue to investigate.
Edit: Got it working finally. Made dummy entries in wt_user
and wt_gedcom
with -1 as user_id
and gedcom_id
. Everything works perfectly now. Although I still think this entire process should either be documented or automated.
I think you just need to repull the latest
tag, I pulled ghcr.io/nathanvaughn/webtrees:latest
and it works fine.
As for the other issues, my best guess is that because the application was erroring out, while in the middle of the setup, it ended up in a corrupted state. I ran the example docker-compose.yml
file and had no problems. If you haven't loaded much real data in, you may want to try clearing everything and starting fresh.
I ended up taking a backup of all the data I entered and tried to start from scratch. What I noticed is that the Setup wizard only runs automatically if a config file doesn't already exist. https://github.com/NathanVaughn/webtrees-docker/blob/e5bce827775889bcbdfb236608a33c6da346cd76/docker-entrypoint.py#L200-L235 I do not know if this is intended behaviour, but since a config file was present for me from previous installs, the setup wizard didn't trigger.
So I went ahead, deleted the config file and tried again. This time (and every consecutive time that I tried), it failed here:
https://github.com/NathanVaughn/webtrees-docker/blob/e5bce827775889bcbdfb236608a33c6da346cd76/docker-entrypoint.py#L262-L282
with a ConnectionRefusedError: [Errno 111] Connection refused
.
Any idea why this might be happening?
Edit: I created an empty config file, and ran it again. Waited a minute or two to let the tables be created in the database, and then sent this request:
resp = request.urlopen(
"http://webtreesurl:port/",
urlencode(
{
"lang": lang,
"tblpfx": table_prefix,
"baseurl": base_url,
"dbtype": db_type,
"dbhost": db_host,
"dbport": db_port,
"dbuser": db_user,
"dbpass": db_pass,
"dbname": db_name,
"wtname": wt_name,
"wtuser": wt_user,
"wtpass": wt_pass,
"wtemail": wt_email,
"step": "6",
}
).encode("ascii"),
)
from an external machine. I got a HTTP 200, but nothing really happened server side. wt_user
remained empty. So, I'm back to square one.
I can wait a bit and test further if you want. If not, I'll restore my old data and close this issue.
Edit: I tried dtjs48jkt/webtrees and faced no issues. So I don't think this problem is unique to me.
Sorry I haven't gotten a chance to look at this until now.
Only running the setup wizard if a config file doesn't exist is deliberate, yes. The webtrees setup wizard is what creates that config file, and does some database initialization, and once that's done, there's no way to get back to it.
I don't know why the connection would be refused. The Apache server will have already started on a generic HTTP-only config such that the Python script can send that request to trigger the first-time setup. I've had 0 issues with it when running from a blank slate.
Running the docker-compose
file in the repo:
You can see at the bottom the request gets sent and accepted.
I also tried a different database type
DB_TYPE: "sqlite"
DB_NAME: "webtrees"
and no issues again.
This is extremely weird. My logs are, word for word, same as yours. But the issue is 100% reproduceable on my end. Pretty ironic considering Docker is supposed to fix exactly this issue XD Anyway.. I'm using a different container now since that one doesn't cause me any issues. However, if there's any way I can assist in testing and debugging this, let me know and I'll be happy to help.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I'm unsure if the issue is with Webtrees or with the container or with me.
https://github.com/fisharebest/webtrees/issues/4473