Raised This Month: $12 Target: $400
 3% 

PostgreSQL Database Interface


Post New Thread Reply   
 
Thread Tools Display Modes
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-13-2017 , 06:32   Re: PostgreSQL Database Interface
Reply With Quote #21

How did you fix the error on your command line client?
It sounds like you didn't set a "host" IP and it's falling back to the local socket.
You're using the build linked in post 11 right?
__________________
Peace-Maker is offline
SovRedBit
Member
Join Date: May 2017
Old 06-13-2017 , 13:27   Re: PostgreSQL Database Interface
Reply With Quote #22

I fixed it by making this:
1- I changed listen_addresses = 'localhost' in postgresql.conf to listen_addresses = '*'
2- In pg_hba.conf i have added a new line "host all all 178.170..../32 password"
Then service postgresql restart
And that fixed the problem on client side, but the extension won't work
SovRedBit is offline
SovRedBit
Member
Join Date: May 2017
Old 06-13-2017 , 13:29   Re: PostgreSQL Database Interface
Reply With Quote #23

I have pgsql server 9.4 version working on Debian 8, yes and i was using the extension in 11 post, but when i saw that it's not working i tried the first one, but still give me this error.
About host ip i set it to my webserver, but it's still work like localhost, don't know why
SovRedBit is offline
SovRedBit
Member
Join Date: May 2017
Old 06-13-2017 , 13:30   Re: PostgreSQL Database Interface
Reply With Quote #24

If you need any logs, please tell me i will give you
SovRedBit is offline
SovRedBit
Member
Join Date: May 2017
Old 06-16-2017 , 09:52   Re: PostgreSQL Database Interface
Reply With Quote #25

So no one knows how to fix this? Still the same error and i did not find any solution
SovRedBit is offline
SovRedBit
Member
Join Date: May 2017
Old 06-17-2017 , 14:14   Re: PostgreSQL Database Interface
Reply With Quote #26

Quote:
Originally Posted by Peace-Maker View Post
How did you fix the error on your command line client?
It sounds like you didn't set a "host" IP and it's falling back to the local socket.
You're using the build linked in post 11 right?
Ok i had some fun with C++ code, and here what i found, i display the options in the exeption, just take a look at this:
L 06/17/2017 - 21:04:48: [SM] Exception reported: OnDBConnect password='MyDatabasePassHere' could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Its a bug, the buffer is zero, and he added just the pass because he is at the end, so he goes to localhost, and thats not a normal bug , fix it please, and me will try to find something else to make it work.
SovRedBit is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-17-2017 , 22:06   Re: PostgreSQL Database Interface
Reply With Quote #27

Quote:
Originally Posted by SovRedBit View Post
Ok i had some fun with C++ code, and here what i found, i display the options in the exeption, just take a look at this:
L 06/17/2017 - 21:04:48: [SM] Exception reported: OnDBConnect password='MyDatabasePassHere' could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Its a bug, the buffer is zero, and he added just the pass because he is at the end, so he goes to localhost, and thats not a normal bug , fix it please, and me will try to find something else to make it work.
Could you PM me the literal databases.cfg section please? Does your password contain any special characters? There might be some escaping problem.
__________________
Peace-Maker is offline
SovRedBit
Member
Join Date: May 2017
Old 06-18-2017 , 07:00   Re: PostgreSQL Database Interface
Reply With Quote #28

Quote:
Originally Posted by Peace-Maker View Post
Could you PM me the literal databases.cfg section please? Does your password contain any special characters? There might be some escaping problem.
Sorry i can't give you my production database password but i can tell you that it contains abcdefghijklmnopqrstuvwxyz1234567890 and nothing else and 32 pass length so i changed the snprintf 1024 to just sprintf and it worked.
snprintf sets NULL at the end and i thing on copy the buffer sets it to zero data.
I am now working with sprintf(buffer,"%s",data)
SovRedBit is offline
SovRedBit
Member
Join Date: May 2017
Old 06-21-2017 , 17:04   Re: PostgreSQL Database Interface
Reply With Quote #29

Hello again, i have another error its go after i think create tables, the error is:

sourcemod/public/amtl/amtl/am-thread-
utils.h:140: void ke::Lockable::Lock(): Assertion `Owner() != GetCurrentThreadId
()' failed.

How i can fix it?
SovRedBit is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-22-2017 , 06:09   Re: PostgreSQL Database Interface
Reply With Quote #30

Quote:
Originally Posted by SovRedBit View Post
Hello again, i have another error its go after i think create tables, the error is:

sourcemod/public/amtl/amtl/am-thread-
utils.h:140: void ke::Lockable::Lock(): Assertion `Owner() != GetCurrentThreadId
()' failed.

How i can fix it?
I fixed some of these concurrency errors already. You're still using the build from post #11 now, right?
Thank you for narrowing it down to the option buffers! snprintf (obviously) behaves differently on windows and linux.
__________________
Peace-Maker is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode