Dear Sassy, not sure what’s wrong. You installed the NaviServer modules at an unusual place, from where normally shared libraries are loaded. Can it be, that something stripped symbols in your installation process?
Anyhow, on a Debian like system you should have: $ cd /usr/local/ns/bin/ $ for f in nsdbpg.so nsdb.so ; do echo ---$f--- && (nm $f | fgrep Module); done ---nsdbpg.so--- 0000000000008598 R Ns_ModuleVersion ---nsdb.so--- 00000000000011a0 T Ns_ModuleInit 0000000000002030 R Ns_ModuleVersion As a reference, you find the sample configuration file for OpenACS in the NaviServer repository, which loads per default the ndsbpg module. You can also check the bookworm docker images at [1]. With this, you can do: docker run --rm -it --entrypoint /bin/bash gustafn/naviserver-pg:latest-bookworm # apt -y install binutils … and the run the commands with nm above… All the best -g PS: i use normally for quick installations https://github.com/gustafn/install-ns This gives a wide range of options (tcl versions, naviserver versions, better malloc library, ….) [1] https://hub.docker.com/repository/docker/gustafn/naviserver-pg/general > On 25.11.2024, at 11:19, Sassy Natan <sas...@gmail.com> wrote: > > Sorry once again, > > I was thinking I solved it but I still have the same problem. > > I'm running head version of the repo: commit > 5232c61ff982ab232827746298257d7859010e28 (HEAD -> main, origin/main, > origin/HEAD), Author: Gustaf Neumann <neum...@wu-wien.ac.at > <mailto:neum...@wu-wien.ac.at>>, Date: Sun Nov 3 11:33:23 2024 +0100 > > When starting the server: > > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Notice: modload: > loading module nsgdchart from file > /usr/lib/x86_64-linux-gnu/naviserver/bin/nsgdchart.so > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Notice: modload: > loading module nsdb from file /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdb.so > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Debug(sql): > nsdb: Add DB pool: main > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Error: dbdrv: no > such driver 'postgres' > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Debug(sql): > nsdb: Add DB pool: subquery > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Debug(sql): > nsdb: Add DB pool: log > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Error: dbinit: > no such default pool 'main' > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Notice: modload: > loading module nsdbpg from file > /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Error: modload: > /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so: cannot find symbol > "Ns_ModuleInit": /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so: > undefined symbol: _Ns_ModuleInit > [25/Nov/2024:10:13:03][29267.7be2d5a19840][-main:localhost-] Fatal: modload: > failed to load module '/usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so' > > > In the README file in nsdbpg git repo the config point to set the driver like > this: > ns_param driver postgres > > but in the previous version it was nsdbpg - is this valid? > > Here is my config: > > ns_section "ns/server/${server}/modules" { > ns_param nsdb ${homedir}/bin/nsdb.so > } > > ns_section "ns/server/${server}/modules" { > ns_param nsdbpg ${homedir}/bin/nsdbpg.so > } > > ns_section "ns/db/pools" { > ns_param main "Main" > ns_param subquery "Subquery" > ns_param log "Log" > } > > ns_section "ns/db/pool/main" { > ns_param driver postgres > ns_param datasource > ${pg_db_host}:${pg_db_port}:${pg_db_name} > ns_param user ${pg_db_user} > ns_param password ${pg_db_password} > ns_param connections 15 > ns_param LogMinDuration 0.01 > ;# when SQL logging is on, log only statements above this > duration > ns_param logsqlerrors true > ;# Verbose SQL query error logging > ns_param verbose true > ;# Verbose error logging > ns_param maxidle 10 > ;# Max time to keep idle db conn open > ns_param maxopen 10 > ;# Max time to keep active db conn open > ns_param extendedtableinfo on > } > > ns_section "ns/db/pool/subquery" { > ns_param driver postgres > ns_param datasource > ${pg_db_host}:${pg_db_port}:${pg_db_name} > ns_param user ${pg_db_user} > ns_param password ${pg_db_password} > ns_param connections 15 > ns_param LogMinDuration 0.01 > ;# when SQL logging is on, log only statements above this > duration > ns_param logsqlerrors true > ;# Verbose SQL query error logging > ns_param verbose true > ;# Verbose error logging > ns_param maxidle 10 > ;# Max time to keep idle db conn open > ns_param maxopen 10 > ;# Max time to keep active db conn open > ns_param extendedtableinfo on > } > > ns_section "ns/db/pool/log" { > ns_param driver postgres > ns_param datasource > ${pg_db_host}:${pg_db_port}:${pg_db_name} > ns_param user ${pg_db_user} > ns_param password ${pg_db_password} > ns_param connections 15 > ns_param LogMinDuration 0.01 > ;# when SQL logging is on, log only statements above this > duration > ns_param logsqlerrors true > ;# Verbose SQL query error logging > ns_param verbose true > ;# Verbose error logging > ns_param maxidle 10 > ;# Max time to keep idle db conn open > ns_param maxopen 10 > ;# Max time to keep active db conn open > ns_param extendedtableinfo on > } > > # > # > # Accessing DB pools > # > # In the case of virtual servers you can give different virtual > # servers access to different databases, or you can let them access > # them all. AOLserver 3.x does not use virtual servers so the only > # useful value is "*", but if you use one config file for multiple nsd > # processes, or you are using a version of AOLserver that supports > # virtual servers, then you should list the pools you want to access. > # > ns_section "ns/server/${server}/db" { > ns_param pools main,subquery,log > ns_param defaultpool "main" > } > > Any feedback is welcome. > > > On Mon, Nov 25, 2024 at 11:33 AM Sassy Natan <sas...@gmail.com > <mailto:sas...@gmail.com>> wrote: >> Please ignore... >> >> I forgot to load the nsdb.so module... >> >> All good :-) >> >> Thank You. >> >> >> On Mon, Nov 25, 2024 at 11:22 AM Sassy Natan <sas...@gmail.com >> <mailto:sas...@gmail.com>> wrote: >>> Hi Group, >>> >>> I was trying to install naviserver 4.99.31-1 on my ubuntu 24.04 server. >>> I can provide to the community a debian package I have built to support >>> this project (see attached picture). >>> >>> However, It seems that I have an issue with the naviserver-nsdbpg module. >>> >>> I'm using postgresql-17 (17.2-1.pgdg24.04) on this server, and I was >>> successfully build the nsdbpg module using "make >>> PGLIB=$/usr/lib/postgresql/17/lib/ PGINCLUDE=/usr/include/postgresql/". >>> >>> The nsdbpg.so file was created successfully with no error on the >>> compilation and linkage. >>> >>> When trying to load naviserver I'm getting the following error message: >>> >>> Error: modload: /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so: cannot >>> find symbol "Ns_ModuleInit": >>> /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so: undefined symbol: >>> _Ns_ModuleInit >>> >>> Running ldd on the file /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so >>> provide this output: >>> >>> linux-vdso.so.1 (0x00007fff676fc000) >>> libnsdb-4.99.31.so.1 => /lib/x86_64-linux-gnu/libnsdb-4.99.31.so.1 >>> (0x00007ddd751af000) >>> libpq.so.5 => /lib/x86_64-linux-gnu/libpq.so.5 (0x00007ddd75158000) >>> libnsthread-4.99.31.so.1 => >>> /lib/x86_64-linux-gnu/libnsthread-4.99.31.so.1 (0x00007ddd7514c000) >>> libnsd-4.99.31.so.1 => /lib/x86_64-linux-gnu/libnsd-4.99.31.so.1 >>> (0x00007ddd75047000) >>> libtcl8.6.so <http://libtcl8.6.so/> => >>> /lib/x86_64-linux-gnu/libtcl8.6.so <http://libtcl8.6.so/> >>> (0x00007ddd74e9a000) >>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ddd74c00000) >>> libssl.so.3 => /lib/x86_64-linux-gnu/libssl.so.3 >>> (0x00007ddd74b56000) >>> libcrypto.so.3 => /lib/x86_64-linux-gnu/libcrypto.so.3 >>> (0x00007ddd74600000) >>> libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 >>> (0x00007ddd74e44000) >>> libldap.so.2 => /lib/x86_64-linux-gnu/libldap.so.2 >>> (0x00007ddd745a3000) >>> libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ddd74e26000) >>> libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 >>> (0x00007ddd74b1c000) >>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ddd744ba000) >>> /lib64/ld-linux-x86-64.so.2 (0x00007ddd751d5000) >>> libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 >>> (0x00007ddd743f1000) >>> libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 >>> (0x00007ddd743c5000) >>> libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 >>> (0x00007ddd74e1e000) >>> libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 >>> (0x00007ddd743b8000) >>> liblber.so.2 => /lib/x86_64-linux-gnu/liblber.so.2 >>> (0x00007ddd743a8000) >>> libsasl2.so.2 => /lib/x86_64-linux-gnu/libsasl2.so.2 >>> (0x00007ddd7438e000) >>> libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 >>> (0x00007ddd74194000) >>> libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 >>> (0x00007ddd74e15000) >>> libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 >>> (0x00007ddd74181000) >>> libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 >>> (0x00007ddd73fdd000) >>> libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 >>> (0x00007ddd73fbb000) >>> libunistring.so.5 => /lib/x86_64-linux-gnu/libunistring.so.5 >>> (0x00007ddd73e0e000) >>> libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 >>> (0x00007ddd73df8000) >>> libnettle.so.8 => /lib/x86_64-linux-gnu/libnettle.so.8 >>> (0x00007ddd73da3000) >>> libhogweed.so.6 => /lib/x86_64-linux-gnu/libhogweed.so.6 >>> (0x00007ddd73d5b000) >>> libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 >>> (0x00007ddd73cd7000) >>> libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 >>> (0x00007ddd73ccb000) >>> >>> >>> Running nm (list symbols from object files) on the >>> /usr/lib/x86_64-linux-gnu/naviserver/bin/nsdbpg.so doesn't provide any >>> feedback about having the the _Ns_ModuleInit symbol. >>> >>> See here: >>> .. >>> .. >>> .. >>> .. >>> >>> 0000000000004d50 t AddCmds >>> 0000000000004260 t BindRow >>> 00000000000077f0 t blob_dml_file >>> 0000000000007200 t blob_get >>> 00000000000075e0 t blob_put >>> 00000000000072e0 t blob_send_to_stream >>> 00000000000041e0 t CloseDb >>> U close@GLIBC_2.2.5 >>> 000000000000b068 b completed.0 >>> U __ctype_b_loc@GLIBC_2.3 >>> w __cxa_finalize@GLIBC_2.2.5 >>> 000000000000b070 b dateStyle >>> 0000000000006870 t DbFail >>> 0000000000003f50 t DbType >>> 0000000000007c70 t decode3 >>> 0000000000003ce0 t deregister_tm_clones >>> 0000000000003d50 t __do_global_dtors_aux >>> 000000000000a8d8 d __do_global_dtors_aux_fini_array_entry >>> 000000000000b000 d __dso_handle >>> 000000000000aa30 d _DYNAMIC >>> 0000000000007b60 t encode3 >>> 0000000000007b30 t enc_one >>> U __errno_location@GLIBC_2.2.5 >>> 0000000000004370 t Exec >>> 0000000000007d5c t _fini >>> 0000000000004980 t Flush >>> 0000000000003d90 t frame_dummy >>> 000000000000a8d0 d __frame_dummy_init_array_entry >>> 00000000000093a0 r __FRAME_END__ >>> 0000000000006fb0 t get_blob_tuples >>> U getenv@GLIBC_2.2.5 >>> 0000000000007c50 t get_one >>> 0000000000004740 t GetRow >>> 0000000000004940 t GetRowCount >>> 000000000000ac60 d _GLOBAL_OFFSET_TABLE_ >>> w __gmon_start__ >>> 0000000000008b50 r __GNU_EH_FRAME_HDR >>> 000000000000b078 b id >>> 0000000000003000 t _init >>> 000000000000b080 b intTypePtr >>> U __isoc23_strtol@GLIBC_2.38 >>> w _ITM_deregisterTMCloneTable >>> w _ITM_registerTMCloneTable >>> 0000000000007a80 t linkedListElement_new >>> 0000000000007ae0 t LinkedList_free_list >>> 0000000000007ab0 t LinkedList_len >>> 0000000000005370 t ListElementExternal >>> U ns_calloc >>> U Ns_ConfigGetValue >>> U Ns_ConnContentSent >>> U Ns_ConnWriteData >>> U Ns_Db0or1Row >>> U Ns_Db1Row >>> U Ns_DbDML >>> 0000000000003da0 T Ns_DbDriverInit >>> U Ns_DbDriverName >>> U Ns_DbExec >>> U Ns_DbGetMinDuration >>> 00000000000052c4 N nsdbpg.c.6eb8844b >>> U Ns_DbRegisterDriver >>> U Ns_DbSelect >>> U Ns_DbSetException >>> U Ns_DiffTime >>> U Ns_DStringExport >>> U Ns_DStringPrintf >>> U NS_EMPTY_STRING >>> U ns_free >>> U Ns_GetTime >>> U Ns_HttpParseHost2 >>> U Ns_Log >>> U Ns_LogSeverityEnabled >>> U Ns_LogSqlDebug >>> U ns_malloc >>> 0000000000008000 R Ns_ModuleVersion >>> U Ns_ObjvArgs >>> U Ns_ObjvObj >>> U Ns_ObjvSet >>> U Ns_ObjvString >>> U Ns_ParseObjv >>> 0000000000004d00 T Ns_PgServerInit >>> U Ns_SetClearValues >>> U Ns_SetFree >>> U Ns_SetGet >>> U Ns_SetPutSz >>> U Ns_SetPutValueSz >>> U Ns_SubcmdObjv >>> U Ns_TclDbGetHandle >>> U Ns_TclEnterSet >>> U Ns_TclGetConn >>> U Ns_TclPrintfResult >>> U Ns_TclRegisterTrace >>> 0000000000003f60 t OpenDb >>> U open@GLIBC_2.2.5 >>> 0000000000006a30 t parse_bind_variables >>> 0000000000005260 t ParsedSQLDupInternalRep >>> 00000000000051f0 t ParsedSQLFreeInternalRep >>> 000000000000b040 d ParsedSQLObjType >>> 00000000000052d0 t ParsedSQLSetFromAny >>> 00000000000058a0 t PgBindDmlObjCmd >>> 0000000000005fd0 t PgBindExecObjCmd >>> 00000000000061e0 t PgBindObjCmd >>> 0000000000005a50 t PgBindOneRowObjCmd >>> 0000000000005e10 t PgBindSelectObjCmd >>> 0000000000005c20 t PgBindZeroOrOneRowObjCmd >>> 000000000000b020 D pgDbName >>> 0000000000004dc0 t PgObjCmd >>> 0000000000006440 t PgPrepareObjCmd >>> U PQbackendPID >>> U PQclear >>> U PQcmdTuples >>> U PQdb >>> U PQerrorMessage >>> U PQexec >>> U PQfinish >>> U PQfname >>> U PQfreemem >>> U PQftype >>> U PQgetlength >>> U PQgetvalue >>> U PQhost >>> U PQlibVersion >>> U PQnfields >>> U PQntuples >>> U PQoptions >>> U PQport >>> U PQresultErrorMessage >>> U PQresultStatus >>> U PQsetdbLogin >>> U PQstatus >>> U PQunescapeBytea >>> 000000000000a960 d procs >>> U read@GLIBC_2.2.5 >>> 0000000000003d10 t register_tm_clones >>> 00000000000049f0 t ResetHandle >>> 0000000000004a90 t SetTransactionState >>> U __snprintf_chk@GLIBC_2.3.4 >>> U __sprintf_chk@GLIBC_2.3.4 >>> 00000000000053c0 t SqlObjToString >>> U __stack_chk_fail@GLIBC_2.4 >>> U strcasecmp@GLIBC_2.2.5 >>> U __strcat_chk@GLIBC_2.3.4 >>> U strchr@GLIBC_2.2.5 >>> U strcmp@GLIBC_2.2.5 >>> U __strcpy_chk@GLIBC_2.3.4 >>> U strerror@GLIBC_2.2.5 >>> U strlen@GLIBC_2.2.5 >>> U strncasecmp@GLIBC_2.2.5 >>> 000000000000a8e0 d subcmds.0 >>> 00000000000062e1 N tclcmds.c.1cb70ca1 >>> U Tcl_ConvertToType >>> U Tcl_CreateObjCommand >>> U Tcl_DictObjPut >>> U Tcl_DStringAppend >>> U Tcl_DStringFree >>> U Tcl_DStringInit >>> U Tcl_DStringResult >>> U Tcl_DStringSetLength >>> U Tcl_ExternalToUtfDString >>> U Tcl_GetByteArrayFromObj >>> U Tcl_GetIndexFromObjStruct >>> U Tcl_GetObjType >>> U Tcl_GetString >>> U Tcl_GetStringFromObj >>> U Tcl_GetVar2Ex >>> U Tcl_ListObjAppendElement >>> U Tcl_NewByteArrayObj >>> U Tcl_NewDictObj >>> U Tcl_NewIntObj >>> U Tcl_NewListObj >>> U Tcl_NewStringObj >>> U Tcl_Panic >>> U Tcl_SetObjResult >>> U Tcl_UtfToExternalDString >>> U Tcl_WrongNumArgs >>> 000000000000b068 d __TMC_END__ >>> U write@GLIBC_2.2.5 >>> 0000000000007560 t write_to_stream >>> >>> >>> Am I missing something ? or there is an issue with the Code? >>> <image.png> >>> >>> >>> Thanks >>> Regards, >>> >>> Sassy Natan >>> 972-(0)54-2203702 >> >> >> >> -- >> Regards, >> >> Sassy Natan >> 972-(0)54-2203702 > > > > -- > Regards, > > Sassy Natan > 972-(0)54-2203702 > _______________________________________________ > naviserver-devel mailing list > naviserver-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/naviserver-devel
_______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel