Erreur 502 serveur tomcat 8 avec apache en frontal.
Bonjour,
Je cherche à atteindre un serveur tomcat qui n'est pas en DMZ, pour cela je passe par un serveur apache 2.4 installé sur un debian 8, n'arrivant pas à résoudre mon problème l'erreur exacte est : Bad Gateway : The proxy server received an invalid response from an upstream server.
J'ai tenté en vain de simplifier la configuration au maximum pour tester c'est à dire:
- Utilisation de l'application sample (cf https://tomcat.apache.org/tomcat-8.0-doc/appdev/sample/ ).
- Les serveur tomcat et apache sont sur la même machin (et tous 2 fonctionnelle).
Pour cela je passe par le VirtualHost suivant (épuré au maximum pour essayer de comprendre où été le problème):
Code:
1 2 3 4
| <VirtualHost X.X.X.X:80>
ServerName monprojet.me
JkMount /sample/* worker1
</VirtualHost> |
J'ai configuré mon jk.load au minimum vitale et je n'est pas touché au jk.conf:
Code:
1 2 3 4 5 6
| LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " |
Voici mon workers.properties:
Code:
1 2 3 4 5 6 7 8
| workers.tomcat_home=/var/lib/tomcat8/
workers.java_home=/usr/lib/jvm/default-java/
ps=/
worker.list=worker1
worker.worker1.port=8080
worker.worker1.host=127.0.0.1
worker.worker1.type=ajp13
worker.worker1.lbfactor=1 |
Enfin voici une partie des logs :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
|
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'workers.tomcat_home' -> '/var/lib/tomcat8/'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'workers.java_home' -> '/usr/lib/jvm/default-java/'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'ps' -> '/'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'worker.list' -> 'worker1'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'worker.worker1.port' -> '8080'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'worker.worker1.host' -> '127.0.0.1'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'worker.worker1.type' -> 'ajp13'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_map_dump::jk_map.c (580): Dump of map 3: 'worker.worker1.lbfactor' -> '1'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] build_worker_map::jk_worker.c (241): creating worker worker1
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] wc_create_worker::jk_worker.c (145): about to create instance worker1 of ajp13
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_worker_factory::jk_ajp_common.c (3023): ajp worker 'worker1' type=2 created
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] wc_create_worker::jk_worker.c (158): about to validate and init worker1
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_validate::jk_ajp_common.c (2691): worker worker1 contact is '127.0.0.1:8080'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] jk_ajp_push::jk_ajp_common.c (1113): syncing shm for ajp worker 'worker1' from mem (0->0) [0->0]
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2887): setting endpoint options:
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2890): keepalive: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2894): socket timeout: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2898): socket connect timeout: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2902): buffer size: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2906): pool timeout: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2910): ping timeout: 10000
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2914): connect timeout: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2918): reply timeout: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2922): prepost timeout: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2926): recovery options: 0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2930): retries: 2
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2934): max packet size: 8192
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_init::jk_ajp_common.c (2938): retry interval: 100
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] ajp_create_endpoint_cache::jk_ajp_common.c (2750): setting connection pool size to 1 with min 1 an$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [info] init_jk::mod_jk.c (3383): mod_jk/1.2.37 initialized
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] wc_get_worker_for_name::jk_worker.c (115): did not find a worker jk-manager
[Sat May 28 12:10:52 2016] [6917:139872104888192] [error] extension_fix::jk_uri_worker_map.c (566): Could not find worker with name 'jk-manager' in uri map $
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] wc_get_worker_for_name::jk_worker.c (115): did not find a worker jk-status
[Sat May 28 12:10:52 2016] [6917:139872104888192] [error] extension_fix::jk_uri_worker_map.c (566): Could not find worker with name 'jk-status' in uri map p$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): uri map dump after extension stripping: id=1, inde$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (183): generation 0: size=0 nosize=0 capacity=0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (183): generation 1: size=2 nosize=0 capacity=4
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (196): NEXT (1) map #0: uri=/jk-manager worker=jk-manager$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (196): NEXT (1) map #1: uri=/jk-status worker=jk-status c$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_switch::jk_uri_worker_map.c (588): Switching uri worker map from index 0 to index 1
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] wc_get_worker_for_name::jk_worker.c (115): found a worker worker1
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] wc_get_name_for_type::jk_worker.c (292): Found worker type 'ajp13'
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] extension_fix_activation::jk_uri_worker_map.c (485): Checking extension for worker worker1 of type$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (176): uri map dump after extension stripping: id=2, inde$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (183): generation 0: size=0 nosize=0 capacity=0
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (183): generation 1: size=1 nosize=0 capacity=4
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_dump::jk_uri_worker_map.c (196): NEXT (1) map #0: uri=/sample/* worker=worker1 cont$
[Sat May 28 12:10:52 2016] [6917:139872104888192] [debug] uri_worker_map_switch::jk_uri_worker_map.c (588): Switching uri worker map from index 0 to index 1
[Sat May 28 12:10:52 2016] [6923:139872104888192] [debug] do_shm_open::jk_shm.c (634): Attached shared memory /var/log/apache2/jk-runtime-status.6917 [2] si$
[Sat May 28 12:10:52 2016] [6923:139872104888192] [debug] do_shm_open_lock::jk_shm.c (430): Duplicated shared memory lock /var/log/apache2/jk-runtime-status$
[Sat May 28 12:10:52 2016] [6923:139872104888192] [debug] jk_child_init::mod_jk.c (3266): Initialized mod_jk/1.2.37
[Sat May 28 12:10:52 2016] [6922:139872104888192] [debug] do_shm_open::jk_shm.c (634): Attached shared memory /var/log/apache2/jk-runtime-status.6917 [3] si$
[Sat May 28 12:10:52 2016] [6922:139872104888192] [debug] do_shm_open_lock::jk_shm.c (430): Duplicated shared memory lock /var/log/apache2/jk-runtime-status$
[Sat May 28 12:10:52 2016] [6922:139872104888192] [debug] jk_child_init::mod_jk.c (3266): Initialized mod_jk/1.2.37
[Sat May 28 12:10:52 2016] [6924:139872104888192] [debug] do_shm_open::jk_shm.c (634): Attached shared memory /var/log/apache2/jk-runtime-status.6917 [4] si$
[Sat May 28 12:10:52 2016] [6924:139872104888192] [debug] do_shm_open_lock::jk_shm.c (430): Duplicated shared memory lock /var/log/apache2/jk-runtime-status$
[Sat May 28 12:10:52 2016] [6924:139872104888192] [debug] jk_child_init::mod_jk.c (3266): Initialized mod_jk/1.2.37
[Sat May 28 12:10:52 2016] [6921:139872104888192] [debug] do_shm_open::jk_shm.c (634): Attached shared memory /var/log/apache2/jk-runtime-status.6917 [5] si$
[Sat May 28 12:10:52 2016] [6921:139872104888192] [debug] do_shm_open_lock::jk_shm.c (430): Duplicated shared memory lock /var/log/apache2/jk-runtime-status$
[Sat May 28 12:10:52 2016] [6921:139872104888192] [debug] jk_child_init::mod_jk.c (3266): Initialized mod_jk/1.2.37
[Sat May 28 12:10:52 2016] [6920:139872104888192] [debug] do_shm_open::jk_shm.c (634): Attached shared memory /var/log/apache2/jk-runtime-status.6917 [6] si$
[Sat May 28 12:10:52 2016] [6920:139872104888192] [debug] do_shm_open_lock::jk_shm.c (430): Duplicated shared memory lock /var/log/apache2/jk-runtime-status$
[Sat May 28 12:10:52 2016] [6920:139872104888192] [debug] jk_child_init::mod_jk.c (3266): Initialized mod_jk/1.2.37
[Sat May 28 12:10:52 2016] [6923:139871894374144] [debug] jk_watchdog_func::mod_jk.c (3200): Watchdog thread initialized with 60 second interval
[Sat May 28 12:10:52 2016] [6922:139871894374144] [debug] jk_watchdog_func::mod_jk.c (3200): Watchdog thread initialized with 60 second interval
[Sat May 28 12:10:52 2016] [6924:139871894374144] [debug] jk_watchdog_func::mod_jk.c (3200): Watchdog thread initialized with 60 second interval
[Sat May 28 12:10:52 2016] [6921:139871894374144] [debug] jk_watchdog_func::mod_jk.c (3200): Watchdog thread initialized with 60 second interval
[Sat May 28 12:10:52 2016] [6920:139871894374144] [debug] jk_watchdog_func::mod_jk.c (3200): Watchdog thread initialized with 60 second interval
[Sat May 28 12:11:38 2016] [6923:139872104888192] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1134): Attempting to map URI '/favicon.ico' from 1 maps
[Sat May 28 12:11:38 2016] [6923:139872104888192] [debug] find_match::jk_uri_worker_map.c (941): Attempting to map context URI '/sample/*=worker1' source 'J$
[Sat May 28 12:11:38 2016] [6923:139872104888192] [debug] jk_translate::mod_jk.c (3743): no match for /favicon.ico found
[Sat May 28 12:11:38 2016] [6923:139872104888192] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1134): Attempting to map URI '/favicon.ico' from 1 maps
[Sat May 28 12:11:38 2016] [6923:139872104888192] [debug] find_match::jk_uri_worker_map.c (941): Attempting to map context URI '/sample/*=worker1' source 'J$
[Sat May 28 12:11:38 2016] [6923:139872104888192] [debug] jk_map_to_storage::mod_jk.c (3818): no match for /favicon.ico found
[Sat May 28 12:11:39 2016] [6933:139872104888192] [debug] do_shm_open::jk_shm.c (634): Attached shared memory /var/log/apache2/jk-runtime-status.6917 [7] si$
[Sat May 28 12:11:39 2016] [6933:139872104888192] [debug] do_shm_open_lock::jk_shm.c (430): Duplicated shared memory lock /var/log/apache2/jk-runtime-status$
[Sat May 28 12:11:39 2016] [6933:139872104888192] [debug] jk_child_init::mod_jk.c (3266): Initialized mod_jk/1.2.37
[Sat May 28 12:11:39 2016] [6933:139871894374144] [debug] jk_watchdog_func::mod_jk.c (3200): Watchdog thread initialized with 60 second interval
[Sat May 28 12:11:53 2016] [6923:139871894374144] [debug] jk_watchdog_func::mod_jk.c (3213): Watchdog thread running
[Sat May 28 12:11:53 2016] [6923:139871894374144] [debug] wc_maintain::jk_worker.c (338): Maintaining worker worker1 |
J'ai sans doute oublié quelque chose mais je ne sais pas où...
Merci d'avance de votre aide.