Re: postgresql connection failed - could not encrypt
Michael Pope <[email protected]> Mon, 25 Sep 2023 15:13:11 +1000
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. --===============4973938997323796963== Content-Type: multipart/alternative; boundary="------------3kB1z3LaAXEx4r0Dzqy433Ka" Content-Language: en-US This is a multi-part message in MIME format. --------------3kB1z3LaAXEx4r0Dzqy433Ka Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Here are my tests - [X] Update debian & test with_db : docker-compose up -d : docker-compose exec docker-aubit4gl bash : cd /home/map7/code/pais_legacy/tests/with_db : 4glpc with_db.4gl -o with_db : ./with_db : exit : docker-compose stop - [X] Debian 11 bullseye = works : WARNING: The SSH_TTY variable is not set. Defaulting to a blank string. : root@ltsp-buster:/aubit4glsrc# cd /home/map7/code/pais_legacy/te : te/ templates/ test/ tests/ : root@ltsp-buster:/aubit4glsrc# cd /home/map7/code/pais_legacy/tests/with_db : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# psql : psql (13.11 (Debian 13.11-0+deb11u1), server 9.6.19) : SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off) : Type "help" for help. : : pais_legacy=# : \q : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# 4glpc with_db.4gl -o with_db : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# ./with_db : Hello from 4gl with database : 1-Sales/revenue - [X] Debian 12 bookworm = fail : ltsp-buster ~/code/docker-aubit4gl (main✗) % docker-compose exec docker-aubit4gl bash : WARNING: The SSH_TTY variable is not set. Defaulting to a blank string. : root@ltsp-buster:/aubit4glsrc# psql : psql (15.3 (Debian 15.3-0+deb12u1), server 9.6.19) : SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off) : Type "help" for help. : : pais_legacy=# : \q : root@ltsp-buster:/aubit4glsrc# cd /home/map7/code/pais_legacy/tests/with_db/ : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# 4glpc with_db.4gl -o with_db : malloc(): invalid size (unsorted) : Aborted (core dumped) : Error compiling with_db.4gl : Exit program.. 1 : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# : exit So there must be something different between postgresql 13 & 15 interacting with postgresql v9 and Aubit4gl. Regards, *Michael Pope* On 25/9/23 14:47, Michael Pope wrote: > > Mike, > > I got it working, it was due to using PostgreSQL v15 for the client to > a PostgreSQL v9 server. I've changed the docker image now to use > PostgreSQL v11 client and it works great. > > So now you can use the docker image to compile 4GL with a postgresql > database. I've also included a sample docker-compose.yml file to get > people started (refer https://github.com/map7/docker-aubit4gl) > > Docker image: https://hub.docker.com/r/map7/aubit4gl > > Regards, > > *Michael Pope* > On 22/9/23 16:51, Mike Aubury wrote: >> We connect using ecpg, can you connect with a simple esql/c program? >> >> On Fri, 22 Sept 2023, 05:40 Michael Pope, <[email protected]> wrote: >> >> Hi, >> >> When I compile my 4gl file I get an error 'could not encrypt' >> >> >> Compile command >> >> $ 4glpc with_db.4gl -o with_db >> >> >> Error >> database pais_legacy >> >> MAIN >> |_^ >> | Error at line 11, character 3 >> | Could not connect to database pais_legacy (connection to server >> at "127.0.0.1", port 5432 failed: could not encrypt) (MAIN) >> >> >> I can access the 'pais_legacy' on the command line manually and >> see the tables; >> >> $ psql -h 127.0.0.1 -U postgres pais_legacy >> >> >> I've set the following environment variables; >> >> - A4GL_UI=TUI >> - A4GL_DBDATE="DMY4" >> - A4GL_SQLTYPE=pg8 >> - PG_DATABASE=pais_legacy >> - PG_PORT=5432 >> - PG_HOST=127.0.0.1 >> - PG_USER=postgres >> - PG_PASSWORD=<my password> >> >> What am I missing here? >> >> >> -- >> Regards, >> >> *Michael Pope* >> >> _______________________________________________ >> Aubit4gl-discuss mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss >> --------------3kB1z3LaAXEx4r0Dzqy433Ka Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <p>Here are my tests</p> <p>- [X] Update debian & test with_db<br> : docker-compose up -d<br> : docker-compose exec docker-aubit4gl bash<br> : cd /home/map7/code/pais_legacy/tests/with_db<br> : 4glpc with_db.4gl -o with_db<br> : ./with_db<br> : exit<br> : docker-compose stop<br> <br> - [X] Debian 11 bullseye = works<br> : WARNING: The SSH_TTY variable is not set. Defaulting to a blank string.<br> : root@ltsp-buster:/aubit4glsrc# cd /home/map7/code/pais_legacy/te<br> : te/ templates/ test/ tests/ <br> : root@ltsp-buster:/aubit4glsrc# cd /home/map7/code/pais_legacy/tests/with_db<br> : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# psql<br> : psql (13.11 (Debian 13.11-0+deb11u1), server 9.6.19)<br> : SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)<br> : Type "help" for help.<br> : <br> : pais_legacy=# <br> : \q<br> : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# 4glpc with_db.4gl -o with_db<br> : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# ./with_db<br> : Hello from 4gl with database<br> : 1-Sales/revenue<br> <br> - [X] Debian 12 bookworm = fail<br> : ltsp-buster ~/code/docker-aubit4gl (main✗) % docker-compose exec docker-aubit4gl bash<br> : WARNING: The SSH_TTY variable is not set. Defaulting to a blank string.<br> : root@ltsp-buster:/aubit4glsrc# psql<br> : psql (15.3 (Debian 15.3-0+deb12u1), server 9.6.19)<br> : SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)<br> : Type "help" for help.<br> : <br> : pais_legacy=# <br> : \q<br> : root@ltsp-buster:/aubit4glsrc# cd /home/map7/code/pais_legacy/tests/with_db/<br> : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# 4glpc with_db.4gl -o with_db<br> : malloc(): invalid size (unsorted)<br> : Aborted (core dumped)<br> : Error compiling with_db.4gl<br> : Exit program.. 1<br> : root@ltsp-buster:/home/map7/code/pais_legacy/tests/with_db# <br> : exit<br> </p> <p>So there must be something different between postgresql 13 & 15 interacting with postgresql v9 and Aubit4gl. <br> </p> <p><br> </p> <div class="moz-signature"> <div dir="ltr"> <div>Regards,</div> <div><br> </div> <div><b>Michael Pope</b><br> </div> <div class="moz-cite-prefix"> <div><br> </div> On 25/9/23 14:47, Michael Pope wrote:<br> </div> </div> </div> <blockquote type="cite" cite="mid:[email protected]"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <p>Mike,</p> <p>I got it working, it was due to using PostgreSQL v15 for the client to a PostgreSQL v9 server. I've changed the docker image now to use PostgreSQL v11 client and it works great.</p> <p>So now you can use the docker image to compile 4GL with a postgresql database. I've also included a sample docker-compose.yml file to get people started (refer <a class="moz-txt-link-freetext" href="https://github.com/map7/docker-aubit4gl" moz-do-not-send="true">https://github.com/map7/docker-aubit4gl</a>)</p> <p>Docker image: <a class="moz-txt-link-freetext" href="https://hub.docker.com/r/map7/aubit4gl" moz-do-not-send="true">https://hub.docker.com/r/map7/aubit4gl</a><br> </p> <div class="moz-signature"> <div class="moz-cite-prefix"> <div>Regards,</div> <div><br> </div> <div><b>Michael Pope</b><br> </div> On 22/9/23 16:51, Mike Aubury wrote:<br> </div> </div> <blockquote type="cite" cite="mid:CAGAq4WF6mbSA9tbCpQD7ye8De1owWyz0SShJxgXR--TOkYDZAg@mail.gmail.com"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <div dir="auto">We connect using ecpg, can you connect with a simple esql/c program? </div> <br> <div class="gmail_quote"> <div dir="ltr" class="gmail_attr">On Fri, 22 Sept 2023, 05:40 Michael Pope, <<a href="mailto:[email protected]" moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a>> wrote:<br> </div> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div> <p>Hi,</p> <p>When I compile my 4gl file I get an error 'could not encrypt'</p> <p><br> </p> <p>Compile command</p> <p>$ 4glpc with_db.4gl -o with_db<br> </p> <p><br> </p> <p>Error<br> <font face="monospace">database pais_legacy<br> <br> MAIN<br> |_^<br> | Error at line 11, character 3<br> | Could not connect to database pais_legacy (connection to server at "127.0.0.1", port 5432 failed: could not encrypt) (MAIN)<br> </font></p> <p><br> </p> <p>I can access the 'pais_legacy' on the command line manually and see the tables;<br> </p> <p>$ psql -h 127.0.0.1 -U postgres pais_legacy</p> <p><br> </p> <p>I've set the following environment variables;</p> <p> - A4GL_UI=TUI<br> - A4GL_DBDATE="DMY4"<br> - A4GL_SQLTYPE=pg8<br> - PG_DATABASE=pais_legacy<br> - PG_PORT=5432<br> - PG_HOST=127.0.0.1<br> - PG_USER=postgres<br> - PG_PASSWORD=<my password><br> <br> </p> <p>What am I missing here?<br> </p> <p><br> </p> <div>-- <br> <div dir="ltr"> <div>Regards,</div> <div><br> </div> <div><b>Michael Pope</b></div> <br> </div> </div> </div> _______________________________________________<br> Aubit4gl-discuss mailing list<br> <a href="mailto:[email protected]" target="_blank" rel="noreferrer" moz-do-not-send="true" class="moz-txt-link-freetext">[email protected]</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss" rel="noreferrer noreferrer" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss</a><br> </blockquote> </div> </blockquote> </blockquote> </body> </html> --------------3kB1z3LaAXEx4r0Dzqy433Ka-- --===============4973938997323796963== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4973938997323796963== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Aubit4gl-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss --===============4973938997323796963==--