First Time Login Issue
Forum » Wikidot version 1 / Installation help » First Time Login Issue
started by: Ed JohnsonEd Johnson
on: 1202475330|%e %b %Y, %H:%M %Z|agohover
number of posts: 13
rss icon RSS: new posts
First Time Login Issue
Ed JohnsonEd Johnson 1202475330|%e %b %Y, %H:%M %Z|agohover

I'm not sure if this is a repeatable problem, but it's happened twice to me. I can't login to my wikidot site as any user (super-admin, admin, or "regular"). What broke things (I think) was that I renamed my server and updated all of my config files with the new server name. The site still loads fine, but everytime I try to log in, I get this message:

You have been inactive quite a long while trying to log in and your session data have expired.
Please try to click 'log in' once again.

I have tried clearing my browser's cache, stopping and starting apache and postgresql, and rebooting the server. Nothing seems to work.

The first time it happens was after I got my initial install working. Trying to log in as the super-admin was giving me the same issue. With all of the other problems I was having at that time trying to get the site working, I can't remember what I did that finally allowed me to log in.

Is there some table I can clear out in the postgresql database to jumpstart things?

I plan on doing a clean install from scratch again this weekend to see if I can document the complete process of getting a local, private wikidot server up and running. I'll know then if this login issue is repeatable.

Thanks to everyone for your help. In spite of some issues, this has been a great learning experience!

-Ed

unfold First Time Login Issue by Ed JohnsonEd Johnson, 1202475330|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Ed JohnsonEd Johnson 1202586758|%e %b %Y, %H:%M %Z|agohover

OK, this definitely appears to be some kind of bug.

To test a theory, I loaded up another fresh install on another PC (and it happened to be identical hardware) and reinstalled everything from scratch. This time, I named my server "wikidot", rather than a name of my own choosing. I edited the /etc/hosts file so www.wikidot.com would find my server first.

I was able to login as the admin super user with no problems.

Interestingly, this also solved the problem of the Captcha alpha-numerics not appearing on the Captcha background.

Given these findings:

  • It appears that the initial super-user and password are tied to the server name somehow. Is this true?
  • It also appears that the Captcha algorithm is similarly related to the server name. Is this true?

Can this be duplicated/verified by the development team or others? If so, can some additional instructions be added to the Debian guide to resolve these issues?

I probably have over 50 hours invested in the last 9 days since Wikidot Open Source was released in trying to get this working properly. If this bit of testing and fact-finding can lead to a solution so others can benefit from my time, it will be well worth it.

I said once before I was >this< close. This time I truly believe it!

Thanks,
Ed

last edited on 1202747298|%e %b %Y, %H:%M %Z|agohover by Ed Johnson + show more
unfold Re: First Time Login Issue by Ed JohnsonEd Johnson, 1202586758|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Ed JohnsonEd Johnson 1202790533|%e %b %Y, %H:%M %Z|agohover

While I (sort of) patiently await a response, I've been trying like crazy to make things work. Michal made a change to the Debian/Ubuntu install guide and I'm having a hard time figuring out how to use the syntax. I think I'm very close, but could use some help from someone who knows PostgreSQL syntax. The problem I have is that there is a permissions error accessing the PostgreSQL database when trying to verify a new user's account:
Account_Verification_Error.jpg

Here's Michal's documentation. It looks like he made some changes to improve the search function or added some steps missed in the original document. I tried multiple ways to use his syntax as written, but kept getting errors. I am a Linux noob, so please be nice if I'm missing something obvious. ;)

cd /var/www/wikidot
su postgres
createuser --password 'wdpass' wd
createdb --owner wd wd1
createlang plpgsql wd1
# initialize tsearch2 (search engine) in a separate schema
psql --command "CREATE SCHEMA ts2 AUTHORIZATION wd" wd1
cat /usr/share/postgresql/8.1/contrib/tsearch2.sql | sed '1,5s/SET search_path = public/SET search_path = ts2/' | psql wd1
psql wd1 < files/dump.sql
exit # exits su postgres

Here's what I did in an effort to make it work.

cd /var/www/wikidot
su postgres
psql
createuser —password 'wdpass' wd
CREATE USER wd WITH PASSWORD 'wdpass';
createdb —owner wd wd1
CREATE DATABASE wd1 OWNER wd;
createlang plpgsql wd1
CREATE LANGUAGE plpgsql;
(note: I tried CREATE LANGUAGE plpgsql wd1; but it gave me a syntax error)
# initialize tsearch2 (search engine) in a separate schema
psql --command "CREATE SCHEMA ts2 AUTHORIZATION wd" wd1
CREATE SCHEMA ts2 AUTHORIZATION wd;
\q (to exit to the psql environment)
cat /usr/share/postgresql/8.1/contrib/tsearch2.sql | sed '1,5s/SET search_path = public/SET search_path = ts2/' | psql wd1
psql wd1 < files/dump.sql
exit # (exits su postgres)

I'm also including the output from my terminal window to see if anyone can spot something obvious and provide a fix (it's in a collapsible container below - it's over 1000 lines). I highlighted lines that jumped out as errors or warnings in red text.

Thanks in advance to anyone who can shed some light…
-Ed

last edited on 1202832925|%e %b %Y, %H:%M %Z|agohover by Ed Johnson + show more
unfold Re: First Time Login Issue by Ed JohnsonEd Johnson, 1202790533|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Ed JohnsonEd Johnson 1202998316|%e %b %Y, %H:%M %Z|agohover

I'm really trying to be patient in hope of getting some help, but I'm started to get frustrated by the lack of activity in this forum.

With all of the anticipation prior to the public release, can I be the only one in the world trying to get a Wikidot system up and running? I think I'm 95% there, but am stuck on getting the permissions issues resolved when trying to validate a new user account. Once I can get past that, I can do more complete testing and document the process for others.

I realize the development team is probably working very hard on getting V.2 out the door, but wouldn't some successful V.1 installations be nice?

Has anyone successfully set up Wikidot on their own server? If so, please share!

Thanks,
Ed

unfold Re: First Time Login Issue by Ed JohnsonEd Johnson, 1202998316|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
michal frackowiakmichal frackowiak 1203574185|%e %b %Y, %H:%M %Z|agohover

Some of the psql commands need to be executed within the wd1 database, like creating ts2 schema and creating language. Perhaps this is the issue.

The reason we are putting tsearch2 into the separate schema is easier maintainability of the db and postgresql version independence.

Try pgadmin (http://www.pgadmin.org) and see if the owerships are set correctly. We had no problems with the new config.

Which PostgreSQL version are you using?


Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalfrackowiak.com

last edited on 1203582121|%e %b %Y, %H:%M %Z|agohover by michal frackowiak + show more
unfold Re: First Time Login Issue by michal frackowiakmichal frackowiak, 1203574185|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Ed JohnsonEd Johnson 1203614553|%e %b %Y, %H:%M %Z|agohover

Hi Michal,

I finally figured out that I wasn't connecting to the wd1 database (I had some trouble figuring out how to apply your changes after you edited the install guide). Once I did, and figured out how to change ownership of the pg_ts_* tables, everything started working.

I'm using PostgreSQL v8.2.

-Ed

unfold Re: First Time Login Issue by Ed JohnsonEd Johnson, 1203614553|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
GabrysGabrys 1203606069|%e %b %Y, %H:%M %Z|agohover

Ed, have you got it running now?

possibly something like this helps:

GRANT ALL on pg_ts_cfg to wd

Piotr Gabryjeluk
visit my Dev blog

last edited on 1203606173|%e %b %Y, %H:%M %Z|agohover by Gabrys + show more
unfold Re: First Time Login Issue by GabrysGabrys, 1203606069|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Ed JohnsonEd Johnson 1203614380|%e %b %Y, %H:%M %Z|agohover

I had a little trouble figuring out the exact syntax needed in the changes Michal made to the Debian/Ubuntu guide. The problem I had with TSearch was that all of the pg_ts_* tables were not properly assigned to the wd user. Once I figured out how to change ownership, everything started working properly.

If you look at the set of install scripts I uploaded, you'll see my solution was the "permissions.sql" file being loaded right after the Wikidot "dump.sql" file. That is where I change the owner of the pg_ts_* tables to the wd user. Your solution sounds simpler and more elegant! ;)

I'm still testing as I continue to port over some of my wikidot.com sites. So far everything is looking good after Michal fixed the problem with "button" and "collapsible" by putting Tidy back into service.

-Ed

unfold Re: First Time Login Issue by Ed JohnsonEd Johnson, 1203614380|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
michal frackowiakmichal frackowiak 1203673344|%e %b %Y, %H:%M %Z|agohover

The debian quickstart is updated now and it icludes:

GRANT ALL ON ts2.pg_ts_cfg, ts2.pg_ts_cfgmap, ts2.pg_ts_parser, ts2.pg_ts_dict TO wd;

Changing ownership will work too of course.

In PostgreSQL 8.3 this is not really required since those tables are already in pg_catalog schema and are accessible to every user. In 8.3 TSearch is an integral part of the engine but in prior versions it is a contributed package.

In the guide I have also replaced the createuser … shell command by psql —command "CREATE USER wd PASSWORD 'wdpass'". The createuser is an interactive command (asks questions) to that it does not really work with the copy&paste installation.

Good work everyone!


Michał Frąckowiak @ Wikidot Inc.
Visit my blog at michalfrackowiak.com

unfold Re: First Time Login Issue by michal frackowiakmichal frackowiak, 1203673344|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Ed JohnsonEd Johnson 1203686973|%e %b %Y, %H:%M %Z|agohover

Thanks for the explanation. That makes better sense now.

I am wondering if these 2 lines in your guide need to be changed to a "psql --command ..." format to be "copy/paste friendly" too:

createdb —owner wd wd1
createlang plpgsql wd1

I recall having problems trying to get those to work without errors the last time I tried also. I ended up entering the shell and using "CREATE DATABASE…" and "CREATE LANGUAGE…" to get my setup to work.

Thanks,
-Ed

unfold Re: First Time Login Issue by Ed JohnsonEd Johnson, 1203686973|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Gregory BuchenbergerGregory Buchenberger 1216066848|%e %b %Y, %H:%M %Z|agohover

I am having a similar issue with my first login. I get:

You have been inactive quite a long while trying to log in and your session data have expired.
Please try to click 'log in' once again.

I'm using Postgresql 8.3 and I've checked and all pg_ts_* tables are owned by wd. I'm still getting the error. Are there additional considerations with version 8.3? As Michal pointed out, the tables are now in the pg_catalog schema.

As I am, like Ed states, a bit of a noob to some of this, I'm following the Wiki quite literally (cut/paste) without fully understanding the underlying logic. Although, Ed, you've certainly proved to me that you have quite a bit of mastery. Or maybe you're a Google ninja like many of us. Anyways, I could not have gotten to login screen without your published research. Thanks.

The Ubuntu 8 system that I am using is not virtual (is nonvirtual a word? Oddly, it could be.) so it's a bit harder to roll back changes. I'll do the next install on a VM and take copious snapshots. But first, perhaps someone has a different set of psql commands for 8.3 that work?

unfold Re: First Time Login Issue by Gregory BuchenbergerGregory Buchenberger, 1216066848|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Ed JohnsonEd Johnson 1216072486|%e %b %Y, %H:%M %Z|agohover

Although, Ed, you've certainly proved to me that you have quite a bit of mastery. Or maybe you're a Google ninja like many of us. Anyways, I could not have gotten to login screen without your published research. Thanks.

You're welcome. I like the term Google ninja! I'm do rely heavily on Google to find answers when I'm stuck. I used your guide yesterday to try to set up a working system with Unbuntu 8.04 and was able to log in OK as admin, but when I created a new "sandbox" wiki it showed that I wasn't logged in and all attempts to login to that site failed. I did stay logged in to the "master" site, however. I didn't have time to dig, so I'm not sure what the deal is yet.

I think I'm going to wipe my test server and try again from scratch and do a better job of documenting my steps this time.

Stay tuned!
-Ed

unfold Re: First Time Login Issue by Ed JohnsonEd Johnson, 1216072486|%e %b %Y, %H:%M %Z|agohover
Re: First Time Login Issue
Gregory BuchenbergerGregory Buchenberger 1216172452|%e %b %Y, %H:%M %Z|agohover

Thanks Ed. I'll work in parallel as I am able.

unfold Re: First Time Login Issue by Gregory BuchenbergerGregory Buchenberger, 1216172452|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License