Git Product home page Git Product logo

Comments (8)

NathanVaughn avatar NathanVaughn commented on July 3, 2024

Thanks, downgrade to 2.1.4 for the time being, I will look into this

from webtrees-docker.

NathanVaughn avatar NathanVaughn commented on July 3, 2024

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.

from webtrees-docker.

NathanVaughn avatar NathanVaughn commented on July 3, 2024

This should be fixed now by e5bce82 and re-publishing 2.1.5 and 2.0.24

from webtrees-docker.

SvbZ3r0 avatar SvbZ3r0 commented on July 3, 2024

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.

from webtrees-docker.

NathanVaughn avatar NathanVaughn commented on July 3, 2024

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.

from webtrees-docker.

SvbZ3r0 avatar SvbZ3r0 commented on July 3, 2024

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.

else:
print2("Config file does NOT exist")
# make sure all the variables we need are not set to None
try:
assert lang is not None
assert table_prefix is not None
assert base_url is not None
assert wt_name is not None
assert wt_user is not None
assert wt_pass is not None
assert wt_email is not None
assert db_type is not None
assert db_name is not None
if db_type in ["mysql", "pgsql"]:
assert db_host is not None
assert db_port is not None
assert db_user is not None
assert db_pass is not None
elif db_type == "sqlite":
assert db_name is not None
db_host = ""
db_port = ""
db_user = ""
db_pass = ""
else:
raise ValueError(f"Unknown database type: {db_type}")
except AssertionError:
print2("WARNING: Not all required variables were found for setup wizard")
return
print2("Automating setup wizard")

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:

resp = request.urlopen(
"http://127.0.0.1:80/",
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"),
)

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.

from webtrees-docker.

NathanVaughn avatar NathanVaughn commented on July 3, 2024

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:
image
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.

from webtrees-docker.

SvbZ3r0 avatar SvbZ3r0 commented on July 3, 2024

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.

from webtrees-docker.

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.