proxy_wstunnel_module

Issues related to applications and software problems
Post Reply
zemond
Posts: 5
Joined: 2017/07/31 20:44:13

proxy_wstunnel_module

Post by zemond » 2017/07/31 20:56:33

Hello!

I have a problem with proxy_wstunnel_module on Apache in my CentOS.

CentOS release 6.9 (Final)
Server version: Apache/2.4.12 (Unix)

I need install proxy_wstunnel_module, i read manual http://stackmirror.cn/page/s0ui2n9ay1bt
1) I download module with https://github.com/apache/httpd/tree/tr ... ules/proxy
2) I compile it using apxs -i -a -c mod_proxy_tunnel.c

I have many warning and error:

Code: Select all

mod_proxy_tunnel.c: In function 'proxy_wstunnel_pump':
mod_proxy_tunnel.c:91: warning: implicit declaration of function 'ap_proxy_transfer_between_connections'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_finish':
mod_proxy_tunnel.c:163: warning: implicit declaration of function 'ap_mpm_resume_suspended'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_callback':
mod_proxy_tunnel.c:207: warning: implicit declaration of function 'ap_mpm_register_poll_callback_timeout'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_canon':
mod_proxy_tunnel.c:235: warning: implicit declaration of function 'ap_cstr_casecmpn'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_request':
mod_proxy_tunnel.c:317: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:317: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:330: warning: implicit declaration of function 'ap_cstr_casecmp'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_handler':
mod_proxy_tunnel.c:463: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:463: error: 'proxy_worker_shared' has no member named 'upgrade'
mod_proxy_tunnel.c:521: warning: implicit declaration of function 'ap_proxy_connection_create_ex'
mod_proxy_tunnel.c: In function 'create_proxyws_dir_config':
mod_proxy_tunnel.c:547: error: 'AP_MPMQ_CAN_POLL' undeclared (first use in this function)
mod_proxy_tunnel.c:547: error: (Each undeclared identifier is reported only once
mod_proxy_tunnel.c:547: error: for each function it appears in.)
apxs:Error: Command failed with rc=65536
After that, i download ap_mpm.h and mod_proxy.h in directory with mod_proxy_tunnel.c

Compiling again:

Code: Select all

apxs -i -a -c mod_proxy_tunnel.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -m64 -fPIC -DPIC  -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/local/apache/include  -I/usr/local/apache/include   -I/usr/local/apache/include   -c -o mod_proxy_tunnel.lo mod_proxy_tunnel.c && touch mod_proxy_tunnel.slo
mod_proxy_tunnel.c: In function 'proxy_wstunnel_canon':
mod_proxy_tunnel.c:235: warning: implicit declaration of function 'ap_cstr_casecmpn'
mod_proxy_tunnel.c: In function 'proxy_wstunnel_request':
mod_proxy_tunnel.c:330: warning: implicit declaration of function 'ap_cstr_casecmp'
/usr/local/apache/build/libtool --silent --mode=link gcc -std=gnu99 -L/usr/lib64   -o mod_proxy_tunnel.la  -rpath /usr/local/apache/modules -module -avoid-version    mod_proxy_tunnel.lo
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' mod_proxy_tunnel.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install install mod_proxy_tunnel.la /usr/local/apache/modules/
libtool: install: install .libs/mod_proxy_tunnel.so /usr/local/apache/modules/mod_proxy_tunnel.so
libtool: install: install .libs/mod_proxy_tunnel.lai /usr/local/apache/modules/mod_proxy_tunnel.la
libtool: install: install .libs/mod_proxy_tunnel.a /usr/local/apache/modules/mod_proxy_tunnel.a
libtool: install: chmod 644 /usr/local/apache/modules/mod_proxy_tunnel.a
libtool: install: ranlib /usr/local/apache/modules/mod_proxy_tunnel.a
libtool: finish: PATH="/usr/local/jdk/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/cpanel/composer/bin:/usr/local/easy/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/sbin" ldconfig -n /usr/local/apache/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 755 /usr/local/apache/modules/mod_proxy_tunnel.so
[activating module `proxy_wstunnel' in /usr/local/apache/conf/httpd.conf]
3) I try looked modules included in my config:

Code: Select all

httpd -M
httpd: Syntax error on line 35 of /usr/local/apache/conf/httpd.conf: Cannot load modules/mod_proxy_tunnel.so into server: /usr/local/apache/modules/mod_proxy_tunnel.so: undefined symbol: ap_mpm_register_poll_callback_timeout
How decide this problem?

zemond
Posts: 5
Joined: 2017/07/31 20:44:13

Re: proxy_wstunnel_module

Post by zemond » 2017/08/01 19:15:15

Found a solution.

I was downloaded all files of 2.4.12 from http://www.linuxfromscratch.org/blfs/vi ... pache.html and after that compiled module is work.

It was necessary to use files of one branch.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: proxy_wstunnel_module

Post by TrevorH » 2017/08/01 20:18:00

If you overwrote any of the CentOS supplied httpd files then your method will almost certainly break next time there is a yum update that includes the httpd package. Run rpm -V httpd mod_ssl to see what, if anything, has changed in the package contents.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply