IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Apache Discussion :

Configuration Apache SSL pour Tomcat


Sujet :

Apache

  1. #21
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    327
    Détails du profil
    Informations personnelles :
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations forums :
    Inscription : Mai 2004
    Messages : 327
    Points : 487
    Points
    487
    Par défaut
    As tu bien chargé le module mod_jk ?

    Il te manque probablement une ligne comme :
    LoadModule jk_module modules/mod_jk-numero_de_version.so

  2. #22
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    C'est officiel je suis BLOND !! tant pis

    Bref...en tout cas, il n'y a plus d'erreur et apache se relance bien... (mais j'ai toujours un problème....) j'ai donc mis :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    LoadModule jk_module modules/mod_jk.so
    LoadModule ssl_module modules/mod_ssl.so
     
    JkWorkersFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/worker.properties"
    JkLogFile "C:/Program Files/Apache Software Foundation/Apache2.2/logs/mod_ssl.log"
    JkLogLevel warning
    JkMount /bodin/* default
    et mon worker.properties :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    ps=/
    worker.list=default
    worker.default.port=8009
    worker.default.host=127.0.0.1
    worker.default.type=ajp13
    worker.default.socket_timeout=0
    worker.default.socket_keepalive=true
    worker.default.retries=4
    En fait je n'accède toujours pas à mon appli TOMCAT en https....
    J'ai pourtant rajouter dans web.xml (dans tomcat/conf) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     
    <security-constraint>
    	<display-name>Security constarint</display-name>
    	<web-resource-collection>
       		<web-resource-name>Automatic SLL Forwarding
       			<url-pattern>/*</url-pattern>
    	</web-resource-collection>
    	<user-data-constraint>
       		<transport-guarantee>CONFIDENTIAL</transport-guarantee>
    	</user-data-constraint>
        </security-constraint>
    Et enfin dans mon server.xml j'ai mis :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    	<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
                     maxThreads="150" scheme="https" secure="true"
                     clientAuth="false" sslProtocol="TLS" />
    Donc lorsque je mets https://localhost/MonAppli ca ne fonctionne pas
    une autre idée ?

  3. #23
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    327
    Détails du profil
    Informations personnelles :
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations forums :
    Inscription : Mai 2004
    Messages : 327
    Points : 487
    Points
    487
    Par défaut
    Je comprends pas...le SSL il est entre ton client (navigateur) et Apache. Ca doit suffire. Est ce que Apache et Tomcat sont sur la même machine ?
    Que disent les logs ?

  4. #24
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    Heuu oui Tomcat et Apache sont installé sur le même ordinateur....

    pour le moment je veux juste voir si ca fonctionne en local (c'est pour ca que j'ai mis 127.0.0.1 partout). Et après je changerai cette adresse pour y accéder depuis l'extérieur...

    Pour les logs je vais voir ca de suite

  5. #25
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    Voilà ce que me disent mes logs :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
     
    [Mon Mar 30 15:37:00 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
    [Mon Mar 30 15:37:00 2009] [warn] RSA server certificate CommonName (CN) `127.0.0.1' does NOT match server name!?
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.loalhost] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.loalhost] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.34 for ServerName
    [Mon Mar 30 15:37:00 2009] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Mon Mar 30 15:37:00 2009] [warn] RSA server certificate CommonName (CN) `127.0.0.1' does NOT match server name!?
    [Mon Mar 30 15:37:00 2009] [notice] Apache/2.2.11 (Win32) mod_jk/1.2.27 mod_ssl/2.2.11 OpenSSL/0.9.8i configured -- resuming normal operations
    [Mon Mar 30 15:37:00 2009] [notice] Server built: Dec 10 2008 00:10:06
    [Mon Mar 30 15:37:00 2009] [notice] Parent: Created child process 4060
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.loalhost] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.loalhost] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.34 for ServerName
    [Mon Mar 30 15:37:01 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
    [Mon Mar 30 15:37:01 2009] [warn] RSA server certificate CommonName (CN) `127.0.0.1' does NOT match server name!?
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.loalhost] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.loalhost] does not exist
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.34 for ServerName
    [Mon Mar 30 15:37:01 2009] [warn] RSA server certificate CommonName (CN) `127.0.0.1' does NOT match server name!?
    [Mon Mar 30 15:37:01 2009] [notice] Child 4060: Child process is running
    [Mon Mar 30 15:37:01 2009] [notice] Child 4060: Acquired the start mutex.
    [Mon Mar 30 15:37:01 2009] [notice] Child 4060: Starting 64 worker threads.
    [Mon Mar 30 15:37:01 2009] [notice] Child 4060: Starting thread to listen on port 443.

  6. #26
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    327
    Détails du profil
    Informations personnelles :
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations forums :
    Inscription : Mai 2004
    Messages : 327
    Points : 487
    Points
    487
    Par défaut
    Là, ta log dit juste que Apache est démarré mais ca ne dit pas pourquoi il ne sert pas ta requête.

    Il faut absolument que tu traces de façon détaillé ce qu'il se passe dans ton serveur au moment ou tu demandes l'URL...sans ça on ne peut pas savoir.

    Regarde par exemple : http://httpd.apache.org/docs/trunk/fr/logs.html

    Le "ca marche pas"...on ne peut rien en tirer. As tu un code http d'erreur ? un 404, 503...?

  7. #27
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    Je viens de changer la version de mon mod_jk et il commence maintenant j'ai une belle erreur 503 !! mais c'est déjà mieux j'ai quelque chose....
    Avant il me mettait juste "page introuvable"

  8. #28
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Pourquoi tu veux changer la version de mod_jk ?

    Y a quoi dans ton fichier server.xml (fichier en entier, stp) ?

    Tu as mis :
    Il faut donc que tu accèdes à ton appli en tapant https://localhost/bodin/

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  9. #29
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    Citation Envoyé par _Mac_ Voir le message
    Pourquoi tu veux changer la version de mod_jk ?
    Parceque j'en avais télécharger une très vielle de 2004... donc j'en ai repris une un peu plus récente (avril 2007)

    Y a quoi dans ton fichier server.xml (fichier en entier, stp) ?
    Voilà mon fichier serveur.xml :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
     
    <?xml version='1.0' encoding='utf-8'?>
    <!--
      Licensed to the Apache Software Foundation (ASF) under one or more
      contributor license agreements.  See the NOTICE file distributed with
      this work for additional information regarding copyright ownership.
      The ASF licenses this file to You under the Apache License, Version 2.0
      (the "License"); you may not use this file except in compliance with
      the License.  You may obtain a copy of the License at
     
          http://www.apache.org/licenses/LICENSE-2.0
     
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    -->
    <!-- Note:  A "Server" is not itself a "Container", so you may not
         define subcomponents such as "Valves" at this level.
         Documentation at /docs/config/server.html
     -->
    <Server port="8005" shutdown="SHUTDOWN">
     
      <!--APR library loader. Documentation at /docs/apr.html -->
      <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
      <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
      <Listener className="org.apache.catalina.core.JasperListener" />
      <!-- JMX Support for the Tomcat server. Documentation at /docs/non-existent.html -->
      <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
      <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
     
      <!-- Global JNDI resources
           Documentation at /docs/jndi-resources-howto.html
      -->
      <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
      </GlobalNamingResources>
     
      <!-- A "Service" is a collection of one or more "Connectors" that share
           a single "Container" Note:  A "Service" is not itself a "Container", 
           so you may not define subcomponents such as "Valves" at this level.
           Documentation at /docs/config/service.html
       -->
      <Service name="Catalina">
     
        <!--The connectors can use a shared executor, you can define one or more named thread pools-->
        <!--
        <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" 
            maxThreads="150" minSpareThreads="4"/>
        -->
     
     
        <!-- A "Connector" represents an endpoint by which requests are received
             and responses are returned. Documentation at :
             Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
             Java AJP  Connector: /docs/config/ajp.html
             APR (HTTP/AJP) Connector: /docs/apr.html
             Define a non-SSL HTTP/1.1 Connector on port 8080
        -->
        <Connector port="8080" protocol="HTTP/1.1" 
                   connectionTimeout="20000" 
                   redirectPort="8443" />
     
        <!-- A "Connector" using the shared thread pool-->
     
        <Connector executor="tomcatThreadPool"
                   port="8080" protocol="HTTP/1.1" 
                   connectionTimeout="20000" 
                   redirectPort="8443" />
     
        <!-- Define a SSL HTTP/1.1 Connector on port 8443
             This connector uses the JSSE configuration, when using APR, the 
             connector should be using the OpenSSL style configuration
             described in the APR documentation -->
     
        	<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
                     maxThreads="150" scheme="https" secure="true"
                     clientAuth="false" sslProtocol="TLS" />
     
        <!-- Define an AJP 1.3 Connector on port 8009 -->
        <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
     
     
        <!-- An Engine represents the entry point (within Catalina) that processes
             every request.  The Engine implementation for Tomcat stand alone
             analyzes the HTTP headers included with the request, and passes them
             on to the appropriate Host (virtual host).
             Documentation at /docs/config/engine.html -->
     
        <!-- You should set jvmRoute to support load-balancing via AJP ie :
        <Engine name="Standalone" defaultHost="localhost" jvmRoute="jvm1">         
        --> 
        <Engine name="Catalina" defaultHost="localhost">
     
          <!--For clustering, please take a look at documentation at:
              /docs/cluster-howto.html  (simple how to)
              /docs/config/cluster.html (reference documentation) -->
          <!--
          <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
          -->        
     
          <!-- The request dumper valve dumps useful debugging information about
               the request and response data received and sent by Tomcat.
               Documentation at: /docs/config/valve.html -->
          <!--
          <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
          -->
     
          <!-- This Realm uses the UserDatabase configured in the global JNDI
               resources under the key "UserDatabase".  Any edits
               that are performed against this UserDatabase are immediately
               available for use by the Realm.  -->
          <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 resourceName="UserDatabase"/>
     
          <!-- Define the default virtual host
               Note: XML Schema validation will not work with Xerces 2.2.
           -->
          <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true"
                xmlValidation="false" xmlNamespaceAware="false">
     
            <!-- SingleSignOn valve, share authentication between web applications
                 Documentation at: /docs/config/valve.html -->
            <!--
            <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
            -->
     
            <!-- Access log processes all example.
                 Documentation at: /docs/config/valve.html -->
            <!--
            <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"  
                   prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/>
            -->
     
          </Host>
        </Engine>
      </Service>
    </Server>
    Tu as mis :
    Il faut donc que tu accèdes à ton appli en tapant https://localhost/bodin/
    Oui exact....et c'est à partir de ce moment là qu'il me met une belle erreure 503 :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    Service Temporarily Unavailable
     
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

  10. #30
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    La conf m'a l'air correcte mais je ne suis pas expert Tomcat

    Donc toujours pareil : logs d'erreur d'Apache et de Tomcat.

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  11. #31
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    Ca ne me réjouit pas d'avance tout ca !! ^^

    En tout cas merci pour l'aide !! je progresse doucement mais (peut-etre) surement !!

  12. #32
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    Bonjour à tous !!

    Donc depuis ce matin j'épluche les logs de tomcat et de apache !!
    Voici mon modssl.log (en rouge la ligne qui a l'air de faire planter...mais je sais pas trop où changer ça !) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    [Tue Mar 31 09:27:10 2009] [1476:3304] [info]  mod_jk.c (2743): mod_jk/1.2.22 initialized
    [Tue Mar 31 09:27:10 2009] [1476:3304] [info]  mod_jk.c (2743): mod_jk/1.2.22 initialized
    [Tue Mar 31 09:27:10 2009] [3336:2004] [info]  mod_jk.c (2743): mod_jk/1.2.22 initialized
    [Tue Mar 31 09:27:11 2009] [3336:2004] [info]  mod_jk.c (2743): mod_jk/1.2.22 initialized
    [Tue Mar 31 09:27:22 2009] [3336:3776] [info]  jk_connect.c (451): connect to 127.0.0.1:8009 failed (errno=61)
    [Tue Mar 31 09:27:22 2009] [3336:3776] [info]  jk_ajp_common.c (876): Failed opening socket to (127.0.0.1:8009) (errno=61)
    [Tue Mar 31 09:27:22 2009] [3336:3776] [info]  jk_ajp_common.c (1273): (default) error connecting to the backend server (errno=61)
    [Tue Mar 31 09:27:22 2009] [3336:3776] [info]  jk_ajp_common.c (1941): (default) sending request to tomcat failed,  recoverable operation attempt=1
    [Tue Mar 31 09:27:23 2009] [3336:3776] [info]  jk_connect.c (451): connect to 127.0.0.1:8009 failed (errno=61)
    [Tue Mar 31 09:27:23 2009] [3336:3776] [info]  jk_ajp_common.c (876): Failed opening socket to (127.0.0.1:8009) (errno=61)
    [Tue Mar 31 09:27:23 2009] [3336:3776] [info]  jk_ajp_common.c (1273): (default) error connecting to the backend server (errno=61)
    [Tue Mar 31 09:27:23 2009] [3336:3776] [info]  jk_ajp_common.c (1941): (default) sending request to tomcat failed,  recoverable operation attempt=2
    [Tue Mar 31 09:27:24 2009] [3336:3776] [info]  jk_connect.c (451): connect to 127.0.0.1:8009 failed (errno=61)
    [Tue Mar 31 09:27:24 2009] [3336:3776] [info]  jk_ajp_common.c (876): Failed opening socket to (127.0.0.1:8009) (errno=61)
    [Tue Mar 31 09:27:24 2009] [3336:3776] [info]  jk_ajp_common.c (1273): (default) error connecting to the backend server (errno=61)
    [Tue Mar 31 09:27:24 2009] [3336:3776] [info]  jk_ajp_common.c (1941): (default) sending request to tomcat failed,  recoverable operation attempt=3
    [Tue Mar 31 09:27:25 2009] [3336:3776] [info]  jk_connect.c (451): connect to 127.0.0.1:8009 failed (errno=61)
    [Tue Mar 31 09:27:25 2009] [3336:3776] [info]  jk_ajp_common.c (876): Failed opening socket to (127.0.0.1:8009) (errno=61)
    [Tue Mar 31 09:27:25 2009] [3336:3776] [info]  jk_ajp_common.c (1273): (default) error connecting to the backend server (errno=61)
    [Tue Mar 31 09:27:25 2009] [3336:3776] [info]  jk_ajp_common.c (1941): (default) sending request to tomcat failed,  recoverable operation attempt=4
    [Tue Mar 31 09:27:25 2009] [3336:3776] [error] jk_ajp_common.c (1953): (default) Connecting to tomcat failed. Tomcat is probably not started or is listening on the wrong port
    [Tue Mar 31 09:27:25 2009] [3336:3776] [info]  mod_jk.c (2254): Service error=0 for worker=default
    Voici mon error.log (mais a part les chemins qu'il ne trouve pas je vois pas d'erreurs... et je sais pas quoi modifier pour enlever ces warning) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
     
    [Tue Mar 31 09:27:10 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.loalhost] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.loalhost] does not exist
    [Tue Mar 31 09:27:10 2009] [notice] Apache/2.2.11 (Win32) mod_jk/1.2.22 mod_ssl/2.2.11 OpenSSL/0.9.8i configured -- resuming normal operations
    [Tue Mar 31 09:27:10 2009] [notice] Server built: Dec 10 2008 00:10:06
    [Tue Mar 31 09:27:10 2009] [notice] Parent: Created child process 3336
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.loalhost] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.loalhost] does not exist
    [Tue Mar 31 09:27:11 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host.loalhost] does not exist
    Warning: DocumentRoot [C:/Program Files/Apache Software Foundation/Apache2.2/docs/dummy-host2.loalhost] does not exist
    [Tue Mar 31 09:27:11 2009] [notice] Child 3336: Child process is running
    [Tue Mar 31 09:27:11 2009] [notice] Child 3336: Acquired the start mutex.
    [Tue Mar 31 09:27:11 2009] [notice] Child 3336: Starting 64 worker threads.
    [Tue Mar 31 09:27:11 2009] [notice] Child 3336: Starting thread to listen on port 443.
    Et du côté de Tomcat il me mets quelques erreurs GRAVE dans le log Catalina (mais je ne sais pas quoi modifier pour ne plus les avoir) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
     
    31 mars 2009 09:27:04 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Java\jdk1.6.0_11\bin
    31 mars 2009 09:27:04 org.apache.coyote.http11.Http11Protocol init
    INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
    31 mars 2009 09:27:04 org.apache.coyote.http11.Http11Protocol init
    GRAVE: Erreur � l'initialisation du point de contact
    java.net.BindException: Address already in use: JVM_Bind<null>:8080
    	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
    	at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
    	at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
    	at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
    	at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
    31 mars 2009 09:27:04 org.apache.catalina.startup.Catalina load
    GRAVE: Catalina.start
    LifecycleException:  L'initialisation du gestionnaire de protocole a �chou�: java.net.BindException: Address already in use: JVM_Bind<null>:8080
    	at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
    	at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
    	at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
    	at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
    31 mars 2009 09:27:04 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 809 ms
    31 mars 2009 09:27:04 org.apache.catalina.core.StandardService start
    INFO: D�marrage du service Catalina
    31 mars 2009 09:27:04 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
    31 mars 2009 09:27:04 org.apache.catalina.startup.HostConfig deployWAR
    INFO: D�ploiement de l'archive bodin.war de l'application web
    31 mars 2009 09:27:04 org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\bodin\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    31 mars 2009 09:27:05 org.apache.catalina.startup.HostConfig deployWAR
    INFO: D�ploiement de l'archive Chateau.war de l'application web
    31 mars 2009 09:27:05 org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Chateau\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    31 mars 2009 09:27:05 org.apache.catalina.startup.HostConfig deployWAR
    INFO: D�ploiement de l'archive Maquette.war de l'application web
    31 mars 2009 09:27:05 org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Maquette\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    31 mars 2009 09:27:05 org.apache.catalina.startup.HostConfig deployWAR
    INFO: D�ploiement de l'archive Maquette3.war de l'application web
    31 mars 2009 09:27:05 org.apache.catalina.startup.HostConfig deployWAR
    INFO: D�ploiement de l'archive Maquette4.war de l'application web
    31 mars 2009 09:27:05 org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Maquette4\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    31 mars 2009 09:27:05 org.apache.catalina.startup.HostConfig deployWAR
    INFO: D�ploiement de l'archive phone.war de l'application web
    31 mars 2009 09:27:05 org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\phone\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    31 mars 2009 09:27:05 org.apache.catalina.startup.HostConfig deployWAR
    INFO: D�ploiement de l'archive test.war de l'application web
    31 mars 2009 09:27:06 org.apache.coyote.http11.Http11Protocol start
    INFO: D�marrage de Coyote HTTP/1.1 sur http-8080
    31 mars 2009 09:27:06 org.apache.coyote.http11.Http11Protocol start
    GRAVE: Erreur au d�marrage du point de contact
    java.net.BindException: Address already in use: JVM_Bind<null>:8080
    	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
    	at org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:519)
    	at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:203)
    	at org.apache.catalina.connector.Connector.start(Connector.java:1131)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:531)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    31 mars 2009 09:27:06 org.apache.catalina.startup.Catalina start
    GRAVE: Catalina.start: 
    LifecycleException:  service.getName(): "Catalina";  Le d�marrage du gestionnaire de protocole a �chou�: java.net.BindException: Address already in use: JVM_Bind<null>:8080
    	at org.apache.catalina.connector.Connector.start(Connector.java:1138)
    	at org.apache.catalina.core.StandardService.start(StandardService.java:531)
    	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    	at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    31 mars 2009 09:27:06 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1934 ms
    Voilà voilà où j'en suis à peu près !! ^^
    Et donc toujours le même problème au final.... :
    - Je me connecte bien à https://localhost
    - mais je n'accède pas à https://localhost/monAppli (j'ai une erreur 503 : Service Temporarily Unavailable)
    - J'ai essayé aussi http://localhost:8080/monAppli pour voir et il me fait la redirection vers https://localhost:8443/monAppli mais ca ne fonctionne pas

    D'autres idées ?

  13. #33
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    J'y connais vraiment rien à Tomcat mais je dirais que ton fichier server.xml contient trop de choses. Je ne sais pas du tout si c'est comme ça qu'il faut faire mais je commenterais les deux <Connector> qui sont sur le port 8080 et celui sur le port 8443 : comme disais tesla, SSL ne doit exister qu'entre Apache et le navigateur, et Apache parle AJP seulement avec Tomcat.

    Ce que je ne comprends pas c'est qu'Apache dit que Tomcat n'écoute pas en AJP sur le port 8009. Je dirais que ça vient du redirectPort="8443" présent dans le Connector AJP. Donc essaie en supprimant ce redirectPort="8443" du Connector AJP écoutant sur le port 8009 :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <Connector port="8009" protocol="AJP/1.3" />

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  14. #34
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    MMMMERRRRRCCCIIIIIIIIIIIIIIIII !!!!!!!

    Heureusement que tu n'y connais rien en Tomcat !!!
    Donc pour faire un résumé pour les prochains....

    Du coté de Apache :
    - Il faut créer un fichier worker.properties à mettre dans apache2/conf
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    ps=/
    worker.list=default
    worker.default.port=8009
    worker.default.host=127.0.0.1  // Ici l'adresse du server
    worker.default.type=ajp13
    worker.default.socket_timeout=0
    worker.default.socket_keepalive=true
    worker.default.retries=4
    - Dans httpd.conf il faut :
    . Mettre un ch'tit "listen 443" pour écouter en mode ssl
    . Décocher/ajouter (ca dépend) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    LoadModule jk_module modules/mod_jk.so
    LoadModule ssl_module modules/mod_ssl.so
     
    JkWorkersFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/worker.properties"
    JkLogFile "C:/Program Files/Apache Software Foundation/Apache2.2/logs/mod_jk.log"
    JkLogLevel warning
    JkMount /monAppli default
    JkMount /monAppli/* default
    . Mettre "ServerName 127.0.0.1" avec le nom du server qui va bien
    . Ajouter les lignes suivantes (une fois le certificat créé) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    <VirtualHost *:443>
    #Activation de SSL, remarquez le nom des fichiers 
            SSLEngine On
            SSLCertificateFile conf/ssl/127.0.0.1.cert
            SSLCertificateKeyFile conf/ssl/127.0.0.1.key
    </VirtualHost>

    Du coté de Tomcat :
    - Il faut mettre ABSOLUMENT (merci Mac ) en commentaires les lignes connector pour le port 8080 et 8443 dans le fichier server.xml (Tomcat/conf) :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     
    <!--
        <Connector port="8080" protocol="HTTP/1.1" 
                   connectionTimeout="20000" 
                   redirectPort="8443" />
        -->
     
        <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
                   maxThreads="150" scheme="https" secure="true"
                   clientAuth="false" sslProtocol="TLS" />
        -->
    - Enlever le redirectPort=8443 dans la ligne suivante :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <Connector port="8009" protocol="AJP/1.3"/>
    - J'ai aussi ajouté dans web.xml (tomcat/conf) les lignes suivantes :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
     
        <security-constraint>
    	<display-name>Security constarint</display-name>
    	<web-resource-collection>
       		<web-resource-name>Automatic SLL Forwarding</web-resource-name>
       			<url-pattern>/*</url-pattern>
    	</web-resource-collection>
    	<user-data-constraint>
       		<transport-guarantee>CONFIDENTIAL</transport-guarantee>
    	</user-data-constraint>
        </security-constraint>
    Voilou voilou !! Merci beaucoup à ceux qui m'ont aidés et merci Mac

    Si j'ai d'autres problèmes je ferai un autre post !! Je considère celui-ci résolu
    Ciao

  15. #35
    Membre confirmé
    Profil pro
    Inscrit en
    Mai 2004
    Messages
    327
    Détails du profil
    Informations personnelles :
    Localisation : France, Bouches du Rhône (Provence Alpes Côte d'Azur)

    Informations forums :
    Inscription : Mai 2004
    Messages : 327
    Points : 487
    Points
    487
    Par défaut
    Ah ben c'est cool si ca marche.
    Un truc : je * devine * que l'erreur de demarrage dans ton Tomcat vient du fait qu'il y a 2 connecteurs qui sont déclarés sur le port 8080. Surtout celui la : tomcatThreadPool.

    Quand tu as mis en commentaire le connecteur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000"  redirectPort="8443" />
    Ca a résolu ton problème car alors il n'y avait plus que le tomcatThreadPool qui ecoute sur le port 8080. Mais en faisant ça tu n'a plus acces au Tomcat Manager.
    Change le port d'ecoute du connecteur tomcatThreadPool (8081 par exemple) et tu dois pouvoir remettre les autres lignes comme avant.

  16. #36
    Membre habitué Avatar de Furlaz
    Homme Profil pro
    Responsable Qualité
    Inscrit en
    Mai 2006
    Messages
    210
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Loire Atlantique (Pays de la Loire)

    Informations professionnelles :
    Activité : Responsable Qualité
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Mai 2006
    Messages : 210
    Points : 131
    Points
    131
    Par défaut
    Citation Envoyé par tesla Voir le message
    Change le port d'ecoute du connecteur tomcatThreadPool (8081 par exemple) et tu dois pouvoir remettre les autres lignes comme avant.
    Effectivement ...
    J'ai mis 8081 pour le tomcatThreadPool
    J'ai décommenté le port 8080
    Mais il a fallu laisser en commentaire le port 8443 (ce qui parait logique puisque je passe par apache pour le mode sécurisé non ?)

    Enfin bref !! Merci beaucoup Tesla

    --> Problème toujours Résolu (mais encore mieux qu'avant ^^)

+ Répondre à la discussion
Cette discussion est résolue.
Page 2 sur 2 PremièrePremière 12

Discussions similaires

  1. Apache thread pour Tomcat
    Par totoche dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 12/11/2011, 12h14
  2. Réponses: 4
    Dernier message: 08/07/2010, 16h17
  3. configurer ssl pour apache (lampp)
    Par lizardman dans le forum Apache
    Réponses: 3
    Dernier message: 21/05/2008, 13h30
  4. [REDHAT] Configuration de yum pour installer apache
    Par sbelli dans le forum RedHat / CentOS / Fedora
    Réponses: 3
    Dernier message: 25/08/2006, 17h39
  5. [EasyPHP] Configurer Apache pour des accées distants
    Par Fathallah dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 3
    Dernier message: 09/03/2006, 19h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo