GemTalk / GemConnect-for-Postgres

A rudimentary GemConnect for Postgres written entirely in Smalltalk
MIT License
1 stars 2 forks source link

No suitable SSL library found. #19

Closed feldti closed 2 years ago

feldti commented 2 years ago

I made a small test and tried to do some tests against PostgreSQL 14. The library can not connected against the database ... here is the error I got:

a ArgumentError occurred (error 2718), cLibrary could not be loaded, dlopen error: /home/mf/GsDevKit_home/server/stones/wctest_101/product/lib/libssl-3.6.2-64.so: version `OPENSSL_1_1_0' not found (required by /usr/lib/x86_64-linux-gnu/libpq.so.5.14)

And now ?

I've a Linux Mint system 19.1 (based on Ubuntu 18.04)

nrgiii commented 2 years ago

It looks like you may be logging in using SSL. This has not yet been tested but is expected to work. What login parameters are you using to connect to Postgres ?

feldti commented 2 years ago

^(GsPostgresConnectionParameters new) host: 'localhost'; port: 5432; dbname: 'test'; connect_timeout: 10; yourself

feldti commented 2 years ago

or a statement, which fails:

(GsPostgresConnection
                newWithParameters: 
                    ((GsPostgresConnectionParameters new)
                        host: 'localhost';
                        port: 5432;
                        dbname: 'test';
                        connect_timeout: 10;
                        yourself)) connected
nrgiii commented 2 years ago

Did you build postgres from source? The latest postgres availabe on my 18.04 is v10...

Please post the output from the following:

1) pg_config

2) ldd /usr/lib/x86_64-linux-gnu/libpq.so.5.14

3) Set this option in your gem config file: GEM_HALT_ON_ERROR = 2718; Then reproduce the problem. This will cause the gem process to halt at the point of error, Then post the resulting gem log (as a attachment is best).

Norm

feldti commented 2 years ago

No, I used the prebuild binaries from postgresql for Ubuntu 18.04 (not the official ones from Ubuntu).

1)

BINDIR = /usr/lib/postgresql/14/bin
DOCDIR = /usr/share/doc/postgresql-doc-14
HTMLDIR = /usr/share/doc/postgresql-doc-14
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/14/server
LIBDIR = /usr/lib/x86_64-linux-gnu
PKGLIBDIR = /usr/lib/postgresql/14/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/14/man
SHAREDIR = /usr/share/postgresql/14
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/14/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE =  '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' '--with-icu' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' 'PYTHON=/usr/bin/python3' '--mandir=/usr/share/postgresql/14/man' '--docdir=/usr/share/doc/postgresql-doc-14' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/14' '--bindir=/usr/lib/postgresql/14/bin' '--libdir=/usr/lib/x86_64-linux-gnu/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--with-extra-version= (Ubuntu 14.1-1.pgdg18.04+1)' '--enable-nls' '--enable-thread-safety' '--enable-tap-tests' '--enable-debug' '--enable-dtrace' '--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-lz4' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' '--with-llvm' 'LLVM_CONFIG=/usr/bin/llvm-config-6.0' 'CLANG=/usr/bin/clang-6.0' '--with-systemd' '--with-selinux' 'AWK=mawk' 'MKDIR_P=/bin/mkdir -p' 'PROVE=/usr/bin/prove' 'TAR=/bin/tar' 'XSLTPROC=xsltproc --nonet' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' '--with-gssapi' '--with-ldap' 'build_alias=x86_64-linux-gnu' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security'
CC = gcc
CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer
CFLAGS_SL = -fPIC
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/llvm-6.0/lib -Wl,--as-needed
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgcommon -lpgport -lselinux -llz4 -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lpthread -lrt -ldl -lm 
VERSION = PostgreSQL 14.1 (Ubuntu 14.1-1.pgdg18.04+1)

2)

ldd /usr/lib/x86_64-linux-gnu/libpq.so.5.14
    linux-vdso.so.1 (0x00007ffdef780000)
    libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f1c39dcc000)
    libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f1c39901000)
    libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f1c396b6000)
    libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f1c39464000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f1c39245000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f1c38e54000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f1c38c50000)
    libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f1c3897a000)
    libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f1c38748000)
    libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f1c38544000)
    libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f1c38339000)
    liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f1c3812b000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f1c37f11000)
    libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f1c37cf6000)
    libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007f1c37ab5000)
    libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f1c3774f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f1c3a2aa000)
    libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f1c3754b000)
    libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007f1c37342000)
    libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007f1c370b5000)
    libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007f1c36e13000)
    libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007f1c36bdd000)
    libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007f1c369c7000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f1c367aa000)
    libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f1c3647b000)
    libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f1c3625e000)
    libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f1c35ee0000)
    libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f1c35ccd000)
    libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f1c35a97000)
    libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f1c35861000)
    libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f1c355e0000)
    libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007f1c353b7000)
    libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007f1c351a8000)
    libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007f1c34f5e000)
    libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007f1c34c55000)
    libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f1c34a1d000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f1c34815000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f1c34477000)
nrgiii commented 2 years ago

So far I cannot reproduce your problem. I built Postgres 14 from source with SSL enabled (--with-openssl) and the connection works fine.

jgfoster commented 2 years ago

Tracked internally as 49755 and fixed in 3.6.3 and 3.7.

feldti commented 2 years ago

And ? What is it ? So, not real worth playing with 3.6.2 ? That would be a pitty, because we thought about adding PostgreSQL to our Gemstone/S stack to export data ... for Dashboard services ... etc ?

By the way - this was the website describing how to install a different PostgreSQL database on Ubuntu: https://techviewleo.com/how-to-install-postgresql-database-on-ubuntu/

feldti commented 2 years ago

I tried to add a API function call to the PostgreSQL library to initialize the OpenSLL stuff, but that also did not work

feldti commented 2 years ago

or more concrete: it did not show different results

nrgiii commented 2 years ago

Who knows? It works for me. I'll investigate more as I have time. Also you did not send me all the requested info (specifically item 3): https://github.com/GemTalk/GemConnect-for-Postgres/issues/19#issuecomment-971901440

dbtech4 commented 2 years ago

I have been fighting with the same openssl version case in Debian Linux 10 and 11 on accessing PostgreSQL by GCfP. Today I upgraded GemStone/S 3.6.2 to 3.6.3 and the problem was solved.

However, now I'm stuck with mystic ERROR 2753 on exec PostgresTestCase debugEx % 09:12:04.255 PostgresTestCase debug: #test_DateTime - start... 09:12:04.267 FAILURE: 11/12/2021 09:12:04 is not equal to 11/12/2021 17:12:04 ERROR 2753 , a ResumableTestFailure occurred (error 2753), 11/12/2021 09:12:04 is not equal to 11/12/2021 17:12:04

jgfoster commented 2 years ago

I'm glad that the upgrade fixed the OpenSSL problem.

As to the test failure, it looks like things are off by 8 hours so I wonder if there is a TimeZone problem. According to page 22 of the Install Guide:

Install the default TimeZone GemStone/S 64 Bit is shipped with a default time zone of US Pacific. If you are in another Time Zone, edit the file installtimezone.txt in the GemStone upgrade directory, then file it in as SystemUser.

dbtech4 commented 2 years ago

There is no $GEMSTONE/pub/timezone/etc/tzselect file in 3.6.3 shipment. I managed to set Linux TimeZone using /usr/bin/tzselect to GST-2, and after running the script from installtimezone.txt in SystemUser session the "exec PostgresTestCase debugEx %" proceeded over the timezone error, but failed on ERROR 2010 "a MessageNotUnderstood occurred (error 2010), a OrderedCollection class does not understand #'rdbColumnMapping' "

Br Martti alias "dbtech4"

On Sun, 12 Dec 2021 at 05:41, James Foster @.***> wrote:

I'm glad that the upgrade fixed the OpenSSL problem.

As to the test failure, it looks like things are off by 8 hours so I wonder if there is a TimeZone problem. According to page 22 of the Install Guide https://downloads.gemtalksystems.com/docs/GemStone64/3.6.x/GS64-InstallGuide-Linux-3.6.2.pdf :

Install the default TimeZone GemStone/S 64 Bit is shipped with a default time zone of US Pacific. If you are in another Time Zone, edit the file installtimezone.txt in the GemStone upgrade directory, then file it in as SystemUser.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/GemTalk/GemConnect-for-Postgres/issues/19#issuecomment-991829503, or unsubscribe https://github.com/notifications/unsubscribe-auth/APAHAGIWPYKWHZVC46QSG5TUQQKXNANCNFSM5IG4A5AQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

jgfoster commented 2 years ago

The file installtimezone.txt is in the upgrade directory.

I suggest that you open a new issue on the test failure with #'rdbColumnMapping' and include a description of how to reproduce the problem and a copy of the stack.

dbtech4 commented 2 years ago

Please find attached full report on installing GemStone/S 64bit 3.6.3 and GCfP on Debian 11 Linux platform and error report on PostgresTestCase failing on ERROR 2010 "a OrderedCollection class does not understand #'rdbColumnMapping' "

Best regards DBTechNet / Martti Laiho

DBTechNet / Martti Laiho 2021-12-13

Report on installing GemStone/S 64bit 3.6.3 and GCfP on Debian 11 Linux

including error report on GCfP

Preparing works:

as dbtech user:

mkdir GemStone unzip GemStone64Bit3.6.3-x86_64.Linux.zip into $HOME/GemStone/GemStone64Bit3.6.3-x86_64.Linux unzip GemConnect-for-Postgres-main.zip into $HOME/GemStone/GCfP

add following environment variables into /etc/bash.bashr

export GEMSTONE=/home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux export PATH=$GEMSTONE/bin:$PATH export MANPATH=$MANPATH:$GEMSTONE/doc export POSTGRES_LIB=/usr/lib/x86_64-linux-gnu/libpq.so.5

append following lines into /etc/services

Local services

GemStone LDI

gs64ldi 50377/tcp #GemStone/S 64 Bit 3.6.3

create database demo for PostgreSQL 13

/usr/lib/postgresql/13/bin/createdb demo

select the local Linux timezone by

/usr/bin/tzselect

Installing:

@.*:~$ su Password: ** *@.:/home/dbtech# cd $GEMSTONE/install @.***:/home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/install# ./installgs GemStone/S 64 Bit Installation Please stand by.... This installation script will run only in English. installgs -- Install GemStone/S 64 Bit

This script will walk you through the process of installing on your host. We will analyze your system configuration and make suggestions or modifications as appropriate.

At certain points in this script, we may attempt to modify your system configuration. At no time will we do this without warning you and (more importantly) giving you a chance to abort the script.

Except for certain small windows of time, it is always safe to abort this script (by pressing control-C or whatever your interrupt character is.) Whenever it is not safe to do so, messages will be printed before and after the unsafe period of time.

Whenever you are asked to answer yes or no, answer with a y or an n.

Now we begin the installation process.... This is a x86_64 machine, running the Linux operating system. If this is correct, press return. Otherwise, interrupt this script now and contact GemStone Customer Support .

[press return to continue]


Gathering information about this system configuration...

Good, your hostname is debian11 Good, found /bin/ping Good, no problem pinging debian11 Good, you already have gs64ldi in your services database; entry is: s_name=gs64ldi s_port = 50377 s_proto = tcp

[press return to continue]


Now seeing if shared memory and semaphores are installed... Good, no problems with shmget() or semget().

GemStone needs a directory for recording global information about GemStone. The name of this directory is: /opt/gemstone If the directory does not exist, this script will attempt to create it. Otherwise, the existing directory will be used. The permissions on this directory ought to give read, write, and execute permission to all users. The script will also check these permissions. A symbolic link can be used to another directory although the space requirements for this directory are not great. The creation of such a symbolic link must be done by the user outside of this script. Good, /opt/gemstone exists Good; the protection of /opt/gemstone seems OK. Good, /opt/gemstone/locks exists Good; the protection of /opt/gemstone/locks seems OK. Good, /opt/gemstone/log exists Good; the protection of /opt/gemstone/log seems OK.

[press return to continue]


File protection/permissions will be altered at this step. It is possible that, when GemStone was extracted from the distribution media, the file permissions changed from what is recommended for GemStone. The GemStone source tree will be analyzed and incorrect file permissions will be repaired. As the effective user id is currently root, you may change the owning user name and group name of the GemStone directory from those of the user that extracted GemStone from the distribution media.

WARNING: To change any ownerships, you should rerun this installation.

We can now change the user id and group id (to the desired "owning" user account) for all the files under the directories: /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux /opt/gemstone /opt/gemstone/locks /opt/gemstone/log
Do you wish to set file ownership now [y]?

What is the Unix login name to which the files should belong? dbtech What is the Unix group name to which the files should belong? dbtech

machine_grp[Info]: debian11 - Sun 12 Dec 2021 10:26:19 PM EET machine_grp[Info]: setting file characteristics...

In a simple installation, a single extent (repository file) in the GemStone 'data' directory is usually all that is needed. The installer can create a default extent by copying extent0.dbf from the 'bin' directory to the 'data' directory under /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux . This requires approximately 50MB of disk space. If it is not done then the user will need to set up and configure extents after the installation is complete. Would you like the install program to set up an extent for you now? [y]

In a simple installation, several GemStone programs can have their setuid/setgid protection bits set. In this configuration, only the user dbtech of group dbtech
can directly access the repository. However, should any user execute one of the GemStone programs in the directory, /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux it will appear to be executed as (have effective uid/gid of) dbtech (of group dbtech ), thereby allowing them access to the repository. This provides a certain level of protection to the repository file. Moreover, simple GemStone configurations will never run into file protection failures. The disadvantage is that users will not be able to run applications linked with gcilnkobj.o unless the owner, group, and protections on the resulting executables are set correctly. If you would rather not deal with setuid/setgid, you can choose to clear the setuid/setgid bit on GemStone programs, but the repository file will be readable and writable by all users.

WARNING: To change any permissions, you should rerun this installation.

Would you like to keep the repository protected? [y] n Clearing setuid/setgid bits...

Some sites find it convenient to set the owner and protection of the netldi executable so that any user may start a netldi. This executable invokes the setregid() and setreuid() system calls, so it needs to run as 'root'.

Enabling root setuid permission on GemStone executables will not compromise system security. Note that it is possible to run the netldi without being root by using guest mode and captive account mode. See the GemStone System Administrator's Guide for details. Since you are root, you may now do this, if you wish. Do you wish non-root users to be able to start a netldi? [y]


WARNING: You may need to contact GemStone Customer Support and request a key file. This is not necessary if this host will not be running a stone process.

If you call us, you will need to tell us the following:

Host type: x86_64.Linux

Do you have a key file you wish to install now [n]?

Every host that will be running a GemStone session process (gem process) must run a netldi process.

[Note that NFS makes an assumption that makes it unsuitable for files that have more than one writer; hence a host that NFS mounts a file cannot be substituted for the host on which the file actually resides.]

Do you wish to start a netldi (network server) now? [n]


Since you do not have a valid key file, you can not start a Stone repository monitor process on this host Congratulations:

GemStone installation has completed. You may still need to change various configuration options and start a stone server and one or more netldi processes. @.***:/home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/install# exit exit

@.:~$ cd $GEMSTONE/bin @.:~$ /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/bin/startnetldi startnetldi[Info]: GemStone version '3.6.3' startnetldi[Info]: Starting GemStone network server 'gs64ldi'. startnetldi[Info]: GEMSTONE is: '/home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux'. startnetldi[Info]: Log file is '/opt/gemstone/log/gs64ldi.log'. startnetldi[Info]: GemStone server 'gs64ldi' has been started, process 1847 @.***:~$ /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/bin/startstone startstone[Info]: GemStone version '3.6.3' startstone[Info]: Starting Stone repository monitor gs64stone. startstone[Info]: GEMSTONE is: '/home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux'. startstone[Info]: GEMSTONE_SYS_CONF=/home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/data/system.conf GEMSTONE_EXE_CONF=/home/dbtech/gs64stone.conf stoned[Info]: Log file is '/home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/data/gs64stone.log'. startstone[Info]: GemStone server gs64stone has been started, process 1849

@.:~$ cd GemStone/GCfP/src @.:~/GemStone/GCfP/src$ topaz -l [Info]: Loaded /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/lib/libgcilnk-3.6.3-64.so


Configuration Files
System File: /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/data/system.conf
Executable File: /home/dbtech/GemStone/GCfP/src/gem.conf
Warning: File not found (errno=2,ENOENT, The file or directory specified cannot
be found)
____

Reading config file /home/dbtech/GemStone/GemStone64Bit3.6.3-x86_64.Linux/data/system.conf


| Gem Configuration Options for process id 1905 | |____|

CONFIG_WARNINGS_FATAL = FALSE; DUMP_OPTIONS = TRUE; GEM_ABORT_MAX_CRS = 100000; GEM_CACHE_WARMER_ARGS = ""; GEM_CACHE_WARMER_MID_CACHE_ARGS = ""; GEM_COMPRESS_TRANLOG_RECORDS = TRUE; GEM_ENV = ""; GEM_FREE_FRAME_CACHE_SIZE = -1; GEM_FREE_FRAME_LIMIT = -1; GEM_FREE_PAGEIDS_CACHE = 200; GEM_HALT_ON_ERROR = -1; GEM_KEEP_MIN_SOFTREFS = 0; GEM_KERBEROS_KEYTAB_FILE = ""; GEM_KEYRING_DIRS = ""; GEM_LISTEN_FOR_DEBUG = FALSE; GEM_MAX_SMALLTALK_STACK_DEPTH = 1000; GEM_NATIVE_CODE_ENABLED = 2; GEM_PGSVR_COMPRESS_PAGE_TRANSFERS = TRUE; GEM_PGSVR_FREE_FRAME_CACHE_SIZE = -1; GEM_PGSVR_FREE_FRAME_LIMIT = -1; GEM_PGSVR_UPDATE_CACHE_ON_READ = TRUE; GEM_PGSVR_USE_SSL = FALSE; GEM_READ_AUTH_ERR_STUBS = FALSE; GEM_REPOSITORY_IN_MEMORY = FALSE; GEM_RPCGCI_TIMEOUT = 0; GEM_RPC_KEEPALIVE_INTERVAL = 0; GEM_RPC_USE_SSL = TRUE; GEM_SOFTREF_CLEANUP_PERCENT_MEM = 50; GEM_SOLO_EXTENT = "$GEMSTONE/bin/extent0.dbf"; GEM_STATMONITOR_ARGS = ""; GEM_STATMONITOR_MID_CACHE_ARGS = ""; GEM_TEMPOBJ_AGGRESSIVE_STUBBING = TRUE; GEM_TEMPOBJ_CACHE_SIZE = 50000KB; GEM_TEMPOBJ_CONSECUTIVE_MARKSWEEP_LIMIT = 50; GEM_TEMPOBJ_MESPACE_SIZE = 0; GEM_TEMPOBJ_OOMSTATS_CSV = FALSE; GEM_TEMPOBJ_OOPMAP_SIZE = 0; GEM_TEMPOBJ_PERMGEN_SIZE = 0; GEM_TEMPOBJ_POMGEN_PRUNE_ON_VOTE = 50; GEM_TEMPOBJ_POMGEN_SCAVENGE_INTERVAL = 1800; GEM_TEMPOBJ_POMGEN_SIZE = 0; GEM_TEMPOBJ_SCOPES_SIZE = 2000; LOG_WARNINGS = TRUE; SHR_NUM_FREE_FRAME_SERVERS = -1; SHR_PAGE_CACHE_LARGE_MEMORY_PAGE_POLICY = 0; SHR_PAGE_CACHE_LARGE_MEMORY_PAGE_SIZE_MB = 2MB; SHR_PAGE_CACHE_LOCKED = FALSE; SHR_PAGE_CACHE_NUM_PROCS = 117; SHR_PAGE_CACHE_NUM_SHARED_COUNTERS = 1900; SHR_PAGE_CACHE_PERMISSIONS = 0660; SHR_PAGE_CACHE_SIZE_KB = 75000KB; SHR_SPIN_LOCK_COUNT = 5000; SHR_TARGET_FREE_FRAME_COUNT = -1; SHR_WELL_KNOWN_PORT_NUMBER = 0; (vmGc spaceSizes: eden init 2048K max 9344K , survivor init 448K max 1600K, vmGc old max 37440K, code max 10048K, perm max 5056K, pom 10 * 4224K = 42240K, vmGc remSet 976K, meSpace max 51480K oopMapSize 262144 max footprint 160M)


| GemStone/S64 Object-Oriented Data Management System | | Copyright (C) GemTalk Systems 1986-2021 | | All rights reserved. | | Covered by U.S Patents: | | 6,256,637 Transactional virtual machine architecture (1998-2018) | | 6,360,219 Object queues with concurrent updating (1998-2018) | | 6,567,905 Generational Garbage Collector (2001-2021) | | 6,681,226 Selective Pessimistic Locking for a Concurrently Updateable | | Database (2001-2021) | +--------------------------------------------------------------------------------+ | PROGRAM: topaz, Linear GemStone Interface (Linked Session) | | VERSION: 3.6.3, Mon Nov 22 13:35:08 2021 (branch 3.6.3) | | COMMIT: 2021-11-22T13:24:07-08:00 a07f39567a1dcae74aaed99533446ac0ed404030 | | BUILT FOR: x86-64 (Linux) | | RUNNING ON: 2-CPU debian11 x86_64 (Linux 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1| | (2021-09-30)) | | PROCESSOR: 2-core Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (Ivy Bridge) | | MEMORY: 1918 MB | | PROCESS ID: 1905 DATE: 12/12/2021 22:30:00 EET (UTC +2:00) | | USER IDS: REAL=dbtech (1000) EFFECTIVE=dbtech (1000) LOGIN=dbtech (1000) | |____| Warning, executable configuration file not found /home/dbtech/GemStone/GCfP/src/gem.conf

neither .topazini nor $HOME/.topazini were found topaz> set user SystemUser pass swordfish gems gs64stone topaz> login [Info]: LNK client/gem GCI levels = 36200/36200 --- 12/12/2021 22:30:31.425 EET Login [Info]: User ID: SystemUser [Info]: Repository: gs64stone [Info]: Session ID: 5 login at 12/12/2021 22:30:31.445 EET [Info]: GCI Client Host: [Info]: Page server PID: -1 [Info]: using libicu version 58.2 [Info]: Gave this process preference for OOM killer: wrote to /proc/1905/oom_score_adj value 250 [12/12/2021 22:30:31.478 EET] gci login: currSession 1 linked session successful login topaz 1> run TimeZone default become: TimeZone fromLinux. % [28261633 TimeZone] EET topaz 1> commit Successful commit

topaz 1> input install.into.globals.topaz topaz 1 +> output push GemConnectForPostres.install.log topaz 1 +> display oops topaz 1 +> topaz 1 +> input dochecks.topaz topaz 1 ++> expectvalue true topaz 1 ++> run | pgLib installInGlobals |

(System _gemVersionNum < 30602) ifTrue:[ Object halt: 'GemStone version 3.6.2 or later is required'].

"Check we have an env var pointing to the Postgres shared library" (pgLib := System gemEnvironmentVariable: 'POSTGRES_LIB') ifNil:[ Object halt: 'Env var POSTGRES_LIB must be set' ]. (GsFile existsOnServer: pgLib) ifFalse:[ Object halt: ('Cannot find file named ', pgLib) ]. true % true topaz 1 +> errorcount 0 topaz 1 +> send UserGlobals at: #InstallInGlobals put: true true topaz 1 +> errorcount 0 topaz 1 +> input private.topaz topaz 1 ++> expectvalue true topaz 1 ++> run | pgLib dict gsrdbconn |

"Check we have an env var pointing to the Postgres shared library" (pgLib := System gemEnvironmentVariable: 'POSTGRES_LIB') ifNil:[ Object halt: 'Env var POSTGRES_LIB must be set' ].

(UserGlobals at: #InstallInGlobals) ifTrue:[ UserGlobals at: #GcfpInstallDict put: Globals ] ifFalse:[ | blk | "Create new SymbolListDictionaries and add to all SymbolLists" blk := [:name :key :up| | symDict | symDict := (up symbolList objectNamed: name) ifNil:[ | symList offset | symList := up symbolList. offset := symList size + 1 . symList createDictionaryNamed: name at: offset . symList objectNamed: name . ].

  AllUsers do:[:u| (u resolveSymbol: name)
           ifNil:[u insertDictionary: symDict at: (u symbolList size + 1)]].
  UserGlobals at: key put: symDict .         
].
blk value: #GemConnectForPostgres value: #GcfpInstallDict value: System myUserProfile .

].

"This key should now be present" dict := UserGlobals at: #GcfpInstallDict.

"Subclass GsPostgresConnection from GsRdbConnection if present, otherwise subclass from Object." gsrdbconn := System myUserProfile resolveSymbol: #GsRdbConnection. gsrdbconn := gsrdbconn ifNil:[ Object ] ifNotNil:[ gsrdbconn value ]. UserGlobals at: #GcfpPgConnSuperClass put: gsrdbconn .

"File in GemConnect for Postgres" GsFileIn fromServerPath: 'GemConnectForPostgres_classes.gs' ; fromServerPath: 'GemConnectForPostgres_methods.gs'.

"Initialize classes. Must resolve by name so this doit compiles." (dict at: #GsLibpq) libraryPath: pgLib . (dict at: #GsPostgresConnectionParameters) initialize . (dict at: #GsPostgresResult) initialize . (dict at: #GsPostgresWriteStream) initialize .

"Clean up" UserGlobals removeKey: #GcfpInstallDict ; removeKey: #InstallInGlobals. System commitTransaction. % true topaz 1 +> errorcount 0 topaz 1 +> output pop topaz 1> input install.tests.topaz topaz 1 +> output push GemConnectForPostres.tests.install.log topaz 1 +> display oops topaz 1 +> expectvalue true topaz 1 +> run | pgLib dict testDict userGlobalsKeys |

dict := System myUserProfile symbolList detect:[:d| d includesKey: #GsPostgresResult] ifNone:[ Object halt: 'Cannot find class GsPostgresResult. Is GemConnectForPostgres installed?']. UserGlobals at: #GcfpInstallDict put: dict.

"File in GemConnect for Postgres SUNIT test cases" GsFileIn fromServerPath: 'GemConnectForPostgres_Tests_classes.gs' ; fromServerPath: 'GemConnectForPostgres_Tests_methods.gs'. UserGlobals removeKey: #GcfpInstallDict. System commitTransaction. % true topaz 1 +> topaz 1 +> errorcount 0 topaz 1 +> output pop topaz 1> exec PostgresTestCase debugEx % 22:47:09.256 PostgresTestCase debug: #test_Boolean - start...pass; 0 page(s); CPU=3.2%; 31 ms. tranlogMark Z16 22:47:09.290 PostgresTestCase debug: #test_ByteArray - start...pass; 0 page(s); CPU=4.3%; 23 ms. tranlogMark Z17 22:47:09.316 PostgresTestCase debug: #test_characterEncoding - start...pass; 0 page(s); CPU=0.0%; 3 ms. tranlogMark Z18 22:47:09.323 PostgresTestCase debug: #test_Date - start...pass; 0 page(s); CPU=5.9%; 17 ms. tranlogMark Z19 22:47:09.344 PostgresTestCase debug: #test_DateAndTime - start...pass; 0 page(s); CPU=8.7%; 2494 ms. tranlogMark Z20 22:47:11.842 PostgresTestCase debug: #test_DateTime - start...pass; 0 page(s); CPU=8.5%; 2549 ms. tranlogMark Z21 22:47:14.399 PostgresTestCase debug: #test_DoubleByteString - start...pass; 0 page(s); CPU=10.3%; 29 ms. tranlogMark Z22 22:47:14.431 PostgresTestCase debug: #test_emptyString - start...pass; 0 page(s); CPU=5.9%; 17 ms. tranlogMark Z23 22:47:14.452 PostgresTestCase debug: #test_execute - start...pass; 3 page(s); CPU=10.3%; 29 ms. tranlogMark Z24 22:47:14.483 PostgresTestCase debug: #test_executeReturnRowsAffected - start...pass; 0 page(s); CPU=14.3%; 7 ms. tranlogMark Z25 22:47:14.493 PostgresTestCase debug: #test_fetchTupleFromPostgres - start...ERROR 2010 , a MessageNotUnderstood occurred (error 2010), a OrderedCollection class does not understand #'rdbColumnMapping' topaz 1>

---------- location of error? ---------- Method test_fetchTupleFromPostgres is defined in file GemConnectForPostgres_Tests_methods.gs on lines 1245-1258 invoking _test_fetchTuplesFromPostgresForTupleClassName on lines 1526-1566 and reference to 'rdbColumnMapping' is used on line 1559

---------- Contents in demo database ---------

PostgreSQL session:

psql demo demo=# \dt List of relations Schema | Name | Type | Owner
--------+--------------+-------+-------- public | widget_table | table | dbtech (1 row)

demo=# SELECT id,last_update,last_update_notz,is_active,date,time,name_sb,balance FROM widget_table;

id | last_update | last_update_notz | is_active | date | time | name_sb | balance
------+------------------------+---------------------+-----------+------------+----------+---------+----------- 1001 | 2021-03-31 14:25:43+03 | 2021-03-31 14:25:43 | t | 2021-09-23 | 01:02:02 | Foster | $55.67 1002 | 2021-03-31 14:45:43+03 | 2021-03-31 14:45:43 | t | 2021-09-25 | 03:02:02 | Ware | $456.89 1003 | 2021-03-31 14:55:43+03 | 2021-03-31 14:55:43 | t | 2021-09-26 | 04:02:02 | Green | $2,342.98 1004 | 2021-03-31 15:05:43+03 | 2021-03-31 15:05:43 | f | 2021-09-27 | 05:02:02 | Otis | $2.30 1005 | 2021-03-31 15:15:43+03 | 2021-03-31 15:15:43 | t | 2021-09-28 | 06:02:02 | Singh | $345.58 (5 rows)

feldti commented 2 years ago

Here the OpenSSL library are also gone with 3.6.3 (under Linux Mint - Ubuntu 18.04 based) . Perhaps we should close THIS ticket and open another ticket with the additional problems mentioned here.

nrgiii commented 2 years ago

Unit test failure problem moved to issue #20

nrgiii commented 2 years ago

https://github.com/GemTalk/GemConnect-for-Postgres/issues/19#issuecomment-991734981 Regarding timezones, Postgres and GemStone must be using the same timezone otherwise there will be problems with DateTime and possibly other similar objects.