Forum OpenACS Q&A: Re: New OpenACS Tutorial

Collapse
44: Re: New OpenACS Tutorial (response to 43)
Posted by César Clavería on
Hello Irma,

Could you check your error.log file? It is probably going to be located in /usr/share/aolserver4/dotlrn/log/error.log that may give us some insight into what is wrong.

Also, if you are putting the examples under the www directory of the dotlrn package I believe you should try something like:
http://localhost:8000/dotlrn/connection

And do not worry those initial examples are OK if you put them under the general www directory (actually it is ok to put them anywhere as long as you know the path to get to them.)

Collapse
45: Re: New OpenACS Tutorial (response to 44)
Posted by Irma Gamez on
Thank you, Cesar, for your fast reply :)

The error.log says "Error: return: failed to redirect 'GET /global/file-not-found.html': exceeded recursion limit of 3"

Have a good day.

Collapse
46: Re: New OpenACS Tutorial (response to 45)
Posted by Jim Lynch on
Hi Irma...

That just means there was an error rendering the error page, which invoked the error page, which invoked the error page, whi STOP!

Oh, sorry...

But that's how it happened, including the STOP.

Collapse
47: Re: New OpenACS Tutorial (response to 46)
Posted by Irma Gamez on
Hi Jim.
I already fix the problem: I delete everything and start a new installation. All is running! Thank God.
Have a good day.
Collapse
48: Re: New OpenACS Tutorial (response to 47)
Posted by christopher laurence on
I'm attempting to run through the tutorial and I'm stuck with the following command. What am I missing? I'm using the latest software of openacs, postgresql, and naviserver.

sudo psql -d openacs -U wwww-data
psql: FATAL: Peer authentication failed for user "wwww-data"

Collapse
49: Re: New OpenACS Tutorial (response to 48)
Posted by Gustaf Neumann on
Dear Christopher,

this error message comes from PostgreSQL and tells you that the database does not know about a user "wwww-data". When you installed OpenACS with the default values of the install-ns and install-oacs scripts, then the created postgres user is named "nsadmin", the database is "oacs-5-8".

In this setup, sudo psql -d oacs-5-8 -U nsadmin should work.

Collapse
50: Re: New OpenACS Tutorial (response to 49)
Posted by christopher laurence on
Hello Gustaf,

I was able to get the command to work if I used "psql -d oacs-5-8 -U postgres" When I use sudo is asks for a password and it isn't the root password. After using the command I tried using insert into but got an error message. I have created a file in my package/todo/sql/postgres/ based on the tutorial.

oacs-5-8=# insert into todo_item values(acs_object_id_seq.nextval, 'My first item', 'My first item description', 'p', 568);
ERROR: relation "todo_item" does not exist
LINE 1: insert into todo_item values(acs_object_id_seq.nextval, 'My ...
^

Collapse
51: Re: New OpenACS Tutorial (response to 50)
Posted by Benjamin Brink on
Christopher, see page 48 (and just prior) of the tutorial. The error translates to: table "todo_item" doesn't exist.
cheers
Collapse
52: Re: New OpenACS Tutorial (response to 50)
Posted by Gustaf Neumann on
Christopher,

when the install-oacs script runs successfully, it creates the user 'nsadmin'; otherwise, other things might be broken as well. To check, which users are defined in your postgres installations, use

   %psql -U postgres 
   psql (9.3.5)
   Type "help" for help.

   postgres=# \du
in order to see, what databases are defined, use
   postgres=# \l
Collapse
53: Re: New OpenACS Tutorial (response to 52)
Posted by christopher laurence on
Hello Gustaf,

This is what I got when I enter the commands:

postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
nsadmin | Superuser, Create role, Create DB | {}
postgres | Superuser, Create role, Create DB, Replication | {}

postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
oacs-5-8 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres + postgres=CTc/postgres
(4 rows)

Collapse
54: Re: New OpenACS Tutorial (response to 53)
Posted by Gustaf Neumann on
Christopher,

This looks correct. Therefore, the cmd as i wrote will work. maybe you were struggling with sudo. For setup of sudo, see e.g. [1]. One can setup sudo such it asks you once in a session for your password, or to ask for certain users never for a password, etc.

[1] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch02s03.html

Collapse
55: Re: New OpenACS Tutorial (response to 54)
Posted by christopher laurence on
Hello Gustaf,

I'm using ubuntu 14.04 LT now. Is there any location where I can find the final version of the tutorial code? I have copied all the code but continue to get error messages.

Collapse
56: Re: New OpenACS Tutorial (response to 55)
Posted by Gustaf Neumann on
Dear Christopher,

i've never read the tutorial, this was contributed from the people in Guatemala. What kind of errors do you get?

-g

Collapse
57: Re: New OpenACS Tutorial (response to 56)
Posted by christopher laurence on
Hello Gustaf,

I'm getting errors that the database item doesn't exist. I'm trying to run through the tutorial to see how everything works before giving the system to a developer. I can at least complete the hello World! example.

Database operation "select" failed (exception ERROR, "ERROR: relation "todo_item" does not exist
LINE 8: from todo_item
^
")

ERROR: relation "todo_item" does not exist