AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Using Postgres as File Server
 
 

Hi,

Going through the ‘esoteric’ docs for postgres, it says that to use the DB instead of the USERS local file system, you have to run this command:
pguser=“hostaddr = 129.22.22.24 port = 5432 user = postgres password = somepassword “

with your particular host credentials… sorry but I don’t understand where and when exactly do I need to run this command, is this sent as an argument to the ChatScriptpg?

Thanks

 

 
  [ # 1 ]

command line argument launching CS

 

 
  [ # 2 ]

OK, thanks Bruce, sorry for not seeing something that might be so obvious, this is what I’m doing over terminal:

./ChatScriptpg pguser=“hostaddr = 127.0.0.1 port = 5432 user = postgres password = xxxxxx“
evcalled pid: 5013
ChatScript EVSERVER Version 6.91 pid: 5013 64 bit LINUX compiled Dec 29 2016 16:54:54 host=local
WordNet: dict=201381 fact=85709 stext=12704348 Dec07’16-14:44:33
  Dictionary building disabled.

======== Began EV server pid 5013 6.91 compiled Dec 29 2016 16:54:54 on host local port 1024 at Fri Dec 30 15:21:58 2016 serverlog:1 userlog: 1

I can’t see any new db created so I assume I’m not providing the args right. Could you give me an example of how to do it?

 

 

 
  [ # 3 ]

Your parameters look fine. So how do you know you have a running server? Do you have tools you use to browse it?

 

 
  [ # 4 ]

Yeah, I’m using pgAdmin3.
I’m connected with the postgres user and have another test db created along with the postgres one.

 

 
  [ # 5 ]

Should I be able to see a log somewhere if connection falied?

 

 
  [ # 6 ]

When CS starts up, it issues messages about what it loads and what abilities it has. you should see messages in server log about this:
Either this:
Postgres enabled. FileSystem routed to %s\r\n”,postgresparams);
or this
Postgres enabled.\r\n”);

 

 
  [ # 7 ]

Hi,

This is the last output to the logs file:

—-
evserver child fork requests: 0
  evserver: running pid: 13955
Server ChatScript EVSERVER Version 6.91 pid: 13955 64 bit LINUX compiled Dec 29 2016 16:54:54 host=local
Params:  dict:720895 fact:800000 text:100000kb hash:50000
      buffer:30x80kb cache:1x5000kb userfacts:100
Build0:  dict=67753 fact=130446 stext=1146028 Compiled:Nov19’16-15:54:10 by version 6.9 “0”
Build1:  dict=167 fact=15 stext=211788 Compiled:Nov20’16-08:26:03 by version 6.9 “harry”
Used 55MB: dict 269,302 (23698kb) hashdepth 18/1 fact 216,170 (10376kb) text 14185kb
        buffer (2400kb) cache (5000kb) POS: 918 (29kb)
Free 113MB: dict 451,593 hash 922 fact 583,830 text 85,814KB

  *** Server WIDE OPEN to :command use.
  Postgres enabled. FileSystem routed to “hostaddr


======== Began EV server pid 13955 6.91 compiled Dec 29 2016 16:54:54 on host local port 1024 at Mon Jan 02 10:45:01 2017 serverlog:1 userlog: 1
evserver: parent ready (pid = 13955), fork=0
—-

Is the Postgres enabled. FileSystem routed to “hostaddr part correct?

I have Postgres listening on 127.0.0.1:5432, but still there’s no users database created

 

 
  [ # 8 ]

The server without pg is working, I tested the chat with the php script included in the project.
The pg version is broken for some reason, there’s a bug log with this:

BUG in topic_127_0_0_1_harry.txt at 1: ^harry
BUG: Tue Jan 03 11:17:10 2017: input:1 Error opening binary write file USERS/topic_127_0_0_1_harry.txt: No such file or directory
caller:127_0_0_1 callee:harry at in sentence: Hi
Error opening binary write file USERS/topic_127_0_0_1_harry.txt: No such file or directory
MinInverseStringGap 85MB MinStringAvailable 85MB
MaxBuffers used 5 of 30

FATAL: Failed to open postgres db “hostaddr and root db postgresMinInverseStringGap 4294MB MinStringAvailable 85MB
MaxBuffers used 4 of 30

I’m thinking that my connection string is fine and there’s a problem in the internal connect code.

 

 
  [ # 9 ]

Hello, Bruce.
Is it possible for you to check the ChatScriptpg version using the database as file server?
I’m not seeing any other places on my side to look for, also you can give me some hints on where in the CS source are the pg interactions, and I can try to debug myself.

Thanks.

 

 
  [ # 10 ]

It works for me, but MY initial startup message is good and yours is bad.
Mine says: Postgres enabled. Filesystem routed to hostaddr 127.0.0.1 port = 5432 user = postgres password = xxxxx
Yours doesnt say that, so something is wrong with your params.

Your commands are this: 
pguser=“hostaddr = 127.0.0.1 port = 5432 user = postgres password = xxx“

mine are:
pguser=“hostaddr = 127.0.0.1 port = 5432 user = postgres password = xxxx ”

Offhand, it looks like your quotes are no good, and should be simple quotes. Hard to prove, except your startup message is bad. it doesn’t echo what you said.  I’m using 7.01 for this.

 

 
  [ # 11 ]

bad quotes…
I think I got them like that from the pdf doc when copying the command string and never noticed they weren’t straight quotes,
the pg db is working OK.
Thanks.

 

 
  login or register to react