Forum OpenACS Q&A: VMWare + W2K + ARGHHH!!
I am going mad! I haven't taken a break and maybe that's what's
causing this problem, but, well, hopefully somebody can help me.
I set up OpenACS in VMWare (NAT mode),
ran /sbin/dhcpcd,
updated /etc/hosts accordingly,
hardcoded the /etc/aolserver/nsd.tcl hostname and address values (set
to the IP I got from the VM's DHCP server),
ran /etc/rc.d/init.d/postgresql start,
and finally,
/sbin/service aolserver restart.
All of that worked! I could punch in the VM's IP and up would come
the "WELCOME, YOU BEAUTIFUL GENIUS!" page.
Then I tried to login. Nope. Request Error. Checked the server log
and saw something about 0or1row returning no results.
I've looked at the docs a few times. I'm sure I'm brushing right by
some very important fact but I am too frustrated to see it at the
moment.
Any ideas?
Thanks,
Denny
In particular: Did you start PostgreSQL in networked mode? By default, PostgreSQL only listens on Unix sockets. (This tends to surprise a lot of people.)
Check the postgresql.conf configuration file. There should be a line there marked "tcpip_socket". Uncomment the line and set it to "true", then restart PostgreSQL.
You'll probably need to modify pg_hba.conf as well. Once you've turned on the TCP/IP socket, pg_hba.conf indicates which IP addresses (or networks) may connect to your server, and which authentication method you'll use with each of them.
An easy way to test all of this is with the psql command-line tool. If you can say "psql mydb" to connect to your database, but "psql -h localhost mydb" results in a "connection refused" error, then you probably didn't turn on the networking.
And yes, this is annoying to new PostgreSQL users, but it's far safer and better than having the server start listening to the network without your explicit request.
This doesn't sound like the PostgreSQL not listening error to me. If that is what was happening, I think you would get the same symptoms as in this other VMWare post.
Denny, can you post the error-related section of your AOLserver startup log? Don't forget the <PRE> tags. By the way, I think the VMWare installation is an excellent thing and worth sticking with, but if you can't get it to work, I can point you to information on native Windows OpenACS installation.
I am still a newbie with VMWare (Linux, too) and I know copying/pasting is supposed to be easy but I can't get it to work. The VMWare OACS distribution doesn't have emacs so I'm using vi and well, eh, I basically don't know how to do this. I made an attempt to share /var/log/aolserver with samba but that had me looking at yet another error log. So, basically, I don't know how to show the error log to you! HA! Man, does that make me feel stupid.
I can give you what look like "highlights". Hopefully enough.
Warning: APM: NumberOfCachedSecretTokens does not exist
Warning: APM: FtsEngineDriver does not exist
Warning: APM: PersistentLoginDefaultP does not exist
See a root page request
Warning: APM: FtsEngineDriver does not exist a bunch of times in addition to something about workflow_case__sweep_hold_timeout being truncated.
See POST to /register/user-login followed by Error: Ns_PgExec: result status: 0 message: error in rp_handler "serving GET /register/user-new..." errmsg is Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows")
If I can't get this to work then I'll probably end up going with VMWare in bridged mode. I figure that'll be plug-n-play except for setting up the DHCP server on my network. May be easier that way, ya think?
Thanks a lot for the help. Much obliged.
Denny
[27/Jul/2002:19:30:04][1025.2051][-sched-] Notice: Running scheduled proc search_indexer... [27/Jul/2002:19:30:04][1025.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [27/Jul/2002:19:30:04][1025.2051][-sched-] Notice: Done running scheduled proc search_indexer. [27/Jul/2002:19:30:07][1025.8197][-conn2-] Notice: Security: 1027812607 sec_generate_session_id_cookie setting 20001, 0. [27/Jul/2002:19:30:08][1025.8197][-conn2-] Notice: ns_getform using encoding iso8859-1 for charset iso-8859-1 192.168.111.1 - - [27/Jul/2002:19:30:08 -0400] "POST /register/user-login HTTP/1.1" 302 391 "http://192.168.111.133:8000/register/?return_url=%2fadmin%2f" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530" [27/Jul/2002:19:30:08][1025.8197][-conn2-] Notice: ns_getform using encoding iso8859-1 for charset iso-8859-1 [27/Jul/2002:19:30:08][1025.8197][-conn2-] Error: Ns_PgExec: result status: 0 message: [27/Jul/2002:19:30:08][1025.8197][-conn2-] Notice: RP (214.681 ms): error in rp_handler: serving GET /register/user-new?email=kk%40hk%2ecom&persistent%5fcookie%5fp=1&return%5furl=%2fadmin%2f ad_url "/register/user-new" maps to file "/var/lib/aolserver/servers/openacs4/packages/acs-subsite/www/register/user-new.adp" errmsg is Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.") [27/Jul/2002:19:30:08][1025.8197][-conn2-] Error: GET /register/user-new email=kk%40hk%2ecom&persistent%5fcookie%5fp=1&return%5furl=%2fadmin%2f Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.") while executing "ns_pg_bind 0or1row nsdb0 {}" ("uplevel" body line 1) invoked from within "uplevel $ulevel [list ns_pg_bind $type $db $sql" invoked from within "db_exec 0or1row $db $full_statement_name $sql" invoked from within "set selection [db_exec 0or1row $db $full_statement_name $sql]" ("uplevel" body line 2) invoked from within "uplevel 1 $code_block " invoked from within "db_with_handle db { set selection [db_exec 0or1row $db $full_statement_name $sql] }" (procedure "db_0or1row" line 22) invoked from within "db_0or1row find_person "" " ("uplevel" body line 1) (procedure "code::tcl::/var/lib/aolserver/servers/openacs4/packages/acs-..." line 1) invoked from within "code::tcl::$__adp_stub" invoked from within "if { [file exists $__adp_stub.tcl] } { # ensure that data source preparation procedure exists and is up-to-date adp_init tcl $__adp_stub ..." ("uplevel" body line 3) invoked from within "uplevel { if { [file exists $__adp_stub.tcl] } { # ensure that data source preparation procedure exists and is up-to-date adp_init t..." (procedure "adp_prepare" line 3) invoked from within "adp_prepare " (procedure "template::adp_parse" line 30) invoked from within "template::adp_parse [file root [ad_conn file]] {}" (procedure "adp_parse_ad_conn_file" line 7) invoked from within "$handler" ("uplevel" body line 2) invoked from within "uplevel $code" invoked from within "ad_try { $handler } ad_script_abort val { # do nothing }" invoked from within "rp_serve_concrete_file [ad_conn file]" (procedure "rp_serve_abstract_file" line 60) invoked from within "rp_serve_abstract_file "$root/$path"" ("uplevel" body line 2) invoked from within "uplevel $code" invoked from within "ad_try { rp_serve_abstract_file "$root/$path" set tcl_url2file([ad_conn url]) [ad_conn file] set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..." 192.168.111.1 - - [27/Jul/2002:19:30:08 -0400] "GET /register/user-new?email=kk%40hk%2ecom&persistent%5fcookie%5fp=1&return%5furl=%2fadmin%2f HTTP/1.1" 200 387 "http://192.168.111.133:8000/register/?return_url=%2fadmin%2f" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530" [27/Jul/2002:19:30:34][1025.2051][-sched-] Notice: Running scheduled proc search_indexer... [27/Jul/2002:19:30:34][1025.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [27/Jul/2002:19:30:34][1025.2051][-sched-] Notice: Done running scheduled proc search_indexer. [27/Jul/2002:19:31:04][1025.2051][-sched-] Notice: Running scheduled proc search_indexer... [27/Jul/2002:19:31:04][1025.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [27/Jul/2002:19:31:04][1025.2051][-sched-] Notice: Done running scheduled proc search_indexer. [27/Jul/2002:19:31:34][1025.2051][-sched-] Notice: Running scheduled proc search_indexer... [27/Jul/2002:19:31:34][1025.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [27/Jul/2002:19:31:34][1025.2051][-sched-] Notice: Done running scheduled proc search_indexer.
Damon, did you activate full debugging of SQL queries in AOLServer? It eats up a lot of disk space, but it's invaluable when trying to figure out things like this. You want to turn on the "Verbose" and "LogSQLErrors" options, once for each of the three database pools, similar to how it's configured in my "main" pool here:
ns_section ns/db/pool/main ns_param MaxIdle 1000000000 ns_param MaxOpen 1000000000 ns_param Connections 5 ns_param Verbose On ns_param ExtendedTableInfo On ns_param LogSQLErrors On
(I'm not sure what ExtendedTableInfo is, but I'm a big fan of verbose error logs, so I keep it on as well.)
The "no rows returned" error probably means that there's something wrong with the SQL query, but it might also point to a problem with your database connection. Show that to us, and it'll be easier to figure out what the problem is.
Thank you
[28/Jul/2002:00:47:43][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:47:43][1084.2051][-sched-] Notice: Querying ' select package_id from apm_packages where package_key = 'search';' [28/Jul/2002:00:47:43][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select package_id from apm_packages where package_key = 'search' ' [28/Jul/2002:00:47:43][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:47:43][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:47:43][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:47:43][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer. [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: Querying ' select node_id from host_node_map where host = '192.168.111.134';' [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select node_id from host_node_map where host = '192.168.111.134' ' [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: Querying 'select sec_id_seq.nextval;' [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): 'select sec_id_seq.nextval' [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: Security: 1027831682 sec_generate_session_id_cookie setting 30001, 0. [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: random: generating 1 seeds [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: Querying ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'read');' [28/Jul/2002:00:48:02][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'read') ' [28/Jul/2002:00:48:03][1084.4101][-conn0-] Warning: APM: PersistentLoginDefaultP does not exist [28/Jul/2002:00:48:03][1084.4101][-conn0-] Notice: Querying ' select site_node__url(node_id) as url, acs_object__name(object_id) as name from site_nodes where parent_id = site_node__node_id('/',NULL) and object_id is not null and acs_permission__permission_p( object_id, coalesce(NULL, acs__magic_object_id('the_public')), 'read') = 't';' [28/Jul/2002:00:48:03][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select site_node__url(node_id) as url, acs_object__name(object_id) as name from site_nodes where parent_id = site_node__node_id('/',NULL) and object_id is not null and acs_permission__permission_p( object_id, coalesce(NULL, acs__magic_object_id('the_public')), 'read') = 't' ' [28/Jul/2002:00:48:03][1084.6150][-keepalive-] Notice: keepalive: keepalive thread starting 192.168.111.1 - - [28/Jul/2002:00:48:03 -0400] "GET / HTTP/1.1" 200 8568 "" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530" [28/Jul/2002:00:48:13][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:48:13][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:48:13][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:48:13][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:48:13][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer. [28/Jul/2002:00:48:43][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:48:43][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:48:43][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:48:43][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:48:43][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer. [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: Querying ' select node_id from host_node_map where host = '192.168.111.134';' [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select node_id from host_node_map where host = '192.168.111.134' ' [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: Querying ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'read');' [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'read') ' [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: ns_getform using encoding iso8859-1 for charset iso-8859-1 [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: Querying ' select user_id, member_state, email_verified_p from cc_users where email = lower('hh@hknet.com');' [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select user_id, member_state, email_verified_p from cc_users where email = lower('hh@hknet.com') ' 192.168.111.1 - - [28/Jul/2002:00:48:54 -0400] "POST /register/user-login HTTP/1.1" 302 386 "http://192.168.111.134:8000/" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530" [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: Querying ' select node_id from host_node_map where host = '192.168.111.134';' [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select node_id from host_node_map where host = '192.168.111.134' ' [28/Jul/2002:00:48:54][1084.4101][-conn0-] Notice: Querying ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'read');' [28/Jul/2002:00:48:55][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'read') ' [28/Jul/2002:00:48:55][1084.4101][-conn0-] Notice: ns_getform using encoding iso8859-1 for charset iso-8859-1 [28/Jul/2002:00:48:55][1084.4101][-conn0-] Notice: Querying '' [28/Jul/2002:00:48:55][1084.4101][-conn0-] Error: Ns_PgExec: result status: 0 message: [28/Jul/2002:00:48:55][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): '' [28/Jul/2002:00:48:55][1084.4101][-conn0-] Notice: RP (295.183 ms): error in rp_handler: serving GET /register/user-new?email=hh%40hknet%2ecom&persistent%5fcookie%5fp=1&return%5furl=%2f ad_url "/register/user-new" maps to file "/var/lib/aolserver/servers/openacs4/packages/acs-subsite/www/register/user-new.adp" errmsg is Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.") [28/Jul/2002:00:48:55][1084.4101][-conn0-] Notice: Querying ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'admin');' [28/Jul/2002:00:48:55][1084.4101][-conn0-] Notice: dbinit: sql(localhost::openacs4): ' select count(*) from dual where 't' = acs_permission__permission_p('2403', '0', 'admin') ' [28/Jul/2002:00:48:55][1084.4101][-conn0-] Error: GET /register/user-new email=hh%40hknet%2ecom&persistent%5fcookie%5fp=1&return%5furl=%2f Database operation "0or1row" failed (exception NSDB, "Query was not a statement returning rows.") while executing "ns_pg_bind 0or1row nsdb0 {}" ("uplevel" body line 1) invoked from within "uplevel $ulevel [list ns_pg_bind $type $db $sql" invoked from within "db_exec 0or1row $db $full_statement_name $sql" invoked from within "set selection [db_exec 0or1row $db $full_statement_name $sql]" ("uplevel" body line 2) invoked from within "uplevel 1 $code_block " invoked from within "db_with_handle db { set selection [db_exec 0or1row $db $full_statement_name $sql] }" (procedure "db_0or1row" line 22) invoked from within "db_0or1row find_person "" " ("uplevel" body line 1) (procedure "code::tcl::/var/lib/aolserver/servers/openacs4/packages/acs-..." line 1) invoked from within "code::tcl::$__adp_stub" invoked from within "if { [file exists $__adp_stub.tcl] } { # ensure that data source preparation procedure exists and is up-to-date adp_init tcl $__adp_stub ..." ("uplevel" body line 3) invoked from within "uplevel { if { [file exists $__adp_stub.tcl] } { # ensure that data source preparation procedure exists and is up-to-date adp_init t..." (procedure "adp_prepare" line 3) invoked from within "adp_prepare " (procedure "template::adp_parse" line 30) invoked from within "template::adp_parse [file root [ad_conn file]] {}" (procedure "adp_parse_ad_conn_file" line 7) invoked from within "$handler" ("uplevel" body line 2) invoked from within "uplevel $code" invoked from within "ad_try { $handler } ad_script_abort val { # do nothing }" invoked from within "rp_serve_concrete_file [ad_conn file]" (procedure "rp_serve_abstract_file" line 60) invoked from within "rp_serve_abstract_file "$root/$path"" ("uplevel" body line 2) invoked from within "uplevel $code" invoked from within "ad_try { rp_serve_abstract_file "$root/$path" set tcl_url2file([ad_conn url]) [ad_conn file] set tcl_url2path_info([ad_conn url]) [ad_conn path_inf..." 192.168.111.1 - - [28/Jul/2002:00:48:55 -0400] "GET /register/user-new?email=hh%40hknet%2ecom&persistent%5fcookie%5fp=1&return%5furl=%2f HTTP/1.1" 200 387 "http://192.168.111.134:8000/" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530" [28/Jul/2002:00:49:13][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:49:13][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:49:13][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:49:13][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:49:13][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer. [28/Jul/2002:00:49:43][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:49:43][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:49:43][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:49:43][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:49:43][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer. [28/Jul/2002:00:50:13][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:50:13][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:50:13][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:50:13][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:50:13][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer. [28/Jul/2002:00:50:43][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:50:43][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:50:43][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:50:43][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:50:43][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer. [28/Jul/2002:00:51:13][1084.2051][-sched-] Notice: Running scheduled proc search_indexer... [28/Jul/2002:00:51:13][1084.2051][-sched-] Warning: APM: FtsEngineDriver does not exist [28/Jul/2002:00:51:13][1084.2051][-sched-] Notice: Querying ' select object_id, date, event from search_observer_queue order by date asc;' [28/Jul/2002:00:51:13][1084.2051][-sched-] Notice: dbinit: sql(localhost::openacs4): ' select object_id, date, event from search_observer_queue order by date asc ' [28/Jul/2002:00:51:13][1084.2051][-sched-] Notice: Done running scheduled proc search_indexer.
Later all,
Denny
I am following the steps of Damon - I learned from his problems and passed the first barrier through the change in postgresql.conf - and I am now stuck with the 'Query was not a statement returning rows' error, as described by Damon.
Don't know if he solved it - but it would be very helpful if anyone has an idea about how to overcome this and get the OpenACS over VMware finally working...
Cheers
I'm new to the OpenACS world. To be honest with you, I have gone all the way, starting by downloading this near 200MB goodies of John's great idea (took me a rather long while & thru many failures from the other end of the world, Taiwan), followed by all the corrective actions mentioned in this thread.
I was wondering is there any follow-on solution to that "0or1row" issue mentioned in this thread? Can someone please shed the light for those who stuck here like I do. Thanks.