Encrypting Syslog Traffic with TLS (SSL) in aix - aix

rsyslogd-2066: could not load module '/usr/lib/rsyslog/lmnsd_gtls.so', dlopen: rtld: 0712-001 Symbol rsCStrConstructFromszStrf was referenced from module /usr/lib/rsyslog/lmnsd_gtls.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol rsCStrAppendStrf was referenced from module /usr/lib/rsyslog/lmnsd_gtls.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol gnutls_certificate_client_set_retrieve_function was referenced from module /usr/lib/rsyslog/lmnsd_gtls.so(), but a runtime definition of the symbol was not found. rtld: 0712-001 Symbol gnutls_certificate_type_set_priority was referenced from module /usr/lib/rsyslog/lmnsd_gtls.so(), but a runtime definition of the symbol was not found. [try http://www.rsyslog.com/e/2066 ]
I am getting above error when i am starting the rsyslogd process in aix machine. Please provide the solution for this.
cmd: startsrc -s rsyslogd
Thanks in advance...
*.debug /var/log/test
# make gtls driver the default
$DefaultNetstreamDriver gtls
# certificate files
$DefaultNetstreamDriverCAFile /rsyslog/protected/ca.pem
$ActionSendStreamDriverAuthMode x509/name
$ActionSendStreamDriverMode 1 # run driver in TLS-only mode
*.* ##(o)server.example.net:10514 # forward everything to remote server

Related

Failed linking C shared library mod_md.so when compile HTTPD with static cURL

I'm compiling HTTPD 2.4.54 (and its modules) with static cURL.
These are libraries and tools that I use: httpd-2.4.54, apr-1.7.0, apr-util-1.6.1, pcre-8.45, curl-7.83.1, expat-2.4.8, jansson-2.14, lua-5.4.4, mod_fcgid-2.3.9, openssl-1.1.1o, zlib-1.2.12, libxml2-2.9.14, brotli-1.0.9, nghttp2-1.47.0, Gawk v3.1.6-1, CMake v3.23.1, NASM v2.15.05, Visual Studio 2013 Ultimate.
I compiled it in order: zlib, PCRE, Expat, OpenSSL, libxml2, janssonm, Brotli, Lua, APR, APR-Util, Nghttp2. All have been successfully compiled, no errors occurred.
With the cURL, first, I compiled the dynamic cURL (libcurl_imp.lib file). Here's my compiled command line:
cd /D C:\httpd\srclib\curl\bin
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\phpStudy\Apache -DCMAKE_BUILD_TYPE=Release -DCURL_USE_OPENSSL=ON -DCURL_USE_SCHANNEL=ON -DCURL_WINDOWS_SSPI=ON -DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DHAVE_LDAP_SSL=ON -DENABLE_UNICODE=ON -DCURL_STATIC_CRT=OFF ..
Then I used nmake and nmake install, successful dynamic cURL compiler!
I continued to compile the static cURL (libcurl.lib file) immediately with the following command:
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\phpStudy\Apache -DCMAKE_BUILD_TYPE=Release -DCURL_USE_OPENSSL=ON -DCURL_USE_SCHANNEL=ON -DCURL_WINDOWS_SSPI=ON -DCURL_BROTLI=ON -DUSE_NGHTTP2=ON -DHAVE_LDAP_SSL=ON -DENABLE_UNICODE=ON -DCURL_STATICLIB=ON -DCURL_STATIC_CRT=OFF -DBUILD_SHARED_LIBS=OFF ..
Then I used nmake and nmake install, the compilation successfully, no errors occur.
After compiling cURL, I moved on to HTTPD compilation, here's my compiled command line:
cd /D C:\httpd\bin
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=\phpStudy\Apache -DCMAKE_BUILD_TYPE=Release -DENABLE_MODULES=i -DINSTALL_PDB=OFF ..
After running nmake later, I encountered an error:
[ 65%] Linking C shared library mod_md.so
LINK: command "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe /nologo #CMakeFiles\mod_md.dir\objects1.rsp /out:mod_md.so /implib:mod_md.lib /pdb:C:\httpd\bin\mod_md.pdb /dll /version:0.0 /base:#C:/httpd/bin/BaseAddr.ref,mod_md.so /machine:X86 /INCREMENTAL:NO \phpStudy\Apache\lib\libssl.lib \phpStudy\Apache\lib\libcrypto.lib \phpStudy\Apache\lib\libcurl.lib \phpStudy\Apache\lib\jansson.lib mod_watchdog.lib libhttpd.lib \phpStudy\Apache\lib\libapr-1.lib \phpStudy\Apache\lib\libaprutil-1.lib \phpStudy\Apache\lib\apr_ldap-1.lib ws2_32.lib mswsock.lib \phpStudy\Apache\lib\pcre.lib ws2_32.lib mswsock.lib kernel32.libuser32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:mod_md.so.manifest" failed (exit code 1120) with the following output:
Creating library mod_md.lib and object mod_md.exp
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_global_init referenced in function _md_curl_init
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_slist_append referenced in function _curlify_headers
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_slist_free_all referenced in function _md_curl_req_cleanup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_strerror referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_initreferenced in function _internals_setup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function _internals_setup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_perform referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_cleanup referenced in function _md_curl_req_cleanup
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_easy_getinfo referenced in function _md_curl_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_init referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_add_handle referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_remove_handle referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_wait referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_perform referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_cleanup referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_info_read referenced in function _md_curl_multi_perform
md_curl.c.obj : error LNK2019: unresolved external symbol __imp__curl_multi_strerror referenced in function _md_curl_multi_perform
mod_md.so : fatal error LNK1120: 17 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
Earlier, I changed a little CMakeLists.txt. Specifically, I have assigned the libcurl.lib file to be a cURL library and print it on the path to the library. I checked and certainly the path was correct.
Then, I checked in the folder C:\phpStudy\Apache\lib both files are libcurl.lib and libcurl_imp.lib are inside.
The above error only occurs when I use the static library file (libcurl.lib file) of cURL. But if I change to a dynamic library file (libcurl_imp.lib file), the compilation will be successful, the compilation process will take place normally.
I tried with adding (and removing) the -DCURL_STATICLIB=ON flag when compiling static cURL. But nothing changed at the linking C shared library mod_md.so step.
What is not right happened to static cURL? Why can't I compile HTTPD with static cURL?

PHP 7.0 on Ubuntu 16 - pdo_mysql.so: undefined symbol: mysqlnd_connect

I'm gettind this PDOException could not find driver
here is my /etc/php/7.0/apache2/php.ini file
;extension=php_bz2.dll
extension=php_curl.dll
extension=php_fileinfo.dll
;extension=php_ftp.dll
;extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
;extension=php_mysqli.dll
;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
;extension=php_pgsql.dll
;extension=php_shmop.dll
and when I run php in my server I get this warning PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: mysqlnd_connect in Unknown on line 0
I had to make sure that /usr/lib/php/20151012/mysqlnd.so exists and my modules were been enabled by the /etc/php/7.0/mods-available directory, there were multiple .ini files, except for mysqlnd.ini
so I created it
sudo nano mysqlnd.ini
and put this content:
; configuration for php common module
; priority=10
extension=mysqlnd.so
restarted apache
sudo service apache2 restart

Error when installing mod_perl2

I am trying to install mod_perl2 with below configuration: OS: CentOS release 5.5 (Final) Uname -a result: x86_64 x86_64 x86_64 GNU/Linux Perl version: v5.8.8 built for x86_64-linux-thread-multi apache version: Apache/2.2.3 I have downloaded mod_perl2 from Cpan site
when I try to run the "perl Makefile.PL MP_APXS=/usr/local/httpd/bin/apxs" it gives below output:
Subroutine set_version redefined at ./Makefile.PL line 137.
[ info] generating script t/TEST
[ info] generating script ./t/cgi-bin/cookies.pl
[ info] generating script ./t/cgi-bin/next_available_port.pl
Checking for Cwd...ok
Checking for File::Spec...ok
[ info] generating script t/TEST
Generating a Unix-style Makefile
Writing Makefile for mod_perl2
[warning] mod_perl dso library will be built as mod_perl.so
[warning] You'll need to add the following to httpd.conf:
[warning]
[warning] LoadModule perl_module modules/mod_perl.so
[warning]
[warning] depending on your build, mod_perl might not live in
[warning] the modules/ directory.
[warning] Check the results of
[warning]
[warning] $ /usr/local/httpd/bin/apxs -q LIBEXECDIR
[warning]
[warning] and adjust the LoadModule directive accordingly.
After "make" command runs below error occurs:
modperl_env.c: In function ‘modperl_env_magic_local_all’:
modperl_env.c:544: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c:544: error: (Each undeclared identifier is reported only once
modperl_env.c:544: error: for each function it appears in.)
modperl_env.c: At top level:
modperl_env.c:642: warning: excess elements in struct initializer
modperl_env.c:642: warning: (near initialization for ‘MP_vtbl_env’)
modperl_env.c: In function ‘modperl_env_init’:
modperl_env.c:661: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
modperl_env.c:673: warning: implicit declaration of function ‘mg_free_type’
modperl_env.c:678: error: ‘MGf_LOCAL’ undeclared (first use in this function)
modperl_env.c: In function ‘modperl_env_unload’:
modperl_env.c:690: warning: passing argument 2 of ‘Perl_mg_find’ discards qualifiers from pointer target type
make1: * [modperl_env.lo] Error 1
make1: Leaving directory `/opt/mod_perl-2.0.10/src/modules/perl'
make: * [modperl_lib] Error 2
any help is appriciated, if i have asked somthing wrong please guide further (no down votes please :) )
This constant as been introduced in perl 5.9.3, and mod_perl use it from 2.0.10.
http://search.cpan.org/~vpit/Variable-Magic-0.62/lib/Variable/Magic.pm#MGf_LOCAL
https://perl5.git.perl.org/perl.git/commit/a5063e7cd8fef802efd25ffe9df2c3748f4254f6
https://github.com/apache/mod_perl/commit/82827132efd3c2e25cc413c85af61bb63375da6e
https://perldoc.perl.org/perlguts.html
to overcome this you must modify mod_perl to use this constant conditionaly of the perl version:
diff -ruw mod_perl-2.0.11/src/modules/perl/modperl_env.c mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c
--- mod_perl-2.0.11/src/modules/perl/modperl_env.c 2017-12-06 11:08:55.000000000 -0500
+++ mod_perl-2.0.11.patched/src/modules/perl/modperl_env.c 2018-03-27 15:02:14.174790000 -0400
## -541,7 +541,9 ##
nmg = sv_magicext(nsv, mg->mg_obj, mg->mg_type, &MP_vtbl_env, (char*)NULL, 0);
nmg->mg_ptr = mg->mg_ptr;
nmg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
nmg->mg_flags |= MGf_LOCAL;
+#endif
return 1;
}
## -679,7 +681,9 ##
/* Add our version instead */
mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL, 0);
mg->mg_flags |= MGf_COPY;
+#if MP_PERL_VERSION_AT_LEAST(5, 9, 3)
mg->mg_flags |= MGf_LOCAL;
+#endif
}
void modperl_env_unload(pTHX)
A modified/enhanced version of Mathieu Carbonneaux's patch above was committed to the mod_perl SVN repository on October 8th, 2019:
http://svn.apache.org/viewvc?view=revision&revision=1868115
With this patch, mod_perl 2.0.11 will compile and install using Perl <= 5.8.8.
(Sorry, I don't have the reputation to comment, only answer.)
Why are you trying to build your own version of mod_perl? Centos has a pre-built version of mod_perl which will work with the pre-built version of Perl that is already installed.
$ sudo yum install mod_perl
(Of course, this won't help if you're not using the system Perl)
dont know how but mod_perl-2.0.6 has got installed successfully. had no success with the mod_perl-2.0.10 :(

How do I set up wxWidgets for Windows and CodeLite?

I'm trying out a new setup. I'm on a 32-bit Windows 8 Pro laptop. I've downloaded MinGW-builds' GCC 4.8.1. I used it to compile LLVM & CLang (3.4+ from a SVN copy of the trunk). Both of those are in my PATH.
I've downloaded CodeLite 5.2, which came with a copy of MinGW/GCC 4.7.1. I got the pure console tutorial example working, but I can't get the wxWidgets example working. (It's the Quick Start.) I downloaded & installed wxWidgets. (Always a good first step.) I built it with MinGW-4.8.1. I've read the error notes and added two (first local, now system) environment variables: WXWIN at "C:\wxWidgets-2.9.5" and WXCFG at "..\build\msw\gcc_mswud". (I initially thought WXCFG would be an absolute path, but it's based off of "%WXWIN%\lib\".) I moved my MinGW and LLVM builds out of "C:\Program Files" to "C:\" to avoid having a space in their paths.
Here's the (still) error output when I build with F7:
C:\WINDOWS\system32\cmd.exe /c "mingw32-make.exe -j 2 -e -f Makefile"
"----------Building project:[ Test1_2 - Debug ]----------"
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
mingw32-make.exe[1]: *** [Debug/test1_2_frame.o.d] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
mingw32-make.exe[1]: *** [Debug/test1_2_app.o.d] Error 1
Test1_2.mk:102: recipe for target `Debug/test1_2_frame.o.d' failed
Test1_2.mk:94: recipe for target `Debug/test1_2_app.o.d' failed
mingw32-make.exe[1]: Leaving directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target `All' failed
0 errors, 0 warnings
At some point, a compiler step spewed out an error message and the next step interpreted it as actual parameters! (Should have sent the error on stderr instead of stdout?)
Update
After moving on to my actual work, I got errors and noticed that CodeLite is still using the MinGW 4.7.1 that came with the CodeLite download instead of using the 4.8.1 I downloaded. I probably messed things up by changing the search directories to my 4.8.1. I think I'm going to erase everything and start over....
wx-config.exe tool for Windows uses 2 environment variables:
WXCFG and WXWIN
You need to provide them so wx-config.exe will be able to locate wx-config files.
The recommended way is to set them within the IDE and not system wide.
To do this, from within the main menu, go to:
Settings -> Environment Variables
and add 2 entries:
WXWIN=\Path\to\wxWidgets\Folder
WXCFG=gcc_dll\mswu
Also, you mentioned that codelite is using GCC4.7.1 and not your 4.8.1. You should know that when working with GCC on Windows you should have all your components built with the same GCC version. so make sure that you don't use wxWidgets that we (codelite team) provide
since it was built with GCC4.7.1 or you might get some weird crashes.
To force codelite to use another GCC, simply alter the PATH from within codelite:
Settings -> Environment variables
PATH=\Path\To\MinGW-4.8.1\bin;$PATH
Eran
The error message seems to indicate that WXCFG environment variable is not set, did you relaunch the IDE after setting it? Remember that editing environment variables doesn't change them for the already running processes.

SVN with APACHE on AIX - cannot load module mod_dav_svn.so

I'hve installed subversion and apache on my AIX server. Each one is running fine separately.
But when I try to launch apache with svn libraries included I got this error:
httpd: Syntax error on line 523 of /opt/freeware/etc/httpd/conf/httpd.conf: Syntax error on line 5 of /opt/freeware/etc/httpd/conf/extra/httpd-subversion.conf: Cannot load /opt/freeware/lib/httpd/modules/mod_dav_svn.so into server: rtld: 0712-001 Symbol ap_log_rerror was referenced\n from module /opt/freeware/lib/httpd/modules/mod_dav_svn.so(), but a runtime definition\n of the symbol was not found.\nrtld: 0712-001 Symbol dav_new_error_tag was referenced\n from module /opt/freeware/lib/httpd/modules/mod_dav_svn.so(), but a runtime definition\n of the symbol was not found.\nrtld: 0712-001 Symbol dav_push_error was referenced\n from module /opt/freeware/lib/httpd/modules/mod_dav_svn.so(), but a runtime definition\n of the symbol was not found.\nrtld: 0712-001 Symbol dav_new_error was referenced\n from module /opt/freeware/lib/httpd/modules/mod_dav_svn.so(), but a runtime definition\n of the symbol was not found.\nrtld: 0712-001 Symbol dav_xml_get_cdata was referenced\n from module /opt/freeware/lib/httpd/modules/mod_dav_svn.so(), but a runtime definition\n of the symbol was not found.\nrtld: 0712-001 Symbol dav_xmlns_add was referenced\n from module /opt/freeware/lib/httpd/modules/mod_dav_svn.so(), but a runtime definition\n of the symbol was not found.\nrtld: 0712-001 Symbol ap_log_perror was referenced\n from module /opt/freeware/lib/httpd/modules/mod_dav_svn.so(), but a runtime definition\n of the symbol was not found.\n\t0509-021 Additional errors occurred but are not reported.
I installed apache, subversion and mod_dav from perzl.com website:
subversion-1.7.6-1.aix5.1.ppc.rpm
httpd-2.4.3-1.aix5.1.ppc.rpm
mod_dav_svn-1.7.6-1.aix5.1.ppc.rpm
I'm running AIX 5.2:
uname -a:
AIX mdsp16 2 5 000133DAD300
The error (line 523) is a link to the Loadmodule mod_dav_svn
Maybe the mod_dav_svn is corrupted but I dont know where to find a good version of it (I installed the mod_dav_svn rpm many times).
I didn't find the same error on the Web and start giving it up ^^
Thx for any clue.
I have the same experience as you. But I have the problem resolved by downloading a lower version of httpd -> httpd-2.2.23-1.aix5.1.ppc.rpm from this site.