Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Loai Abdallatif
Hi Lou

may be its worth to check Selinux ,
try setenforce 0

On Wed, Nov 21, 2018 at 8:41 PM Lou Wallace  wrote:

> Hey Greg,
>
> Thanks for the info. I changed both httpd.conf and workers.properties to
> your settings. Got the same error msg when I restarted httpd.
>
> When I checked journalist I get
>
> ● httpd.service - The Apache HTTP Server
>Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor
> preset: disabled)
>Active: failed (Result: exit-code) since Wed 2018-11-21 18:32:37 UTC;
> 3min 51s ago
>  Docs: man:httpd(8)
>man:apachectl(8)
>   Process: 24340 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited,
> status=1/FAILURE)
>   Process: 24339 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
> (code=exited, status=1/FAILURE)
>  Main PID: 24339 (code=exited, status=1/FAILURE)
> Nov 21 18:32:37 server2 systemd[1]: Starting The Apache HTTP Server...
> Nov 21 18:32:37 server2 httpd[24339]: AH00526: Syntax error on line 63 of
> /etc/httpd/conf/httpd.conf:
> Nov 21 18:32:37 server2 httpd[24339]: Invalid command 'JkWorkersFile',
> perhaps misspelled or defined by a module not included in the server
> configuration
> Nov 21 18:32:37 server2 systemd[1]: httpd.service: main process exited,
> code=exited, status=1/FAILURE
> Nov 21 18:32:37 server2 kill[24340]: kill: cannot find process ""
> Nov 21 18:32:37 server2 systemd[1]: httpd.service: control process exited,
> code=exited status=1
> Nov 21 18:32:37 server2 systemd[1]: Failed to start The Apache HTTP Server.
> Nov 21 18:32:37 server2 systemd[1]: Unit httpd.service entered failed
> state.
> Nov 21 18:32:37 server2 systemd[1]: httpd.service failed.
>
>
>
> On Wed, Nov 21, 2018 at 11:31 AM Greg Huber  wrote:
>
> > For my centos/mod._jk I use :
> >
> > /etc/httpd/conf.d/my.conf :
> >
> > ...
> > JkWorkersFile "/etc/httpd/conf.d/workers.properties"
> > JkLogFile "/etc/httpd/logs/mod_jk.log"
> > JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
> > JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> > 
> > JkMount  / worker1
> > JkMount  /* worker1
> > 
> >
> > workers.properties :
> > # Define 1 real worker using ajp13
> > worker.list=worker1
> > # Set properties for worker1 (ajp13)
> > worker.worker1.type=ajp13
> > worker.worker1.host=localhost
> > worker.worker1.port=8009
> > worker.worker1.socket_keepalive=1
> >
> >
> > On Wed, 21 Nov 2018 at 16:19, Lou Wallace 
> wrote:
> >
> > > Hi Everyone,
> > >
> > > So still having issues with mod_jk. I have downloaded
> > >
> > > wget
> > >
> > >
> >
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz
> > > wget
> > >
> > >
> >
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1
> > >
> > > and make install, and everything seems fine
> > >
> > > I then edited the httpd.conf file and added
> > >
> > > LoadModule jk_module modules/mod_jk.so
> > >
> > > JkWorkersFile "/etc/httpd/conf/workers.properties"
> > > JkLogFile "/var/log/mod_jk.log"
> > > JkLogLevel  info
> > > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > > JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> > > JkRequestLogFormat "%w %V %T"
> > >
> > > then I edited workers.properties and added
> > >
> > > worker.list=app1,app2
> > >
> > > worker.app1.type=ajp13
> > > worker.app1.host=app1.example.com
> > > worker.app1.port=8201
> > > worker.app1.socket_timeout=10
> > >
> > > worker.app2.type=ajp13
> > > worker.app2.host=app2.example.com
> > > worker.app2.port=8201
> > > worker.app1.socket_timeout=10
> > >
> > > Then when I restart Apache using systemctl restart httpd I get
> > >
> > > Job for httpd.service failed because the control process exited with
> > error
> > > code. See "systemctl status httpd.servic
> > > e" and "journalctl -xe" for details.
> > >
> > > So checking mod_jk log I see
> > >
> > > [Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
> > > jk_map_handle_duplicates::jk_map.c (456): Duplicate key $
> > >
> > > and the httpd log last entries are
> > >
> > > [Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569]
> > AH00170:
> > > caught SIGWINCH, shutting down gracefully
> > > [Wed Nov 21 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux
> > policy
> > > enabled; httpd running as context system_u:system_r:httpd_t:s0
> > > [Wed Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232:
> > > suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
> > > [Wed Nov 21 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile
> > > defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
> > > [Wed Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
> > > shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start
> due
> > > to shared memory failure.
> > > [Wed Nov 21 15:54:19.916639 2018] [jk:emerg] [pid 11957] Initializing
> > > shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start
> due
> 

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Rainer Jung

> Nov 21 18:32:37 server2 httpd[24339]: Invalid command 'JkWorkersFile',
> perhaps misspelled or defined by a module not included in the server
> configuration

That means that there was no LoadModule line for mod_jk before that 
config line. You originally posted the first config line "LoadModule 
jk_module modules/mod_jk.so" bus either the module was located somewhere 
else, or - more likely - during this attempt here the LoadModule line wa 
sno longer in place.



[Wed Nov 21 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile
defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
[Wed Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
to shared memory failure.
[Wed Nov 21 15:54:19.916639 2018] [jk:emerg] [pid 11957] Initializing
shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
to shared memory failure.


errno=13 means access error, so the user who runs the httpd server does 
not have rights to create a shared memory file at 
/etc/httpd/logs/jk-runtime-status.11957. Have a look at 
/etc/httpd/logs/, check whether it exists and whether the httpd runtime 
user has full rights on the directory. If you can not get rights there, 
choose another path where you have rights and set it using


JkShmFile "/path/to/my/jk-runtime-status"


[Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
jk_map_handle_duplicates::jk_map.c (456): Duplicate key $


That is weired and doesn't match the config you posted. Especially since 
you didn't use either a worker mapping properties file not any JkMount 
directive. So either with the above problems fixed, i would not expect 
you mod_jk to get any requests passed over from httpd to handle them.


Also the config in your workers.properties doesn't look really good. i 
suggest you look at the exaple config you received inside 
tomcat-connectors-1.2.46-src.tar.gz and start form there. But first fix 
the above first two errors.


Regards,

Rainer

Am 21.11.2018 um 19:41 schrieb Lou Wallace:

Hey Greg,

Thanks for the info. I changed both httpd.conf and workers.properties to
your settings. Got the same error msg when I restarted httpd.

When I checked journalist I get

● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor
preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-11-21 18:32:37 UTC;
3min 51s ago
  Docs: man:httpd(8)
man:apachectl(8)
   Process: 24340 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited,
status=1/FAILURE)
   Process: 24339 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
(code=exited, status=1/FAILURE)
  Main PID: 24339 (code=exited, status=1/FAILURE)
Nov 21 18:32:37 server2 systemd[1]: Starting The Apache HTTP Server...
Nov 21 18:32:37 server2 httpd[24339]: AH00526: Syntax error on line 63 of
/etc/httpd/conf/httpd.conf:
Nov 21 18:32:37 server2 httpd[24339]: Invalid command 'JkWorkersFile',
perhaps misspelled or defined by a module not included in the server
configuration
Nov 21 18:32:37 server2 systemd[1]: httpd.service: main process exited,
code=exited, status=1/FAILURE
Nov 21 18:32:37 server2 kill[24340]: kill: cannot find process ""
Nov 21 18:32:37 server2 systemd[1]: httpd.service: control process exited,
code=exited status=1
Nov 21 18:32:37 server2 systemd[1]: Failed to start The Apache HTTP Server.
Nov 21 18:32:37 server2 systemd[1]: Unit httpd.service entered failed state.
Nov 21 18:32:37 server2 systemd[1]: httpd.service failed.



On Wed, Nov 21, 2018 at 11:31 AM Greg Huber  wrote:


For my centos/mod._jk I use :

/etc/httpd/conf.d/my.conf :

...
JkWorkersFile "/etc/httpd/conf.d/workers.properties"
JkLogFile "/etc/httpd/logs/mod_jk.log"
JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

JkMount  / worker1
JkMount  /* worker1


workers.properties :
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.socket_keepalive=1


On Wed, 21 Nov 2018 at 16:19, Lou Wallace  wrote:


Hi Everyone,

So still having issues with mod_jk. I have downloaded

wget



http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz

wget



http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1


and make install, and everything seems fine

I then edited the httpd.conf file and added

LoadModule jk_module modules/mod_jk.so

JkWorkersFile "/etc/httpd/conf/workers.properties"
JkLogFile "/var/log/mod_jk.log"
JkLogLevel  info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

then I edited workers.properties and added

worker.list=app1,app2

worker.app1.type=ajp13

Re: 9.0.13 encrypted cluster traffic

2018-11-21 Thread Tim K
On Wed, Nov 21, 2018, 9:48 AM Christopher Schultz <
ch...@christopherschultz.net wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Tim,
>
> On 11/20/18 13:36, Tim K wrote:
> > On Tue, Nov 20, 2018, 12:19 PM Christopher Schultz <
> > ch...@christopherschultz.net wrote:
> >
> > Tim,
> >
> > On 11/20/18 11:42, Tim K wrote:
> >
> > Ignore the secure port. The code behind that setting was
> > never implemented. We really should remove it.
> >
> > You want:
> >
> > http://tomcat.apache.org/tomcat-9.0-doc/config/cluster-interceptor
> .ht
> >
> >
> ml#org.apache.catalina.tribes.group.interceptors.EncryptInterceptor_Attr
> >  ml#org.apache.catalina.tribes.group.interceptors.EncryptInterceptor_Attr
> 
> >
> >
> >
> ibutes
> >
> >
> >
> > Mark
> 
> 
>  I'm having some trouble getting it working.  Can you provide
>  an example of the new EncryptInterceptor with an algorithm
>  and key?
> >
> > Each node in the cluster needs an interceptor configured, like
> > this:
> >
> >  > className="org.apache.catalina.tribes.group.interceptors.EncryptInterc
> ep
> >
> >
> tor"
> > encryptionKey="[the key]" />
> >
> > All nodes need the same key. The default algorithm
> > (AES/CBC/PKCS12Padding) is sufficient.
> >
> > To generate a key, just get some random garbage and convert it
> > into hex, like this:
> >
> > $ dd if=/dev/urandom bs=128 count=1 2>/dev/null | md5
> >
> > That'll give you a 128-bit key you can use for encryption. You can
> > also use a 256-bit key if you'd like, or a 192-bit key. For keys
> > larger than 128 bite (32 bytes), you'll need to use a different
> > signature algorithm such as sha1 or later.
> >
> > I just chose MD5 because it generates the right number of output
> > characters for a 128-bit key. You can get your random key from
> > anywhere, including pounding on the keyboard. Remember that the
> > key must be in hex-encoded binary (so only characters 0-9 and
> > a-f).
> >
> > -chris
> >>
> >> -
> >>
> >>
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
> > I tried this between 2 nodes but it fails with this error on each:
> >
> > dd if=/dev/urandom bs=128 count=1 2>/dev/null | md5sum
> > e0f2cdf931e99fdce0453964294f97f3  -
> >
> >  > className="org.apache.catalina.tribes.group.interceptors.EncryptInterc
> eptor"
> >
> >
> encryptionKey="e0f2cdf931e99fdce0453964294f97f3" />
> >
> > 20-Nov-2018 13:31:20.070 SEVERE
> > [Tribes-Task-Receiver[Catalina-Channel]-1]
> > org.apache.catalina.tribes.group.interceptors.EncryptInterceptor.messa
> geReceived
> >
> >
> Failed to decrypt message
> >
> > javax.crypto.BadPaddingException: Given final block not properly
> > padded. Such issues can arise if a bad key is used during
> > decryption.
>
> Both nodes have the same encryption key, right? The key itself looks
> fine. For example, I dropped that key into the unit test file and it
> worked as expected.
>
> I've been working on a patch yesterday and today that uses random IVs
> instead of re-using them. It really shouldn't change anything about
> the config, etc. but both nodes will require the new code to re-test.
> I've also expanded the unit tests to cover cipher block modes other
> than CBC.
>
> I don't actually have a cluster here for testing, though, so
> everything is being done with the unit tests.
>
> I thought I had reproduced your issue (BadPaddingException) except it
> turned out that the test itself was wrong and the interceptor code was
> correct.
>
> Are you able to build from source? I'm about to commit these changes
> to the trunk (9.0.x), which really shouldn't change anything for you,
> but it might fix some edge case that you are hitting.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlv1cC0ACgkQHPApP6U8
> pFhjuQ/+Mb46dCFqAd1QZqKtvc6BLO/K8/JCQiD8Z10YR0231AMwdCMLGkb7X7Xx
> A11KwaOSkISQucp7cLujC3KwlvrVpPBVeQODw7TydGVGtMBXGp+cp2pqhUDRJuZt
> 9MZM0aQsQSA2udbako77qNo/ISjgytp5ruW4RaHwwj8XauMuAZuQ1KjqXCgXOlfs
> DFBkVx4Qcs/YTn0DIuc9YGqROpb+h3VafNZiXXDIhv15ecSnMxqYAH928UA5MTi9
> byA3Lq9GlHoKlhaL5IYHGE+UoMds7QKCdSiQti8u/QEhMhXtvH1LPcZy/l3V5Xj+
> vklEkXgHef+kPVdwzwGQjQIvnbVl5qppx8wXJvDbY1hNsvgGbtXIj/Z1Xfwzx+BS
> 6fkGY2vEh5//nZB6REmbT79WByIlQSiOsLixha5LgkC8/li5X2ulXu2791UpmdSr
> mHVh06MBjMgaWP0fqELvgC88Q1x0z5O4SmYNka++wDpZYv3ZGE8zgWnaBPkQYLMI
> k4xF1udoKM662Zgh/fguKzht2OVRQK1qglm8R3HCtMNWR+EHFefrWlxQebAuKdFL
> dSftpA/tD4eaZ+MAN7B7bvj0dArywrQ1sA8EALzdfKfFAxDpLhPPCARLMtxO/Hue
> wlVBRUJ/4OdxjcQVZBmytGpQ2mSc3wLsxXslrTYokGq9D9E76fQ=
> =w3kX
> -END PGP 

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Lou Wallace
Hi Chris,

I tried that and got similar error msgs.

I am wondering if something needs to be defined upstream for Apache, Tomcat
or maybe even Java?




On Wed, Nov 21, 2018 at 11:37 AM Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Lou,
>
> On 11/21/18 11:18, Lou Wallace wrote:
> > Hi Everyone,
> >
> > So still having issues with mod_jk. I have downloaded
> >
> > wget
> > http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-conne
> ctors-1.2.46-src.tar.gz
> 
> >
> >
> wget
> > http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-conne
> ctors-1.2.46-src.tar.gz.sha1
> 
> >
> >  and make install, and everything seems fine
> >
> > I then edited the httpd.conf file and added
> >
> > LoadModule jk_module modules/mod_jk.so
> >
> > JkWorkersFile "/etc/httpd/conf/workers.properties" JkLogFile
> > "/var/log/mod_jk.log" JkLogLevel  info JkLogStampFormat "[%a %b %d
> > %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat
> > -ForwardDirectories JkRequestLogFormat "%w %V %T"
> >
> > then I edited workers.properties and added
> >
> > worker.list=app1,app2
> >
> > worker.app1.type=ajp13 worker.app1.host=app1.example.com
> > worker.app1.port=8201 worker.app1.socket_timeout=10
> >
> > worker.app2.type=ajp13 worker.app2.host=app2.example.com
> > worker.app2.port=8201 worker.app1.socket_timeout=10
> >
> > Then when I restart Apache using systemctl restart httpd I get
> >
> > Job for httpd.service failed because the control process exited
> > with error code. See "systemctl status httpd.servic e" and
> > "journalctl -xe" for details.
> >
> > So checking mod_jk log I see
> >
> > [Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
> > jk_map_handle_duplicates::jk_map.c (456): Duplicate key $
> >
> > and the httpd log last entries are
> >
> > [Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569]
> > AH00170: caught SIGWINCH, shutting down gracefully [Wed Nov 21
> > 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux policy
> > enabled; httpd running as context system_u:system_r:httpd_t:s0 [Wed
> > Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232:
> > suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Nov 21
> > 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile defined in
> > httpd.conf. Using default /etc/httpd/logs/jk-runtime-status [Wed
> > Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
> > shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to
> > start due to shared memory failure. [Wed Nov 21 15:54:19.916639
> > 2018] [jk:emerg] [pid 11957] Initializing
> > shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to
> > start due to shared memory failure.
> >
> > I am not sure if the first 3 are connected to mod_jk, I included
> > them for those who know far more then me (almost everyone I
> > suspect) just in case
> >
> > And ideas, hints or thoughts?
>
> I wonder if your shared-memory file is corrupt. Try deleting the file
> /etc/httpd/logs/jk-runtime-status (or maybe
> /etc/httpd/logs/jk-runtime-status*) and restarting.
>
> I've never seen any errors like the ones you are showing above, so
> this is just a shot in the dark.
>
> Also, try a complete "stop" and "start" instead of a graceful shutdown.
>
> - -chris
>
> > On Fri, Nov 16, 2018 at 9:56 AM Lou Wallace
> >  wrote:
> >
> >> Hi All,
> >>
> >> I am in need of some help in getting mod_jk installed on a new
> >> google cloud server.
> >>
> >> Right now it has Apache, Tomcat, Java, mysql, perl and python
> >> installed. But mod_jk isn't there.
> >>
> >> When I try yum install mod_jk it isn't found in any of the
> >> mirrors.
> >>
> >> I've been to the Tomcat site and when I try and get binaries or
> >> source it sees I am on a windows pc and forces me to those
> >> directories.
> >>
> >> So, if someone can give me a simple set of commands to do this it
> >> would be awesome. Also is there other tomcat connectors needed
> >> with java?
> >>
> >> Preferable it will be done from the ssh client on the cloud
> >> server.
> >>
> >> Thanks!
> >>
> >> Lou
> >>
> >
> -BEGIN PGP SIGNATURE-
> Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlv1icIACgkQHPApP6U8
> pFhLoBAAm5fQnozzXl2DH6p2tBCqos3FZga7u5ogbNrMULOtC4r0NMI3fqvOL03u
> SUA19NaNJyczj0LthEeLlXQfaWp2KniaLvPyrjCVGEbZejpx3fACVpCdYn5OplQB
> JNyP4gH7k1XFWlVcwtTsQugvVYlFNDp8qUaNfzHfvZ+DQhEGWEt9k0T8PWDmULJA
> ms+wQSLajDfeHqbt+EZ5HyV6x5vUJJfQirai7ExVWOp2bVM4SZXhQC0FozQGJKm/
> 883OTq2HbyhDn1wUh4xgG43vua5hY7HLbcJlDtkUYe2EpNAOyjP1p7vPgSQTukOB
> mLHTAeQFcnHCgmYRmK6A5Lf/qW3DKKFQpV3clrltEzh9csbZiTP2c/koWVWiXY64
> kXc4syCeuNRHOxjzpX0VWAnTTYh0FpPg7ITTlt3AsQMP5d5D07UOzvqhMaxi38m1
> 

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Lou Wallace
Hey Greg,

Thanks for the info. I changed both httpd.conf and workers.properties to
your settings. Got the same error msg when I restarted httpd.

When I checked journalist I get

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor
preset: disabled)
   Active: failed (Result: exit-code) since Wed 2018-11-21 18:32:37 UTC;
3min 51s ago
 Docs: man:httpd(8)
   man:apachectl(8)
  Process: 24340 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited,
status=1/FAILURE)
  Process: 24339 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND
(code=exited, status=1/FAILURE)
 Main PID: 24339 (code=exited, status=1/FAILURE)
Nov 21 18:32:37 server2 systemd[1]: Starting The Apache HTTP Server...
Nov 21 18:32:37 server2 httpd[24339]: AH00526: Syntax error on line 63 of
/etc/httpd/conf/httpd.conf:
Nov 21 18:32:37 server2 httpd[24339]: Invalid command 'JkWorkersFile',
perhaps misspelled or defined by a module not included in the server
configuration
Nov 21 18:32:37 server2 systemd[1]: httpd.service: main process exited,
code=exited, status=1/FAILURE
Nov 21 18:32:37 server2 kill[24340]: kill: cannot find process ""
Nov 21 18:32:37 server2 systemd[1]: httpd.service: control process exited,
code=exited status=1
Nov 21 18:32:37 server2 systemd[1]: Failed to start The Apache HTTP Server.
Nov 21 18:32:37 server2 systemd[1]: Unit httpd.service entered failed state.
Nov 21 18:32:37 server2 systemd[1]: httpd.service failed.



On Wed, Nov 21, 2018 at 11:31 AM Greg Huber  wrote:

> For my centos/mod._jk I use :
>
> /etc/httpd/conf.d/my.conf :
>
> ...
> JkWorkersFile "/etc/httpd/conf.d/workers.properties"
> JkLogFile "/etc/httpd/logs/mod_jk.log"
> JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
> 
> JkMount  / worker1
> JkMount  /* worker1
> 
>
> workers.properties :
> # Define 1 real worker using ajp13
> worker.list=worker1
> # Set properties for worker1 (ajp13)
> worker.worker1.type=ajp13
> worker.worker1.host=localhost
> worker.worker1.port=8009
> worker.worker1.socket_keepalive=1
>
>
> On Wed, 21 Nov 2018 at 16:19, Lou Wallace  wrote:
>
> > Hi Everyone,
> >
> > So still having issues with mod_jk. I have downloaded
> >
> > wget
> >
> >
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz
> > wget
> >
> >
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1
> >
> > and make install, and everything seems fine
> >
> > I then edited the httpd.conf file and added
> >
> > LoadModule jk_module modules/mod_jk.so
> >
> > JkWorkersFile "/etc/httpd/conf/workers.properties"
> > JkLogFile "/var/log/mod_jk.log"
> > JkLogLevel  info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> > JkRequestLogFormat "%w %V %T"
> >
> > then I edited workers.properties and added
> >
> > worker.list=app1,app2
> >
> > worker.app1.type=ajp13
> > worker.app1.host=app1.example.com
> > worker.app1.port=8201
> > worker.app1.socket_timeout=10
> >
> > worker.app2.type=ajp13
> > worker.app2.host=app2.example.com
> > worker.app2.port=8201
> > worker.app1.socket_timeout=10
> >
> > Then when I restart Apache using systemctl restart httpd I get
> >
> > Job for httpd.service failed because the control process exited with
> error
> > code. See "systemctl status httpd.servic
> > e" and "journalctl -xe" for details.
> >
> > So checking mod_jk log I see
> >
> > [Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
> > jk_map_handle_duplicates::jk_map.c (456): Duplicate key $
> >
> > and the httpd log last entries are
> >
> > [Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569]
> AH00170:
> > caught SIGWINCH, shutting down gracefully
> > [Wed Nov 21 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux
> policy
> > enabled; httpd running as context system_u:system_r:httpd_t:s0
> > [Wed Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232:
> > suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
> > [Wed Nov 21 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile
> > defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
> > [Wed Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
> > shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> > to shared memory failure.
> > [Wed Nov 21 15:54:19.916639 2018] [jk:emerg] [pid 11957] Initializing
> > shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> > to shared memory failure.
> >
> > I am not sure if the first 3 are connected to mod_jk, I included them for
> > those who know far more then me (almost everyone I suspect) just in case
> >
> > And ideas, hints or thoughts?
> >
> > Thanks!
> >
> > Lou
> >
> > On Fri, Nov 16, 2018 at 9:56 AM Lou Wallace 
> > wrote:
> >
> > > Hi All,
> > >
> > > I am in need of some help in getting 

Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Mark Thomas
On 21/11/2018 16:18, Lou Wallace wrote:
> Hi Everyone,
> 
> So still having issues with mod_jk. I have downloaded
> 
> wget
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz
> wget
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1
> 
> and make install, and everything seems fine
> 
> I then edited the httpd.conf file and added
> 
> LoadModule jk_module modules/mod_jk.so
> 
> JkWorkersFile "/etc/httpd/conf/workers.properties"
> JkLogFile "/var/log/mod_jk.log"
> JkLogLevel  info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"
> 
> then I edited workers.properties and added
> 
> worker.list=app1,app2
> 
> worker.app1.type=ajp13
> worker.app1.host=app1.example.com
> worker.app1.port=8201
> worker.app1.socket_timeout=10
> 
> worker.app2.type=ajp13
> worker.app2.host=app2.example.com
> worker.app2.port=8201
> worker.app1.socket_timeout=10

^^^

This line should be app2, not app1

Mark


> 
> Then when I restart Apache using systemctl restart httpd I get
> 
> Job for httpd.service failed because the control process exited with error
> code. See "systemctl status httpd.servic
> e" and "journalctl -xe" for details.
> 
> So checking mod_jk log I see
> 
> [Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
> jk_map_handle_duplicates::jk_map.c (456): Duplicate key $
> 
> and the httpd log last entries are
> 
> [Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569] AH00170:
> caught SIGWINCH, shutting down gracefully
> [Wed Nov 21 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux policy
> enabled; httpd running as context system_u:system_r:httpd_t:s0
> [Wed Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232:
> suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
> [Wed Nov 21 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile
> defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
> [Wed Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> to shared memory failure.
> [Wed Nov 21 15:54:19.916639 2018] [jk:emerg] [pid 11957] Initializing
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> to shared memory failure.
> 
> I am not sure if the first 3 are connected to mod_jk, I included them for
> those who know far more then me (almost everyone I suspect) just in case
> 
> And ideas, hints or thoughts?
> 
> Thanks!
> 
> Lou
> 
> On Fri, Nov 16, 2018 at 9:56 AM Lou Wallace  wrote:
> 
>> Hi All,
>>
>> I am in need of some help in getting mod_jk installed on a new google
>> cloud server.
>>
>> Right now it has Apache, Tomcat, Java, mysql, perl and python installed.
>> But mod_jk isn't there.
>>
>> When I try yum install mod_jk it isn't found in any of the mirrors.
>>
>> I've been to the Tomcat site and when I try and get binaries or source it
>> sees I am on a windows pc and forces me to those directories.
>>
>> So, if someone can give me a simple set of commands to do this it would be
>> awesome. Also is there other tomcat connectors needed with java?
>>
>> Preferable it will be done from the ssh client on the cloud server.
>>
>> Thanks!
>>
>> Lou
>>
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Lou,

On 11/21/18 11:18, Lou Wallace wrote:
> Hi Everyone,
> 
> So still having issues with mod_jk. I have downloaded
> 
> wget 
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-conne
ctors-1.2.46-src.tar.gz
>
> 
wget
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-conne
ctors-1.2.46-src.tar.gz.sha1
>
>  and make install, and everything seems fine
> 
> I then edited the httpd.conf file and added
> 
> LoadModule jk_module modules/mod_jk.so
> 
> JkWorkersFile "/etc/httpd/conf/workers.properties" JkLogFile
> "/var/log/mod_jk.log" JkLogLevel  info JkLogStampFormat "[%a %b %d
> %H:%M:%S %Y] " JkOptions +ForwardKeySize +ForwardURICompat
> -ForwardDirectories JkRequestLogFormat "%w %V %T"
> 
> then I edited workers.properties and added
> 
> worker.list=app1,app2
> 
> worker.app1.type=ajp13 worker.app1.host=app1.example.com 
> worker.app1.port=8201 worker.app1.socket_timeout=10
> 
> worker.app2.type=ajp13 worker.app2.host=app2.example.com 
> worker.app2.port=8201 worker.app1.socket_timeout=10
> 
> Then when I restart Apache using systemctl restart httpd I get
> 
> Job for httpd.service failed because the control process exited
> with error code. See "systemctl status httpd.servic e" and
> "journalctl -xe" for details.
> 
> So checking mod_jk log I see
> 
> [Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn] 
> jk_map_handle_duplicates::jk_map.c (456): Duplicate key $
> 
> and the httpd log last entries are
> 
> [Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569]
> AH00170: caught SIGWINCH, shutting down gracefully [Wed Nov 21
> 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux policy 
> enabled; httpd running as context system_u:system_r:httpd_t:s0 [Wed
> Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232: 
> suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Nov 21
> 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile defined in
> httpd.conf. Using default /etc/httpd/logs/jk-runtime-status [Wed
> Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing 
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to
> start due to shared memory failure. [Wed Nov 21 15:54:19.916639
> 2018] [jk:emerg] [pid 11957] Initializing 
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to
> start due to shared memory failure.
> 
> I am not sure if the first 3 are connected to mod_jk, I included
> them for those who know far more then me (almost everyone I
> suspect) just in case
> 
> And ideas, hints or thoughts?

I wonder if your shared-memory file is corrupt. Try deleting the file
/etc/httpd/logs/jk-runtime-status (or maybe
/etc/httpd/logs/jk-runtime-status*) and restarting.

I've never seen any errors like the ones you are showing above, so
this is just a shot in the dark.

Also, try a complete "stop" and "start" instead of a graceful shutdown.

- -chris

> On Fri, Nov 16, 2018 at 9:56 AM Lou Wallace
>  wrote:
> 
>> Hi All,
>> 
>> I am in need of some help in getting mod_jk installed on a new
>> google cloud server.
>> 
>> Right now it has Apache, Tomcat, Java, mysql, perl and python
>> installed. But mod_jk isn't there.
>> 
>> When I try yum install mod_jk it isn't found in any of the
>> mirrors.
>> 
>> I've been to the Tomcat site and when I try and get binaries or
>> source it sees I am on a windows pc and forces me to those
>> directories.
>> 
>> So, if someone can give me a simple set of commands to do this it
>> would be awesome. Also is there other tomcat connectors needed
>> with java?
>> 
>> Preferable it will be done from the ssh client on the cloud
>> server.
>> 
>> Thanks!
>> 
>> Lou
>> 
> 
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlv1icIACgkQHPApP6U8
pFhLoBAAm5fQnozzXl2DH6p2tBCqos3FZga7u5ogbNrMULOtC4r0NMI3fqvOL03u
SUA19NaNJyczj0LthEeLlXQfaWp2KniaLvPyrjCVGEbZejpx3fACVpCdYn5OplQB
JNyP4gH7k1XFWlVcwtTsQugvVYlFNDp8qUaNfzHfvZ+DQhEGWEt9k0T8PWDmULJA
ms+wQSLajDfeHqbt+EZ5HyV6x5vUJJfQirai7ExVWOp2bVM4SZXhQC0FozQGJKm/
883OTq2HbyhDn1wUh4xgG43vua5hY7HLbcJlDtkUYe2EpNAOyjP1p7vPgSQTukOB
mLHTAeQFcnHCgmYRmK6A5Lf/qW3DKKFQpV3clrltEzh9csbZiTP2c/koWVWiXY64
kXc4syCeuNRHOxjzpX0VWAnTTYh0FpPg7ITTlt3AsQMP5d5D07UOzvqhMaxi38m1
xNzmx5DnW/5iLlOM8KX528U7mATnKEUHL9q6pEtGDd8Mug6JqRgcW0T+oheb0ISg
J1nL3te0/oOGccuiUKn7NJfujSEVrb2guRG24cIZS5I9Ym7jnOZSWtN1KEpxnZfY
sF7/JHxMLNSy7zrqQNooXFCi4CDn6W6hpwQd0Nz1Y/i1XOnfLQFWBvPTJGqezSJN
PVh+QclAW7nasqgBzKb3IQPQ0uVYX3F0VKUaOxszLbsas6Dzjwk=
=qjE+
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Connection pool and parallel deployment problem

2018-11-21 Thread Gilles SCHLIENGER
Are you talking about parallel deployment or connection pools ?

Parallel deployment is in Tomcat since Tomcat 7

Gilles

-Message d'origine-
De : HeeGu Lee [mailto:elfhazardw...@gmail.com] 
Envoyé : mercredi 21 novembre 2018 13:24
À : Tomcat Users List
Objet : Re: Connection pool and parallel deployment problem

I think it is good for your mental health not to use this feature.
You just have to think of it as an experimental function like google
chrome's about://flags.

JMX has subscribe model.
However, Tomcat is no ability to receive notifications.
And most JDBC implementations are not interested in such features.
Both Tomcat and DB vendors are not going to fix it.

It's not a tragedy, it's just a comedy.


2018년 11월 21일 (수) 오후 8:00, Gilles SCHLIENGER 님이
작성:

> Hi all,
>
> We are using Tomcat 9 and parallel deployment.
>
> I use a connection pool defined in the xml context (myApp##1.xml,
> myApp##2.xml in my exemple)
>
> I have the following problem :
> - I have myApp##1.war deployed using a connection pool (configured in
> myApp##1.xml)
> - I deploy myApp##2.war (using a connection pool defined in myApp##2.xml)
> - when the last session in myApp##1 expires, myApp##1 is automatically
> undeployed (I have undeployOldVersions="true" in server.xml for the Host)
> but the connections opened by myApp##1 are not closed.
>
> I used the Tomcat configuration from the example in :
>
> https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html#Database_Connection_Pool_(DBCP_2)_Configurations
>
>  type="javax.sql.DataSource"
>maxTotal="100" maxIdle="30" maxWaitMillis="1"
> destroy-method="close"
>username="postgres" password="password"
> driverClassName="org.postgresql.Driver"
>
>  url="jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"/>
>
> During undeploy, I get the following messages :
>
> 21-Nov-2018 11:42:54.795 AVERTISSEMENT
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The
> web application [myApp##1] registered the JDBC driver
> [org.postgresql.Driver] but failed to unregister it when the web
> application was stopped. To prevent a memory leak, the JDBC Driver has been
> forcibly unregistered.
>
> ...
>
> 21-Nov-2018 11:42:54.800 AVERTISSEMENT
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The
> web application [myApp##1] appears to have started a thread named
> [Abandoned connection cleanup thread] but has failed to stop it. This is
> very likely to create a memory leak. Stack trace of thread:
> java.base@10.0.1/java.lang.Object.wait(Native Method)
> java.base@10.0.1
> /java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
>
> com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
> java.base@10.0.1
> /java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
> java.base@10.0.1
> /java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> java.base@10.0.1/java.lang.Thread.run(Thread.java:844)
>
> I have tested adding < destroy-method=close > but it did not change
> anything
>
> Is this a bug ?
>
> Thanks for any help !
>
> Regards
> Gilles
>
>


Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Greg Huber
For my centos/mod._jk I use :

/etc/httpd/conf.d/my.conf :

...
JkWorkersFile "/etc/httpd/conf.d/workers.properties"
JkLogFile "/etc/httpd/logs/mod_jk.log"
JkShmFile "/etc/httpd/logs/jk-runtime-status.log"
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"

JkMount  / worker1
JkMount  /* worker1


workers.properties :
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.socket_keepalive=1


On Wed, 21 Nov 2018 at 16:19, Lou Wallace  wrote:

> Hi Everyone,
>
> So still having issues with mod_jk. I have downloaded
>
> wget
>
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz
> wget
>
> http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1
>
> and make install, and everything seems fine
>
> I then edited the httpd.conf file and added
>
> LoadModule jk_module modules/mod_jk.so
>
> JkWorkersFile "/etc/httpd/conf/workers.properties"
> JkLogFile "/var/log/mod_jk.log"
> JkLogLevel  info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
> JkRequestLogFormat "%w %V %T"
>
> then I edited workers.properties and added
>
> worker.list=app1,app2
>
> worker.app1.type=ajp13
> worker.app1.host=app1.example.com
> worker.app1.port=8201
> worker.app1.socket_timeout=10
>
> worker.app2.type=ajp13
> worker.app2.host=app2.example.com
> worker.app2.port=8201
> worker.app1.socket_timeout=10
>
> Then when I restart Apache using systemctl restart httpd I get
>
> Job for httpd.service failed because the control process exited with error
> code. See "systemctl status httpd.servic
> e" and "journalctl -xe" for details.
>
> So checking mod_jk log I see
>
> [Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
> jk_map_handle_duplicates::jk_map.c (456): Duplicate key $
>
> and the httpd log last entries are
>
> [Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569] AH00170:
> caught SIGWINCH, shutting down gracefully
> [Wed Nov 21 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux policy
> enabled; httpd running as context system_u:system_r:httpd_t:s0
> [Wed Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232:
> suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
> [Wed Nov 21 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile
> defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
> [Wed Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> to shared memory failure.
> [Wed Nov 21 15:54:19.916639 2018] [jk:emerg] [pid 11957] Initializing
> shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
> to shared memory failure.
>
> I am not sure if the first 3 are connected to mod_jk, I included them for
> those who know far more then me (almost everyone I suspect) just in case
>
> And ideas, hints or thoughts?
>
> Thanks!
>
> Lou
>
> On Fri, Nov 16, 2018 at 9:56 AM Lou Wallace 
> wrote:
>
> > Hi All,
> >
> > I am in need of some help in getting mod_jk installed on a new google
> > cloud server.
> >
> > Right now it has Apache, Tomcat, Java, mysql, perl and python installed.
> > But mod_jk isn't there.
> >
> > When I try yum install mod_jk it isn't found in any of the mirrors.
> >
> > I've been to the Tomcat site and when I try and get binaries or source it
> > sees I am on a windows pc and forces me to those directories.
> >
> > So, if someone can give me a simple set of commands to do this it would
> be
> > awesome. Also is there other tomcat connectors needed with java?
> >
> > Preferable it will be done from the ssh client on the cloud server.
> >
> > Thanks!
> >
> > Lou
> >
>


Re: help installing mod_jk on Centos 7 on a Google Cloud server

2018-11-21 Thread Lou Wallace
Hi Everyone,

So still having issues with mod_jk. I have downloaded

wget
http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz
wget
http://www.eu.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.46-src.tar.gz.sha1

and make install, and everything seems fine

I then edited the httpd.conf file and added

LoadModule jk_module modules/mod_jk.so

JkWorkersFile "/etc/httpd/conf/workers.properties"
JkLogFile "/var/log/mod_jk.log"
JkLogLevel  info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

then I edited workers.properties and added

worker.list=app1,app2

worker.app1.type=ajp13
worker.app1.host=app1.example.com
worker.app1.port=8201
worker.app1.socket_timeout=10

worker.app2.type=ajp13
worker.app2.host=app2.example.com
worker.app2.port=8201
worker.app1.socket_timeout=10

Then when I restart Apache using systemctl restart httpd I get

Job for httpd.service failed because the control process exited with error
code. See "systemctl status httpd.servic
e" and "journalctl -xe" for details.

So checking mod_jk log I see

[Wed Nov 21 15:54:19 2018] [11957:140478724515968] [warn]
jk_map_handle_duplicates::jk_map.c (456): Duplicate key $

and the httpd log last entries are

[Wed Nov 21 15:54:13.789384 2018] [mpm_prefork:notice] [pid 7569] AH00170:
caught SIGWINCH, shutting down gracefully
[Wed Nov 21 15:54:19.910325 2018] [core:notice] [pid 11957] SELinux policy
enabled; httpd running as context system_u:system_r:httpd_t:s0
[Wed Nov 21 15:54:19.911278 2018] [suexec:notice] [pid 11957] AH01232:
suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Nov 21 15:54:19.916294 2018] [jk:warn] [pid 11957] No JkShmFile
defined in httpd.conf. Using default /etc/httpd/logs/jk-runtime-status
[Wed Nov 21 15:54:19.916632 2018] [jk:emerg] [pid 11957] Initializing
shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
to shared memory failure.
[Wed Nov 21 15:54:19.916639 2018] [jk:emerg] [pid 11957] Initializing
shm:/etc/httpd/logs/jk-runtime-status.11957 errno=13. Unable to start due
to shared memory failure.

I am not sure if the first 3 are connected to mod_jk, I included them for
those who know far more then me (almost everyone I suspect) just in case

And ideas, hints or thoughts?

Thanks!

Lou

On Fri, Nov 16, 2018 at 9:56 AM Lou Wallace  wrote:

> Hi All,
>
> I am in need of some help in getting mod_jk installed on a new google
> cloud server.
>
> Right now it has Apache, Tomcat, Java, mysql, perl and python installed.
> But mod_jk isn't there.
>
> When I try yum install mod_jk it isn't found in any of the mirrors.
>
> I've been to the Tomcat site and when I try and get binaries or source it
> sees I am on a windows pc and forces me to those directories.
>
> So, if someone can give me a simple set of commands to do this it would be
> awesome. Also is there other tomcat connectors needed with java?
>
> Preferable it will be done from the ssh client on the cloud server.
>
> Thanks!
>
> Lou
>


Re: 9.0.13 encrypted cluster traffic

2018-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Tim,

I'm all ready for a back-port of the EncryptInterceptor to Tomcat 8.5
but I'd like to make sure things are working for you before I do it.

Thanks,
- -chris

On 11/21/18 09:48, Christopher Schultz wrote:
> Tim,
> 
> On 11/20/18 13:36, Tim K wrote:
>> On Tue, Nov 20, 2018, 12:19 PM Christopher Schultz < 
>> ch...@christopherschultz.net wrote:
> 
>> Tim,
> 
>> On 11/20/18 11:42, Tim K wrote:
>> 
>> Ignore the secure port. The code behind that setting was 
>> never implemented. We really should remove it.
>> 
>> You want:
>> 
>> http://tomcat.apache.org/tomcat-9.0-doc/config/cluster-intercepto
r
>
>> 
.ht
> 
>> 
> ml#org.apache.catalina.tribes.group.interceptors.EncryptInterceptor_At
tr
>>
> 
 ml#org.apache.catalina.tribes.group.interceptors.EncryptInterceptor_At
tr
>
> 
> 
> 
> ibutes
>> 
>> 
>> 
>> Mark
> 
> 
> I'm having some trouble getting it working.  Can you
> provide an example of the new EncryptInterceptor with an
> algorithm and key?
> 
>> Each node in the cluster needs an interceptor configured, like 
>> this:
> 
>> > className="org.apache.catalina.tribes.group.interceptors.EncryptInter
c
>
>> 
ep
> 
> 
> tor"
>> encryptionKey="[the key]" />
> 
>> All nodes need the same key. The default algorithm 
>> (AES/CBC/PKCS12Padding) is sufficient.
> 
>> To generate a key, just get some random garbage and convert it 
>> into hex, like this:
> 
>> $ dd if=/dev/urandom bs=128 count=1 2>/dev/null | md5
> 
>> That'll give you a 128-bit key you can use for encryption. You
>> can also use a 256-bit key if you'd like, or a 192-bit key. For
>> keys larger than 128 bite (32 bytes), you'll need to use a
>> different signature algorithm such as sha1 or later.
> 
>> I just chose MD5 because it generates the right number of output
>>  characters for a 128-bit key. You can get your random key from 
>> anywhere, including pounding on the keyboard. Remember that the 
>> key must be in hex-encoded binary (so only characters 0-9 and 
>> a-f).
> 
>> -chris
>>> 
>>> 
- -
>>>
>>>
>
>>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
>> I tried this between 2 nodes but it fails with this error on
>> each:
> 
>> dd if=/dev/urandom bs=128 count=1 2>/dev/null | md5sum 
>> e0f2cdf931e99fdce0453964294f97f3  -
> 
>> > className="org.apache.catalina.tribes.group.interceptors.EncryptInter
c
>
>> 
eptor"
> 
> 
> encryptionKey="e0f2cdf931e99fdce0453964294f97f3" />
> 
>> 20-Nov-2018 13:31:20.070 SEVERE 
>> [Tribes-Task-Receiver[Catalina-Channel]-1] 
>> org.apache.catalina.tribes.group.interceptors.EncryptInterceptor.mess
a
>
>> 
geReceived
> 
> 
> Failed to decrypt message
> 
>> javax.crypto.BadPaddingException: Given final block not properly 
>> padded. Such issues can arise if a bad key is used during 
>> decryption.
> 
> Both nodes have the same encryption key, right? The key itself
> looks fine. For example, I dropped that key into the unit test file
> and it worked as expected.
> 
> I've been working on a patch yesterday and today that uses random
> IVs instead of re-using them. It really shouldn't change anything
> about the config, etc. but both nodes will require the new code to
> re-test. I've also expanded the unit tests to cover cipher block
> modes other than CBC.
> 
> I don't actually have a cluster here for testing, though, so 
> everything is being done with the unit tests.
> 
> I thought I had reproduced your issue (BadPaddingException) except
> it turned out that the test itself was wrong and the interceptor
> code was correct.
> 
> Are you able to build from source? I'm about to commit these
> changes to the trunk (9.0.x), which really shouldn't change
> anything for you, but it might fix some edge case that you are
> hitting.
> 
> -chris
> 
> -
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlv1fqoACgkQHPApP6U8
pFhrVBAAiX1HKpmipHpunEQRZBW9JcWKjry+gyt2MyShjJHuui8KepIxcMkpI2TY
HIuckUX4ZPoven6X1ehDjYpm48/wIuMWPoBcOOCKt+EJqWOH3jy7uHx5+zC/32FV
ne8E7It/makhPYY9MbfUCkWgig41/rb/W5QtJQNaosB9/ZOLQzn04gD/JzWGicxJ
uWTEvvxbjTR0NP94pCNWXGnbXUboWItfhqLtUd5C4uLiHAzGQT4sShZY1kK9Osps
M/tHg/r3jhRFWmNxZJZ61jWnqvHShy0ZxU0aqrKbHbUhuCa5PZ1Y8eVkuuapZShy
De65NqUrTwzjg5zxLnHS5euzAkPRdtSlvmkUdcPgbd/i/cMyQTBvxgrnnMiwrOfy
bZT/GgjdEz8/E0dh10VTSBfwpwCg7GasEeEj98q8ndyUqbQymcs6Ddk243TZtqho
NdwYNAvdnC7ShmwwLGKRv+JQiPfn0X2uG7NN58Qm1QORrIy0y4r1w9weUxp6UUP8
1asrBL5mxnBSOunZTszsCm9Q1kkInypLCBE7zWyITqKBrP/yJ9JEvQpZpECapH32

Re: 9.0.13 encrypted cluster traffic

2018-11-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Tim,

On 11/20/18 13:36, Tim K wrote:
> On Tue, Nov 20, 2018, 12:19 PM Christopher Schultz < 
> ch...@christopherschultz.net wrote:
> 
> Tim,
> 
> On 11/20/18 11:42, Tim K wrote:
> 
> Ignore the secure port. The code behind that setting was
> never implemented. We really should remove it.
> 
> You want:
> 
> http://tomcat.apache.org/tomcat-9.0-doc/config/cluster-interceptor
.ht
>
> 
ml#org.apache.catalina.tribes.group.interceptors.EncryptInterceptor_Attr
> 
>
> 
ibutes
> 
> 
> 
> Mark
 
 
 I'm having some trouble getting it working.  Can you provide
 an example of the new EncryptInterceptor with an algorithm
 and key?
> 
> Each node in the cluster needs an interceptor configured, like
> this:
> 
>  className="org.apache.catalina.tribes.group.interceptors.EncryptInterc
ep
>
> 
tor"
> encryptionKey="[the key]" />
> 
> All nodes need the same key. The default algorithm 
> (AES/CBC/PKCS12Padding) is sufficient.
> 
> To generate a key, just get some random garbage and convert it
> into hex, like this:
> 
> $ dd if=/dev/urandom bs=128 count=1 2>/dev/null | md5
> 
> That'll give you a 128-bit key you can use for encryption. You can 
> also use a 256-bit key if you'd like, or a 192-bit key. For keys 
> larger than 128 bite (32 bytes), you'll need to use a different 
> signature algorithm such as sha1 or later.
> 
> I just chose MD5 because it generates the right number of output 
> characters for a 128-bit key. You can get your random key from 
> anywhere, including pounding on the keyboard. Remember that the
> key must be in hex-encoded binary (so only characters 0-9 and
> a-f).
> 
> -chris
>> 
>> -
>>
>> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> I tried this between 2 nodes but it fails with this error on each:
> 
> dd if=/dev/urandom bs=128 count=1 2>/dev/null | md5sum 
> e0f2cdf931e99fdce0453964294f97f3  -
> 
>  className="org.apache.catalina.tribes.group.interceptors.EncryptInterc
eptor"
>
> 
encryptionKey="e0f2cdf931e99fdce0453964294f97f3" />
> 
> 20-Nov-2018 13:31:20.070 SEVERE
> [Tribes-Task-Receiver[Catalina-Channel]-1] 
> org.apache.catalina.tribes.group.interceptors.EncryptInterceptor.messa
geReceived
>
> 
Failed to decrypt message
> 
> javax.crypto.BadPaddingException: Given final block not properly
> padded. Such issues can arise if a bad key is used during
> decryption.

Both nodes have the same encryption key, right? The key itself looks
fine. For example, I dropped that key into the unit test file and it
worked as expected.

I've been working on a patch yesterday and today that uses random IVs
instead of re-using them. It really shouldn't change anything about
the config, etc. but both nodes will require the new code to re-test.
I've also expanded the unit tests to cover cipher block modes other
than CBC.

I don't actually have a cluster here for testing, though, so
everything is being done with the unit tests.

I thought I had reproduced your issue (BadPaddingException) except it
turned out that the test itself was wrong and the interceptor code was
correct.

Are you able to build from source? I'm about to commit these changes
to the trunk (9.0.x), which really shouldn't change anything for you,
but it might fix some edge case that you are hitting.

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlv1cC0ACgkQHPApP6U8
pFhjuQ/+Mb46dCFqAd1QZqKtvc6BLO/K8/JCQiD8Z10YR0231AMwdCMLGkb7X7Xx
A11KwaOSkISQucp7cLujC3KwlvrVpPBVeQODw7TydGVGtMBXGp+cp2pqhUDRJuZt
9MZM0aQsQSA2udbako77qNo/ISjgytp5ruW4RaHwwj8XauMuAZuQ1KjqXCgXOlfs
DFBkVx4Qcs/YTn0DIuc9YGqROpb+h3VafNZiXXDIhv15ecSnMxqYAH928UA5MTi9
byA3Lq9GlHoKlhaL5IYHGE+UoMds7QKCdSiQti8u/QEhMhXtvH1LPcZy/l3V5Xj+
vklEkXgHef+kPVdwzwGQjQIvnbVl5qppx8wXJvDbY1hNsvgGbtXIj/Z1Xfwzx+BS
6fkGY2vEh5//nZB6REmbT79WByIlQSiOsLixha5LgkC8/li5X2ulXu2791UpmdSr
mHVh06MBjMgaWP0fqELvgC88Q1x0z5O4SmYNka++wDpZYv3ZGE8zgWnaBPkQYLMI
k4xF1udoKM662Zgh/fguKzht2OVRQK1qglm8R3HCtMNWR+EHFefrWlxQebAuKdFL
dSftpA/tD4eaZ+MAN7B7bvj0dArywrQ1sA8EALzdfKfFAxDpLhPPCARLMtxO/Hue
wlVBRUJ/4OdxjcQVZBmytGpQ2mSc3wLsxXslrTYokGq9D9E76fQ=
=w3kX
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Translations update

2018-11-21 Thread Tran, Minh
Hi All,
  I can help you with the addition of the Vietnamese translation so we can 
cover few of  the under represented areas.
Kind Regards,
Minh Tran; Ph.D.

From: Mark Thomas [ma...@apache.org]
Sent: Wednesday, November 21, 2018 4:58 AM
To: Tomcat Users List
Subject: Translations update

Hi all,

I wanted to let you know about the amazing progress that is being made
on the Tomcat translations at
https://poeditor.com/join/project/NUTIjDWzrl

In the short time since this effort has started the community has
achieved the following:

- French has increased from 18% to 64% coverage
- Simplified Chinese has been added and has already reached 32% coverage
- Korean has been added and has reached 10% coverage
- German has increased from 2% to 7% coverage
- Brazilian Portuguese has been added and has reached 4% coverage
- Spanish has increased from 42% to 44% coverage

as well as a smaller number of additions and corrections to another 6
languages.

A big thank you to everyone who has contributed.

There is still lots to do so if you would like to help out please join
us at:
https://poeditor.com/join/project/NUTIjDWzrl

Thanks,

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Translations update

2018-11-21 Thread Woonsan Ko
It is truly amazing. I'm proud of ourselves. Let's keep improving it together!

Cheers,

Woonsan

On Wed, Nov 21, 2018 at 4:58 AM Mark Thomas  wrote:
>
> Hi all,
>
> I wanted to let you know about the amazing progress that is being made
> on the Tomcat translations at
> https://poeditor.com/join/project/NUTIjDWzrl
>
> In the short time since this effort has started the community has
> achieved the following:
>
> - French has increased from 18% to 64% coverage
> - Simplified Chinese has been added and has already reached 32% coverage
> - Korean has been added and has reached 10% coverage
> - German has increased from 2% to 7% coverage
> - Brazilian Portuguese has been added and has reached 4% coverage
> - Spanish has increased from 42% to 44% coverage
>
> as well as a smaller number of additions and corrections to another 6
> languages.
>
> A big thank you to everyone who has contributed.
>
> There is still lots to do so if you would like to help out please join
> us at:
> https://poeditor.com/join/project/NUTIjDWzrl
>
> Thanks,
>
> Mark
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connection pool and parallel deployment problem

2018-11-21 Thread Mark Thomas
On 21/11/2018 11:00, Gilles SCHLIENGER wrote:
> Hi all,
> 
> We are using Tomcat 9 and parallel deployment.
> 
> I use a connection pool defined in the xml context (myApp##1.xml, 
> myApp##2.xml in my exemple)
> 
> I have the following problem :
> - I have myApp##1.war deployed using a connection pool (configured in 
> myApp##1.xml)
> - I deploy myApp##2.war (using a connection pool defined in myApp##2.xml)
> - when the last session in myApp##1 expires, myApp##1 is automatically 
> undeployed (I have undeployOldVersions="true" in server.xml for the Host) but 
> the connections opened by myApp##1 are not closed.
> 
> I used the Tomcat configuration from the example in :
> https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html#Database_Connection_Pool_(DBCP_2)_Configurations
> 
>  type="javax.sql.DataSource"
>maxTotal="100" maxIdle="30" maxWaitMillis="1" 
> destroy-method="close"
>username="postgres" password="password" 
> driverClassName="org.postgresql.Driver"
>
> url="jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"/>
> 
> During undeploy, I get the following messages :
> 
> 21-Nov-2018 11:42:54.795 AVERTISSEMENT 
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web 
> application [myApp##1] registered the JDBC driver [org.postgresql.Driver] but 
> failed to unregister it when the web application was stopped. To prevent a 
> memory leak, the JDBC Driver has been forcibly unregistered.

That is a warning you should be able to fix by unregistering the JDBC
driver in a ServletContextListener.

> 21-Nov-2018 11:42:54.800 AVERTISSEMENT 
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The 
> web application [myApp##1] appears to have started a thread named [Abandoned 
> connection cleanup thread] but has failed to stop it. This is very likely to 
> create a memory leak. Stack trace of thread:
> java.base@10.0.1/java.lang.Object.wait(Native Method)
> java.base@10.0.1/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
> com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
> java.base@10.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
> java.base@10.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> java.base@10.0.1/java.lang.Thread.run(Thread.java:844)

That is a thread started by the MySQL driver. There should be an API
provided by the MySQL driver that you can call to stop the thread (again
in a ServletContextListener) although I'd expect that to happen
automatically as part of unloading the driver.

If there is no way to stop the thread then that would be a bug in the
MySQL driver.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Connection pool and parallel deployment problem

2018-11-21 Thread HeeGu Lee
I think it is good for your mental health not to use this feature.
You just have to think of it as an experimental function like google
chrome's about://flags.

JMX has subscribe model.
However, Tomcat is no ability to receive notifications.
And most JDBC implementations are not interested in such features.
Both Tomcat and DB vendors are not going to fix it.

It's not a tragedy, it's just a comedy.


2018년 11월 21일 (수) 오후 8:00, Gilles SCHLIENGER 님이
작성:

> Hi all,
>
> We are using Tomcat 9 and parallel deployment.
>
> I use a connection pool defined in the xml context (myApp##1.xml,
> myApp##2.xml in my exemple)
>
> I have the following problem :
> - I have myApp##1.war deployed using a connection pool (configured in
> myApp##1.xml)
> - I deploy myApp##2.war (using a connection pool defined in myApp##2.xml)
> - when the last session in myApp##1 expires, myApp##1 is automatically
> undeployed (I have undeployOldVersions="true" in server.xml for the Host)
> but the connections opened by myApp##1 are not closed.
>
> I used the Tomcat configuration from the example in :
>
> https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html#Database_Connection_Pool_(DBCP_2)_Configurations
>
>  type="javax.sql.DataSource"
>maxTotal="100" maxIdle="30" maxWaitMillis="1"
> destroy-method="close"
>username="postgres" password="password"
> driverClassName="org.postgresql.Driver"
>
>  url="jdbc:postgresql://localhost:5432/postgres?stringtype=unspecified"/>
>
> During undeploy, I get the following messages :
>
> 21-Nov-2018 11:42:54.795 AVERTISSEMENT
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The
> web application [myApp##1] registered the JDBC driver
> [org.postgresql.Driver] but failed to unregister it when the web
> application was stopped. To prevent a memory leak, the JDBC Driver has been
> forcibly unregistered.
>
> ...
>
> 21-Nov-2018 11:42:54.800 AVERTISSEMENT
> [ContainerBackgroundProcessor[StandardEngine[Catalina]]]
> org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The
> web application [myApp##1] appears to have started a thread named
> [Abandoned connection cleanup thread] but has failed to stop it. This is
> very likely to create a memory leak. Stack trace of thread:
> java.base@10.0.1/java.lang.Object.wait(Native Method)
> java.base@10.0.1
> /java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
>
> com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
> java.base@10.0.1
> /java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
> java.base@10.0.1
> /java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
> java.base@10.0.1/java.lang.Thread.run(Thread.java:844)
>
> I have tested adding < destroy-method=close > but it did not change
> anything
>
> Is this a bug ?
>
> Thanks for any help !
>
> Regards
> Gilles
>
>


Connection pool and parallel deployment problem

2018-11-21 Thread Gilles SCHLIENGER
Hi all,

We are using Tomcat 9 and parallel deployment.

I use a connection pool defined in the xml context (myApp##1.xml, myApp##2.xml 
in my exemple)

I have the following problem :
- I have myApp##1.war deployed using a connection pool (configured in 
myApp##1.xml)
- I deploy myApp##2.war (using a connection pool defined in myApp##2.xml)
- when the last session in myApp##1 expires, myApp##1 is automatically 
undeployed (I have undeployOldVersions="true" in server.xml for the Host) but 
the connections opened by myApp##1 are not closed.

I used the Tomcat configuration from the example in :
https://tomcat.apache.org/tomcat-9.0-doc/jndi-datasource-examples-howto.html#Database_Connection_Pool_(DBCP_2)_Configurations



During undeploy, I get the following messages :

21-Nov-2018 11:42:54.795 AVERTISSEMENT 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web 
application [myApp##1] registered the JDBC driver [org.postgresql.Driver] but 
failed to unregister it when the web application was stopped. To prevent a 
memory leak, the JDBC Driver has been forcibly unregistered.

...

21-Nov-2018 11:42:54.800 AVERTISSEMENT 
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] 
org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web 
application [myApp##1] appears to have started a thread named [Abandoned 
connection cleanup thread] but has failed to stop it. This is very likely to 
create a memory leak. Stack trace of thread:
java.base@10.0.1/java.lang.Object.wait(Native Method)
java.base@10.0.1/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:64)
java.base@10.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
java.base@10.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
java.base@10.0.1/java.lang.Thread.run(Thread.java:844)

I have tested adding < destroy-method=close > but it did not change anything

Is this a bug ?

Thanks for any help !

Regards
Gilles



Translations update

2018-11-21 Thread Mark Thomas
Hi all,

I wanted to let you know about the amazing progress that is being made
on the Tomcat translations at
https://poeditor.com/join/project/NUTIjDWzrl

In the short time since this effort has started the community has
achieved the following:

- French has increased from 18% to 64% coverage
- Simplified Chinese has been added and has already reached 32% coverage
- Korean has been added and has reached 10% coverage
- German has increased from 2% to 7% coverage
- Brazilian Portuguese has been added and has reached 4% coverage
- Spanish has increased from 42% to 44% coverage

as well as a smaller number of additions and corrections to another 6
languages.

A big thank you to everyone who has contributed.

There is still lots to do so if you would like to help out please join
us at:
https://poeditor.com/join/project/NUTIjDWzrl

Thanks,

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org