Manager app text mode refuses to deploy

2018-04-05 Thread Daryl Stultz
Hello,


We are upgrading from Tomcat 6 to tomcat8-8.5.23. We deploy our apps by 
preparing the fully exploded and configured directory in place under 
.../webapps/. autoDeploy of apps is false. We never use war files.


After the app is staged we use the manager app to deploy it. This involves an 
HTTP GET call to http://localhost:8080/manager/text/deploy?path=/my-app


This is the way we have done it for years on Tomcat 6. We've been attempting 
for hours to find some combination that yields something other than:


AIL - Invalid parameters supplied for command [/deploy]


Finally we got this pattern to work: stage the application under /tmp/my-app 
rather than .../webapps/. Then deploy it like this:


http://localhost:8080/manager/text/deploy?war=file:/tmp/my-app/&path=/my-app


The critical point is that the war path, when it refers to a directory rather 
than a war file must end in a trailing slash. This is not in the documentation 
here: 
https://tomcat.apache.org/tomcat-8.5-doc/manager-howto.html#Deploy_a_Directory_or_WAR_by_URL


Now when we go to undeploy it like so:


http://localhost:8080/manager/text/undeploy?path=/my-app


Tomcat crashes and exits with this:


AIL - Encountered exception [javax.management.InstanceNotFoundException: 
Catalina:type=Deployer,host=localhost]


Rather than spend more hours on this I'm hoping someone can tell me the right 
technique for undeploying. Thanks.


Here's the traceback:


05-Apr-2018 16:49:24.442 INFO [http-nio-8080-exec-1] 
org.apache.catalina.core.ApplicationContext.log Manager: undeploy:Undeploying 
web application at '/das-qa-java8' 05-Apr-2018 16:49:24.847 SEVERE 
[http-nio-8080-exec-1] org.apache.catalina.core.ApplicationContext.log Manager: 
ManagerServlet.undeploy[/das-qa-java8] 
javax.management.InstanceNotFoundException: 
Catalina:type=Deployer,host=localhost at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
 at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:816)
 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at 
org.apache.catalina.manager.ManagerServlet.removeServiced(ManagerServlet.java:1530)
 at 
org.apache.catalina.manager.ManagerServlet.undeploy(ManagerServlet.java:1440) 
at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:364) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at 
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:595)
 at 
org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
 at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52) 
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) 
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) 
at 
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) 
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) 
at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
 at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
 at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
 at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run

users@tomcat.apache.org

2018-04-05 Thread Philip Rego
Ah sorry I dont know why I didn't look at the logs. Thank you for helping

On Thu, Apr 5, 2018, 3:55 PM Mark Thomas  wrote:

> On 05/04/18 20:46, Mark Thomas wrote:
>
> 
>
> > Looking.
> >
> > You need to remove conf/Catalina/localhost/context.xml
> > It would help if everything under work was world writeable as well.
>
> It is fixed but I can't start tomcat properly as the temp user due to
> file permissions.
>
> Tomcat is currently stopped. You may need to do the following
>
> cd /opt/tomcat
> rm -rf work/*
> rm -rf conf/Catalina/localhost/*
>
> I'm guessing you didn't look at the logs. All the information you needed
> was there. The very first exception was:
>
> org.apache.tomcat.util.digester.Digester.fatalError Parse Fatal Error at
> line 1 column 36: Element type "xml" must be followed by either
> attribute specifications, ">" or "/>".
>
>
> You had this at the start of tomcat-users.xml:
> 
>
> You should have had this:
> 
>
> (look at the second character)
>
> Mark
>
>
>
> >
> > Mark
> >
> >
> >>
> >> On Thu, Apr 5, 2018 at 10:54 AM, Christopher Schultz
> >> mailto:ch...@christopherschultz.net>>
> wrote:
> >>
> >> Philip,
> >>
> >> On 4/5/18 12:37 AM, Philip Rego wrote:
> >>> http://24.0.5.14:8081/manager/html
> >> 
> >>
> >> Reach? Yes. Login? No.
> >>
> >>> *tomcat-users.xml*
> >>> http://tomcat.apache.org/xml <
> http://tomcat.apache.org/xml>"
> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> >> "
> >>> xsi:schemaLocation="http://tomcat.apache.org/xml <
> http://tomcat.apache.org/xml>
> >> tomcat-users.xsd"
> >>> version="1.0">   >>> username="tomcat" password="s3cret" roles="manager-gui"/>  >>> rolename="tomcat"/>   >>> rolename="manager-gui"/>  >>> roles="manager-gui"/>  >>> roles="standard,manager-gui,tomcat,manager-script,manager-script"/>
> >>
> >>
> >> 
> >>> 
> >>> 
> >>
> >> I tried users "tomcat" and "hello". Your file looks okay to me.
> >>
> >>> Why can't I log in? I get a 401 error when I try with any these
> >>> users. Do I have them set correctly? The 401 error said I can get
> >>> access by adding the user "tomcat" like I so. I also read the
> >>> documentation
> >>
> >>  >> 
> >> lication_Access>
> >>
> >>
> >> but
> >>> I must not understand. I tried running tomcat on my windows
> >>> computer and got a similar 403 error. I originally had this issue
> >>> when I was trying to integrate my Spring Boot app in Jenkins and
> >>> got error
> >>
> >>> org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
> >>
> >>
> >> The username and password you provided are not correct (error 401).
> >>
> >>> (I know it's not safe giving out passwords like this but there's
> >>> nothing on the machine I care about, and want to have the issue
> >>> resolved)
> >>
> >> My guess is that one or more of the following is true:
> >>
> >> 1. The tomcat-users.xml file isn't in your CATALINA_BASE/conf/ directory
> >>
> >> 2. Your CATALINA_BASE/conf/server.xml does not have a  in it
> >> for MemoryUserDatabaseFactory
> >>
> >> 3. Your Manager application doesn't have a  configured
> >>
> >> Can you confirm all of the above?
> >>
> >> -chris
> >>
> >>
>  -
> >> 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
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
>
>


users@tomcat.apache.org

2018-04-05 Thread Mark Thomas
On 05/04/18 20:46, Mark Thomas wrote:



> Looking.
> 
> You need to remove conf/Catalina/localhost/context.xml
> It would help if everything under work was world writeable as well.

It is fixed but I can't start tomcat properly as the temp user due to
file permissions.

Tomcat is currently stopped. You may need to do the following

cd /opt/tomcat
rm -rf work/*
rm -rf conf/Catalina/localhost/*

I'm guessing you didn't look at the logs. All the information you needed
was there. The very first exception was:

org.apache.tomcat.util.digester.Digester.fatalError Parse Fatal Error at
line 1 column 36: Element type "xml" must be followed by either
attribute specifications, ">" or "/>".


You had this at the start of tomcat-users.xml:


You should have had this:


(look at the second character)

Mark



> 
> Mark
> 
> 
>>
>> On Thu, Apr 5, 2018 at 10:54 AM, Christopher Schultz
>> mailto:ch...@christopherschultz.net>> wrote:
>>
>> Philip,
>>
>> On 4/5/18 12:37 AM, Philip Rego wrote:
>>> http://24.0.5.14:8081/manager/html
>> 
>>
>> Reach? Yes. Login? No.
>>
>>> *tomcat-users.xml*
>>> http://tomcat.apache.org/xml 
>>> "
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
>> "
>>> xsi:schemaLocation="http://tomcat.apache.org/xml 
>>> 
>> tomcat-users.xsd"
>>> version="1.0">  >> username="tomcat" password="s3cret" roles="manager-gui"/> >> rolename="tomcat"/>  >> rolename="manager-gui"/> >> roles="manager-gui"/> >> roles="standard,manager-gui,tomcat,manager-script,manager-script"/>
>>
>>
>> 
>>> 
>>> 
>>
>> I tried users "tomcat" and "hello". Your file looks okay to me.
>>
>>> Why can't I log in? I get a 401 error when I try with any these
>>> users. Do I have them set correctly? The 401 error said I can get
>>> access by adding the user "tomcat" like I so. I also read the
>>> documentation
>>
>> > 
>> lication_Access>
>>
>>
>> but
>>> I must not understand. I tried running tomcat on my windows
>>> computer and got a similar 403 error. I originally had this issue
>>> when I was trying to integrate my Spring Boot app in Jenkins and
>>> got error
>>
>>> org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
>>
>>
>> The username and password you provided are not correct (error 401).
>>
>>> (I know it's not safe giving out passwords like this but there's
>>> nothing on the machine I care about, and want to have the issue
>>> resolved)
>>
>> My guess is that one or more of the following is true:
>>
>> 1. The tomcat-users.xml file isn't in your CATALINA_BASE/conf/ directory
>>
>> 2. Your CATALINA_BASE/conf/server.xml does not have a  in it
>> for MemoryUserDatabaseFactory
>>
>> 3. Your Manager application doesn't have a  configured
>>
>> Can you confirm all of the above?
>>
>> -chris
>>
>> -
>> 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
>>
> 
> 
> -
> 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



users@tomcat.apache.org

2018-04-05 Thread Mark Thomas
On 05/04/18 19:55, Philip Rego wrote:
> @ch...@christopherschultz.net 
> 1. $ ls $CATALINA_BASE
> bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp 
> webapps  work
> 
> When I run startup.sh it shows this:
> $ $CATALINA_BASE/bin/startup.sh
> Using CATALINA_BASE:   /opt/tomcat
> Using CATALINA_HOME:   /opt/tomcat
> Using CATALINA_TMPDIR: /opt/tomcat/temp
> Using JRE_HOME:/usr/
> Using CLASSPATH: 
>  /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
> Tomcat started.
> 
> I have the variables set in .bashrc, but I'm not sure if there's another
> way I need to set them. 
> 
> 2. $ cat $CATALINA_BASE/conf/server.xml
> 
> 
> ...
>   
>type="org.apache.catalina.UserDatabase"
>   description="User database that can be updated and saved"
>   factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>   pathname="tomcat-users.xml" />
>   
> ...
> I changed the path from "conf/tomcat-users.xml"  to just
> "tomcat-users.xml" because it's already in the conf folder but it didn't
> seem to make a difference. 
> 
> 3.  
> ...
>   
> resourceName="UserDatabase"/>
>   
> ...
> 
> Don't know to much about Realms but it seems to be ok with the default
> values. 
> 
> 4. I've been restarting my server and running shutdown.sh startup.sh often. 
> 
> Thank you for the responses but I still can't figure out what's wrong.
> Let me know if you have any more suggestions. If you want to look for
> yourself you can log in with
> ssh temp@24.0.5.14 
> s3cret
> cd /opt/tomcat

Looking.

You need to remove conf/Catalina/localhost/context.xml
It would help if everything under work was world writeable as well.

Mark


> 
> On Thu, Apr 5, 2018 at 10:54 AM, Christopher Schultz
> mailto:ch...@christopherschultz.net>> wrote:
> 
> Philip,
> 
> On 4/5/18 12:37 AM, Philip Rego wrote:
>> http://24.0.5.14:8081/manager/html
> 
> 
> Reach? Yes. Login? No.
> 
>> *tomcat-users.xml*
>> http://tomcat.apache.org/xml 
>> "
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
> "
>> xsi:schemaLocation="http://tomcat.apache.org/xml 
>> 
> tomcat-users.xsd"
>> version="1.0">  > username="tomcat" password="s3cret" roles="manager-gui"/> > rolename="tomcat"/>  > rolename="manager-gui"/> > roles="manager-gui"/> > roles="standard,manager-gui,tomcat,manager-script,manager-script"/>
> 
> 
> 
>> 
>> 
> 
> I tried users "tomcat" and "hello". Your file looks okay to me.
> 
>> Why can't I log in? I get a 401 error when I try with any these
>> users. Do I have them set correctly? The 401 error said I can get
>> access by adding the user "tomcat" like I so. I also read the
>> documentation
> 
>  
> lication_Access>
> 
> 
> but
>> I must not understand. I tried running tomcat on my windows
>> computer and got a similar 403 error. I originally had this issue
>> when I was trying to integrate my Spring Boot app in Jenkins and
>> got error
> 
>> org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
> 
> 
> The username and password you provided are not correct (error 401).
> 
>> (I know it's not safe giving out passwords like this but there's
>> nothing on the machine I care about, and want to have the issue
>> resolved)
> 
> My guess is that one or more of the following is true:
> 
> 1. The tomcat-users.xml file isn't in your CATALINA_BASE/conf/ directory
> 
> 2. Your CATALINA_BASE/conf/server.xml does not have a  in it
> for MemoryUserDatabaseFactory
> 
> 3. Your Manager application doesn't have a  configured
> 
> Can you confirm all of the above?
> 
> -chris
> 
> -
> 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
> 


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



users@tomcat.apache.org

2018-04-05 Thread Philip Rego
 @ch...@christopherschultz.net
1. $ ls $CATALINA_BASE
bin  conf  lib  LICENSE  logs  NOTICE  RELEASE-NOTES  RUNNING.txt  temp
webapps  work

When I run startup.sh it shows this:
$ $CATALINA_BASE/bin/startup.sh
Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:/usr/
Using CLASSPATH:
 /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.

I have the variables set in .bashrc, but I'm not sure if there's another
way I need to set them.

2. $ cat $CATALINA_BASE/conf/server.xml


...
  

  
...
I changed the path from "conf/tomcat-users.xml"  to just "tomcat-users.xml"
because it's already in the conf folder but it didn't seem to make a
difference.

3.  
...
  

  
...

Don't know to much about Realms but it seems to be ok with the default
values.

4. I've been restarting my server and running shutdown.sh startup.sh often.

Thank you for the responses but I still can't figure out what's wrong. Let
me know if you have any more suggestions. If you want to look for yourself
you can log in with
ssh temp@24.0.5.14
s3cret
cd /opt/tomcat

On Thu, Apr 5, 2018 at 10:54 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> Philip,
>
> On 4/5/18 12:37 AM, Philip Rego wrote:
> > http://24.0.5.14:8081/manager/html
>
> Reach? Yes. Login? No.
>
> > *tomcat-users.xml*
> > http://tomcat.apache.org/xml";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
> > version="1.0">   > username="tomcat" password="s3cret" roles="manager-gui"/>  > rolename="tomcat"/>   > rolename="manager-gui"/>  > roles="manager-gui"/>  > roles="standard,manager-gui,tomcat,manager-script,manager-script"/>
> >
> >
> 
> > 
> > 
>
> I tried users "tomcat" and "hello". Your file looks okay to me.
>
> > Why can't I log in? I get a 401 error when I try with any these
> > users. Do I have them set correctly? The 401 error said I can get
> > access by adding the user "tomcat" like I so. I also read the
> > documentation
> >  lication_Access>
> >
> >
> but
> > I must not understand. I tried running tomcat on my windows
> > computer and got a similar 403 error. I originally had this issue
> > when I was trying to integrate my Spring Boot app in Jenkins and
> > got error
> >
> > org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
> >
> >
> The username and password you provided are not correct (error 401).
> >
> > (I know it's not safe giving out passwords like this but there's
> > nothing on the machine I care about, and want to have the issue
> > resolved)
>
> My guess is that one or more of the following is true:
>
> 1. The tomcat-users.xml file isn't in your CATALINA_BASE/conf/ directory
>
> 2. Your CATALINA_BASE/conf/server.xml does not have a  in it
> for MemoryUserDatabaseFactory
>
> 3. Your Manager application doesn't have a  configured
>
> Can you confirm all of the above?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrGOKYACgkQHPApP6U8
> pFh/RBAAq7PwPcwQ9HjBLne2qf5K1WJBO7gVSBUsJ9nVlkcgwnnlJhN4bI9tW69G
> vuovsDZKuWPYNrh/1IqNjJ9DUxrO7bitO07AOJRpQcKsdtYeLx6k6xMdBj4bi/Vr
> ysHm41pv6rT0YxAN3oBUaDWbG32CNIhKz6LOos1iKJ7/k4OH5KJsUy4pXDce2Rop
> ybP7iuB8bmrx7TYHlKrtoNCUAQs0ah+0xlQ7kmrzgVKHhotKjukCmMLifaYZ823A
> 7HI4x/XF3xx202dSuUx7OMwBNlDcU8SOEt/cXsU1bRVUfeRK/tm1RVogoe2+hDZW
> eIIpdnPnpsJaMp5FpBaS+VybHwjKfZyfY4rCl2q1lF3bRPDP6b9Xzu67+C6z0pnU
> 6LD4IKxIVMrPSwk3aTLcfrSvmUPla2nWV1Mp/KOl1QacQsBHW5LWA/Z+EAV6BaOU
> foG+V7ICdEWri4G1x6uAlFgbfgQe+1nIfUpJ+8dpI0uW9wY56nMzKHF3Hj65KkBq
> yOT00WxPLwhlNGre5dDLeoeN8i6ft9lxKvt+W1b58H9whySmhL2xULPIW9oPk1I2
> Ua3Z17JkQSJKcX2EONW/T4vwGhhRFEXMmcge3tMWlpB4jch7CXJ5zFgUHzn2UB1R
> NHLCtnxgTEJ2s6clckxuR+jMNl0+mktTcnGTUadpc6Cw0/hWvSg=
> =3lRR
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>




  
  
  
  
  
  
  
  

  
  


  

  
  























  
  

  
  


  

  







  

  


http://tomcat.apache.org/xml";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
  version="1.0">
  
  
  
  
   

  
  
  
  


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

Re: Is LDAP connection failing?

2018-04-05 Thread Luis Rodríguez Fernández
Hello Suvendu,

May I ask you to share your JNDIRealm configuration?

For me something like this works:

 

Hope it helps,

Luis








2018-04-05 15:32 GMT+02:00 Suvendu Sekhar Mondal :

> Hello Everyone,
>
> Recently in one of our environments I am seeing following log in
> Catalina.out. It seems that LDAP connection is failing. This issue is
> sporadic and goes away with Tomcat recycle.
>
> One interesting thing is "localhost:389" part. I could not find out
> any configuration related to that. It could happen that I am not
> looking at the correct place.
>
> We have 200+ JVMs out there which were starting up simultaneously but
> this happens for some of them sporadically. I suspect that some race
> condition might be causing this failure but could not found any
> evidence so far. Can someone please suggest how can I identify what is
> failing? and why it is failing?
>
> Thanks!
> Suvendu
>
> Stack trace:
> 2018-04-02 20:34:27,293 INFO org.apache.catalina.startup.HostConfig -
> Deploying web application directory D:\xxx\webapps\ROOT
> 2018-04-02 20:34:33,341 SEVERE org.apache.catalina.realm.CombinedRealm
> - Failed to start "org.apache.catalina.realm.JNDIRealm/1.0" realm
> org.apache.catalina.LifecycleException: Failed to start component
> [Realm[JNDIRealm]]
>  at org.apache.catalina.util.LifecycleBase.start(
> LifecycleBase.java:154)
>  at org.apache.catalina.realm.CombinedRealm.startInternal(
> CombinedRealm.java:201)
>  at org.apache.catalina.util.LifecycleBase.start(
> LifecycleBase.java:150)
>  at org.apache.catalina.core.StandardContext.startInternal(
> StandardContext.java:5373)
>  at org.apache.catalina.util.LifecycleBase.start(
> LifecycleBase.java:150)
>  at org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java:901)
>  at org.apache.catalina.core.ContainerBase.addChild(
> ContainerBase.java:877)
>  at org.apache.catalina.core.StandardHost.addChild(
> StandardHost.java:649)
>  at org.apache.catalina.startup.HostConfig.deployDirectory(
> HostConfig.java:1247)
>  at org.apache.catalina.startup.HostConfig$DeployDirectory.
> run(HostConfig.java:1898)
>  at java.util.concurrent.Executors$RunnableAdapter.
> call(Executors.java:511)
>  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>  at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
> Caused by: org.apache.catalina.LifecycleException: Exception opening
> directory server connection
>  at org.apache.catalina.realm.JNDIRealm.startInternal(
> JNDIRealm.java:2191)
>  at org.apache.catalina.util.LifecycleBase.start(
> LifecycleBase.java:150)
>  ... 14 more
> Caused by: javax.naming.CommunicationException: localhost:389 [Root
> exception is java.net.ConnectException: Connection refused: connect]
>  at com.sun.jndi.ldap.Connection.(Connection.java:216)
>  at com.sun.jndi.ldap.LdapClient.(LdapClient.java:137)
>  at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1614)
>  at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2746)
>  at com.sun.jndi.ldap.LdapCtx.(LdapCtx.java:319)
>  at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(
> LdapCtxFactory.java:70)
>  at javax.naming.spi.NamingManager.getInitialContext(
> NamingManager.java:684)
>  at javax.naming.InitialContext.getDefaultInitCtx(
> InitialContext.java:313)
>  at javax.naming.InitialContext.init(InitialContext.java:244)
>  at javax.naming.InitialContext.(InitialContext.java:216)
>  at javax.naming.directory.InitialDirContext.(
> InitialDirContext.java:101)
>  at org.apache.catalina.realm.JNDIRealm.open(JNDIRealm.java:2108)
>  at org.apache.catalina.realm.JNDIRealm.startInternal(
> JNDIRealm.java:2189)
>  ... 15 more
> Caused by: java.net.ConnectException: Connection refused: connect
>  at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
>  at java.net.AbstractPlainSocketImpl.doConnect(
> AbstractPlainSocketImpl.java:350)
>  at java.net.AbstractPlainSocketImpl.connectToAddress(
> AbstractPlainSocketImpl.java:206)
>  at java.net.AbstractPlainSocketImpl.connect(
> AbstractPlainSocketImpl.java:188)
>  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
>  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>  at java.net.Socket.connect(Socket.java:589)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:62)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498)
>  at com.sun.jndi.ldap.Connection.createSocket(Connection.java:350)
>  at com.sun.jndi.ldap.Connection.(Connection.java:203)
>  .

RE: tomcat

2018-04-05 Thread Cheltenham, Chris
Certainly,

I took this from digital oceans posted web page on how to.
I am not sure what the umask is doing there either but it doesn't keep 
tomcat from functioning.
I also tried to run this as a non-root user but I was overruled by 
management for the time being.


# Systemd unit file for tomcat
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target

[Service]
Type=forking

Environment=JAVA_HOME=/opt/java
Environment=CATALINA_PID=/opt/apache-tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/apache-tomcat
Environment=CATALINA_BASE=/opt/apache-tomcat
Environment=CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC 
-Djava.net.preferIPv4Stack=true
Environment=JAVA_OPTS=-Dlog4j.configurationFile=/etc/cas/log4j2.xml 
-Djava.awt.headless=true 
 -Djava.security.egd=file:/dev/./urandom

ExecStart=/opt/apache-tomcat/bin/catalina.sh start
ExecStop=/opt/apache-tomcat/bin/catalina.sh stop

User=root
Group=root
UMask=0007
RestartSec=15
Restart=always

[Install]
WantedBy=multi-user.target

===

Thank You;

Chris Cheltenham
Technology Services
The School District of Philadelphia

Work # 215-400-5025
Cell # 215-301-6571


-Original Message-
From: Christopher Schultz 
Sent: Thursday, April 5, 2018 12:45 PM
To: users@tomcat.apache.org
Subject: Re: tomcat

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris,

On 4/5/18 11:13 AM, Cheltenham, Chris wrote:
> Thanks for answering. It's not a big problem just a bit annoying.
>
> I created a system service. Maybe I did not format it correctly.
>
> What [I] generally do is stop tomcat #systemctl stop tomcat And then
> blow out the /opt/apache-tomcat/logs files.

That should be safe.

> Then restart it as #systemctl start tomcat.

So should that.

> Sometimes it starts but there are not files in /opt/apache-tomcat/logs
> As soon as I see that I stop it and start it again.
>
> I delete the logs so I have less minutia to parse through.

Maybe your system service is doing something unexpected. Could you post what 
you've got?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrGUp8ACgkQHPApP6U8
pFhZ6A//Q4hYSS3+VKcLK0H3q7hOymf5mhE1+iSvhz7p22dCVy8VSMVtbroxTgtK
nvcfQ5ytcFgcleNmp2Oj7y96Ab5sxdh+MsA0JuC5Oq3sA1hoOSL/iR+CCZa4VOAZ
RF5EVJorXbPm+KunvqjkdFwIu/1M+k3a/jmJQgxqRGKrZ/5TfV+BHkbEUkdz06d8
OLkMSROd28hvbkwMozvLRwAK8JJRgfNWiK60PF7OXNW4uydxG5RXm0Sb5gpRXGxj
I9YRU9jStFpfnKSQtnR+UeMrzUdPTB9hodu4M945M5Prmtlo2E3V5okDu7f6bv+v
OS991/wxf9xqTitBn/DCCa4jrabKRaOlncDW8L2efmR2P1PnECb9TBmwE6dEFTRO
0HdnFswdgKTal9+re5dRQ0kapjuroN1WRztLlKUa1r4S0C9Tstb87+hvnnhrFhd3
1rE1zmAxZboHlFRhsZKQjlqdKefZReFUf4CXcH6/WKzimupZFBPfOQMdCRNeTkKX
IcPxzLPAWHKhf6TKJZoa/xEes1n734cBs4NCq/k5ftexoNxV6TqD+SgfCh8j1H9/
ZNprsKcNyG28tzIou3eo7D4V1/wLiFzixhgwarT3fo4Esw29KHbJQA8ts4O/qehv
xZBiMc8piQTY3IN4U3TAufP03nZqzKFuAtdRUqKQ58VvEv2bZYI=
=7K9X
-END PGP SIGNATURE-

-
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: tomcat

2018-04-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris,

On 4/5/18 11:13 AM, Cheltenham, Chris wrote:
> Thanks for answering. It's not a big problem just a bit annoying.
> 
> I created a system service. Maybe I did not format it correctly.
> 
> What [I] generally do is stop tomcat #systemctl stop tomcat And
> then blow out the /opt/apache-tomcat/logs files.

That should be safe.

> Then restart it as #systemctl start tomcat.

So should that.

> Sometimes it starts but there are not files in
> /opt/apache-tomcat/logs As soon as I see that I stop it and start
> it again.
> 
> I delete the logs so I have less minutia to parse through.

Maybe your system service is doing something unexpected. Could you
post what you've got?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrGUp8ACgkQHPApP6U8
pFhZ6A//Q4hYSS3+VKcLK0H3q7hOymf5mhE1+iSvhz7p22dCVy8VSMVtbroxTgtK
nvcfQ5ytcFgcleNmp2Oj7y96Ab5sxdh+MsA0JuC5Oq3sA1hoOSL/iR+CCZa4VOAZ
RF5EVJorXbPm+KunvqjkdFwIu/1M+k3a/jmJQgxqRGKrZ/5TfV+BHkbEUkdz06d8
OLkMSROd28hvbkwMozvLRwAK8JJRgfNWiK60PF7OXNW4uydxG5RXm0Sb5gpRXGxj
I9YRU9jStFpfnKSQtnR+UeMrzUdPTB9hodu4M945M5Prmtlo2E3V5okDu7f6bv+v
OS991/wxf9xqTitBn/DCCa4jrabKRaOlncDW8L2efmR2P1PnECb9TBmwE6dEFTRO
0HdnFswdgKTal9+re5dRQ0kapjuroN1WRztLlKUa1r4S0C9Tstb87+hvnnhrFhd3
1rE1zmAxZboHlFRhsZKQjlqdKefZReFUf4CXcH6/WKzimupZFBPfOQMdCRNeTkKX
IcPxzLPAWHKhf6TKJZoa/xEes1n734cBs4NCq/k5ftexoNxV6TqD+SgfCh8j1H9/
ZNprsKcNyG28tzIou3eo7D4V1/wLiFzixhgwarT3fo4Esw29KHbJQA8ts4O/qehv
xZBiMc8piQTY3IN4U3TAufP03nZqzKFuAtdRUqKQ58VvEv2bZYI=
=7K9X
-END PGP SIGNATURE-

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



RE: tomcat

2018-04-05 Thread Cheltenham, Chris
Chris,

Thanks for answering.
It's not a big problem just a bit annoying.

I created a system service.
Maybe I did not format it correctly.

What si generally do is stop tomcat
#systemctl stop tomcat
And then blow out the /opt/apache-tomcat/logs files.

Then restart it as
#systemctl start tomcat.

Sometimes it starts but there are not files in /opt/apache-tomcat/logs
As soon as I see that I stop it and start it again.

I delete the logs so I have less minutia to parse through.



===

Thank You;

Chris Cheltenham
Technology Services
The School District of Philadelphia

Work # 215-400-5025
Cell # 215-301-6571


-Original Message-
From: Christopher Schultz 
Sent: Thursday, April 5, 2018 10:58 AM
To: users@tomcat.apache.org
Subject: Re: tomcat

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris,

On 4/5/18 9:08 AM, Cheltenham, Chris wrote:
> There is a behavior I see in tomcat at times which is puzzling to me.
>
> Sometimes when I start up tomcat it doesn’t log anything.

To which files? Any of them?

> Maybe I am restarting it too fast?

Possibly. How are you restarting it?

> I don’t have any other symptoms to report other than sometimes when a
> start tomcat it does not log anything.
>
> Does anyone know why that happens?

My guess is that your restart process somehow rotates the file(s) you are 
expecting out of the way (or deletes them) but the new process has already 
started logging to them, so it looks like nothing is happening.

On *NIX systems, processes will happily continue to write to deleted files 
and the data basically never makes it to the disk. (Actually, it does make 
it to the disk, but no other process can reasonably read that data).

Another possibility is that Tomcat is basically not starting, due to e.g. a 
port conflict. When this happens, Tomcat logs a small amount and shuts down. 
But in that case, you'd be saying "Tomcat does not start up again" so that's 
probably not the case, here.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrGOXQACgkQHPApP6U8
pFh7lQ/5AYCBtjfuj4qUpblWv6HqkrseMBpF9Anc2dP8wm7Q2A2Wp7WT/SMciyw+
1V+YEQRHDwPlPpjFVfXa2zxvYcSz8uqTK8okvwwXd8nApS59T9TAG2vtwbZtt5lH
HOrU/qin1JCm3L03OB5iumMVYJit5Fr/NKEULHQewk/FVV+8zCDeRFXw0DXg2I64
Tq9CvNpAaGSqWZ8FAxMe57unX3XayTiMtTf3muYCZqFk0kDCoXhrvDVMm2F2Kf/p
k2GR/sbgiHVDdvqUZcMveoTyWlXhiqnYBQziLtMhglsqOkGcG4ijNNW+dFvNhCbK
g9LU8ptxug/We3xJqmfq6jJlGThl9/KAQfFb3kwi5OPnrEsMPCCbv8Kg5XtaCgPW
pr1JniRIoZpSeO0DNa2T3vXzZ4IlJ1Xeh4+gPfIBUoDOGwoxQrhyAjG1KYLPyc9G
QnBN7z9PglRSJ88g3F1dJShAj/unN6x5WjzAPuer7BRjX4/CiXn+2I1HwbP6E2q3
fSlIFugUCm2fQ5LvolhRCcMVr98fhCIqISBC77fA7vbLr9djVgLVqpXL1aCJg4Zj
R7l8wngDRIdBXFghjWFiAIbZtx1IifKUfFOYkWpM4Y2nfa3rPBkjF6bF+18tapyY
6GFEoyvPGC50yt2YhwqyLPTpLl8bYI8KZQevDvKlFbCuAPKnHOw=
=yE/b
-END PGP SIGNATURE-

-
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



users@tomcat.apache.org

2018-04-05 Thread Konstantin Kolinko
>> Why can't I log in? I get a 401 error when I try with any these
>> users. Do I have them set correctly? The 401 error said I can get
>> access by adding the user "tomcat" like I so. I also read the
>> documentation
>>  lication_Access>
>>
>>
> but
>> I must not understand. I tried running tomcat on my windows
>> computer and got a similar 403 error. I originally had this issue
>> when I was trying to integrate my Spring Boot app in Jenkins and
>> got error
>>
>> org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
>>
>>
> The username and password you provided are not correct (error 401).
>>

1. Do not confuse error 401 and error 403.

HTTP Response Status 401 means that server asks you for a different
user name / password.
-- Your name/password are wrong.

HTTP Response Status 401 means that access have been denied:
a) Your name/password are known, but the user does not have rights to
access the page. => Check roles of an user.

b) Your name/password are known, but CSRF token has expired. => Go to
/manager/html. The entrance page does not need a CSRF token.

c) You have been blocked by your IP address (by RemoteAddrValve).
(No user name is asked)


>
> My guess is that one or more of the following is true:
>
> 1. The tomcat-users.xml file isn't in your CATALINA_BASE/conf/ directory
>
> 2. Your CATALINA_BASE/conf/server.xml does not have a  in it
> for MemoryUserDatabaseFactory
>
> 3. Your Manager application doesn't have a  configured
>
> Can you confirm all of the above?

4. You did not restart your Tomcat after editing the file.

The tomcat-users.xml file is read when Tomcat starts. You need to
restart Tomcat for the changes to take effect.



Best regards,
Konstantin Kolinko

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



Re: tomcat

2018-04-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Chris,

On 4/5/18 9:08 AM, Cheltenham, Chris wrote:
> There is a behavior I see in tomcat at times which is puzzling to
> me.
> 
> Sometimes when I start up tomcat it doesn’t log anything.

To which files? Any of them?

> Maybe I am restarting it too fast?

Possibly. How are you restarting it?

> I don’t have any other symptoms to report other than sometimes when
> a start tomcat it does not log anything.
> 
> Does anyone know why that happens?

My guess is that your restart process somehow rotates the file(s) you
are expecting out of the way (or deletes them) but the new process has
already started logging to them, so it looks like nothing is happening.

On *NIX systems, processes will happily continue to write to deleted
files and the data basically never makes it to the disk. (Actually, it
does make it to the disk, but no other process can reasonably read
that data).

Another possibility is that Tomcat is basically not starting, due to
e.g. a port conflict. When this happens, Tomcat logs a small amount
and shuts down. But in that case, you'd be saying "Tomcat does not
start up again" so that's probably not the case, here.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrGOXQACgkQHPApP6U8
pFh7lQ/5AYCBtjfuj4qUpblWv6HqkrseMBpF9Anc2dP8wm7Q2A2Wp7WT/SMciyw+
1V+YEQRHDwPlPpjFVfXa2zxvYcSz8uqTK8okvwwXd8nApS59T9TAG2vtwbZtt5lH
HOrU/qin1JCm3L03OB5iumMVYJit5Fr/NKEULHQewk/FVV+8zCDeRFXw0DXg2I64
Tq9CvNpAaGSqWZ8FAxMe57unX3XayTiMtTf3muYCZqFk0kDCoXhrvDVMm2F2Kf/p
k2GR/sbgiHVDdvqUZcMveoTyWlXhiqnYBQziLtMhglsqOkGcG4ijNNW+dFvNhCbK
g9LU8ptxug/We3xJqmfq6jJlGThl9/KAQfFb3kwi5OPnrEsMPCCbv8Kg5XtaCgPW
pr1JniRIoZpSeO0DNa2T3vXzZ4IlJ1Xeh4+gPfIBUoDOGwoxQrhyAjG1KYLPyc9G
QnBN7z9PglRSJ88g3F1dJShAj/unN6x5WjzAPuer7BRjX4/CiXn+2I1HwbP6E2q3
fSlIFugUCm2fQ5LvolhRCcMVr98fhCIqISBC77fA7vbLr9djVgLVqpXL1aCJg4Zj
R7l8wngDRIdBXFghjWFiAIbZtx1IifKUfFOYkWpM4Y2nfa3rPBkjF6bF+18tapyY
6GFEoyvPGC50yt2YhwqyLPTpLl8bYI8KZQevDvKlFbCuAPKnHOw=
=yE/b
-END PGP SIGNATURE-

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



users@tomcat.apache.org

2018-04-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Philip,

On 4/5/18 12:37 AM, Philip Rego wrote:
> http://24.0.5.14:8081/manager/html

Reach? Yes. Login? No.

> *tomcat-users.xml* 
> http://tomcat.apache.org/xml"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd" 
> version="1.0">   username="tomcat" password="s3cret" roles="manager-gui"/>  rolename="tomcat"/>   rolename="manager-gui"/>  roles="manager-gui"/>  roles="standard,manager-gui,tomcat,manager-script,manager-script"/>
>
> 

>  
> 

I tried users "tomcat" and "hello". Your file looks okay to me.

> Why can't I log in? I get a 401 error when I try with any these
> users. Do I have them set correctly? The 401 error said I can get
> access by adding the user "tomcat" like I so. I also read the
> documentation 
> 
>
> 
but
> I must not understand. I tried running tomcat on my windows
> computer and got a similar 403 error. I originally had this issue
> when I was trying to integrate my Spring Boot app in Jenkins and
> got error
> 
> org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
>
> 
The username and password you provided are not correct (error 401).
> 
> (I know it's not safe giving out passwords like this but there's 
> nothing on the machine I care about, and want to have the issue 
> resolved)

My guess is that one or more of the following is true:

1. The tomcat-users.xml file isn't in your CATALINA_BASE/conf/ directory

2. Your CATALINA_BASE/conf/server.xml does not have a  in it
for MemoryUserDatabaseFactory

3. Your Manager application doesn't have a  configured

Can you confirm all of the above?

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrGOKYACgkQHPApP6U8
pFh/RBAAq7PwPcwQ9HjBLne2qf5K1WJBO7gVSBUsJ9nVlkcgwnnlJhN4bI9tW69G
vuovsDZKuWPYNrh/1IqNjJ9DUxrO7bitO07AOJRpQcKsdtYeLx6k6xMdBj4bi/Vr
ysHm41pv6rT0YxAN3oBUaDWbG32CNIhKz6LOos1iKJ7/k4OH5KJsUy4pXDce2Rop
ybP7iuB8bmrx7TYHlKrtoNCUAQs0ah+0xlQ7kmrzgVKHhotKjukCmMLifaYZ823A
7HI4x/XF3xx202dSuUx7OMwBNlDcU8SOEt/cXsU1bRVUfeRK/tm1RVogoe2+hDZW
eIIpdnPnpsJaMp5FpBaS+VybHwjKfZyfY4rCl2q1lF3bRPDP6b9Xzu67+C6z0pnU
6LD4IKxIVMrPSwk3aTLcfrSvmUPla2nWV1Mp/KOl1QacQsBHW5LWA/Z+EAV6BaOU
foG+V7ICdEWri4G1x6uAlFgbfgQe+1nIfUpJ+8dpI0uW9wY56nMzKHF3Hj65KkBq
yOT00WxPLwhlNGre5dDLeoeN8i6ft9lxKvt+W1b58H9whySmhL2xULPIW9oPk1I2
Ua3Z17JkQSJKcX2EONW/T4vwGhhRFEXMmcge3tMWlpB4jch7CXJ5zFgUHzn2UB1R
NHLCtnxgTEJ2s6clckxuR+jMNl0+mktTcnGTUadpc6Cw0/hWvSg=
=3lRR
-END PGP SIGNATURE-

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



Is LDAP connection failing?

2018-04-05 Thread Suvendu Sekhar Mondal
Hello Everyone,

Recently in one of our environments I am seeing following log in
Catalina.out. It seems that LDAP connection is failing. This issue is
sporadic and goes away with Tomcat recycle.

One interesting thing is "localhost:389" part. I could not find out
any configuration related to that. It could happen that I am not
looking at the correct place.

We have 200+ JVMs out there which were starting up simultaneously but
this happens for some of them sporadically. I suspect that some race
condition might be causing this failure but could not found any
evidence so far. Can someone please suggest how can I identify what is
failing? and why it is failing?

Thanks!
Suvendu

Stack trace:
2018-04-02 20:34:27,293 INFO org.apache.catalina.startup.HostConfig -
Deploying web application directory D:\xxx\webapps\ROOT
2018-04-02 20:34:33,341 SEVERE org.apache.catalina.realm.CombinedRealm
- Failed to start "org.apache.catalina.realm.JNDIRealm/1.0" realm
org.apache.catalina.LifecycleException: Failed to start component
[Realm[JNDIRealm]]
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
 at 
org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:201)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5373)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
 at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
 at 
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
 at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Exception opening
directory server connection
 at org.apache.catalina.realm.JNDIRealm.startInternal(JNDIRealm.java:2191)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 ... 14 more
Caused by: javax.naming.CommunicationException: localhost:389 [Root
exception is java.net.ConnectException: Connection refused: connect]
 at com.sun.jndi.ldap.Connection.(Connection.java:216)
 at com.sun.jndi.ldap.LdapClient.(LdapClient.java:137)
 at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1614)
 at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2746)
 at com.sun.jndi.ldap.LdapCtx.(LdapCtx.java:319)
 at 
com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:70)
 at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
 at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
 at javax.naming.InitialContext.init(InitialContext.java:244)
 at javax.naming.InitialContext.(InitialContext.java:216)
 at 
javax.naming.directory.InitialDirContext.(InitialDirContext.java:101)
 at org.apache.catalina.realm.JNDIRealm.open(JNDIRealm.java:2108)
 at org.apache.catalina.realm.JNDIRealm.startInternal(JNDIRealm.java:2189)
 ... 15 more
Caused by: java.net.ConnectException: Connection refused: connect
 at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
 at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
 at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
 at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
 at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
 at java.net.Socket.connect(Socket.java:589)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at com.sun.jndi.ldap.Connection.createSocket(Connection.java:350)
 at com.sun.jndi.ldap.Connection.(Connection.java:203)
 ... 27 more

2018-04-02 20:34:35,059 INFO org.apache.catalina.startup.HostConfig -
Deployment of web application directory D:\xxx\webapps\ROOT has
finished in 7,766 ms
2018-04-02 20:34:35,075 INFO
org.apache.coyote.http11.Http11AprProtocol - Starting ProtocolHandler
["http-apr-18110"]
2018-04-02 20:34:35,091 INFO org.apache.coyote.ajp.AjpAprProtocol -
Starting ProtocolHandler ["ajp-apr-18111"]
201

tomcat

2018-04-05 Thread Cheltenham, Chris


There is a behavior I see in tomcat at times which is puzzling to me.

 

Sometimes when I start up tomcat it doesn't log anything.

 

Maybe I am restarting ti to fast?

 

I don't have any other symptoms to report other than . sometimes when a
start tomcat it does not log anything.

 

Does anyone know why that happens?

 

 

 

===

Thank You;

Chris Cheltenham
Technology Services
The School District of Philadelphia

Work # 215-400-5025
Cell # 215-301-6571 



Re: Connection closed error and certificateVerification="required"

2018-04-05 Thread Richard Tearle
On 4 April 2018 at 17:58, Mark Thomas  wrote:
> On 26/03/18 08:25, Richard Tearle wrote:
>
> 
>
> Thanks. I've got the test application and UI running but I haven't yet
> reproduced the problem. What parameters are you calling run-test.sh with?

This usually get's a failure within 10 minutes of running:

./run-test.sh 28800 5000 5000 0 0 true

(I've just tried it and it failed after 4m 23s - from the previous rounds
of testing, it failed at around the 4m 30s mark 7 times out of 10)

> I'll continue to try and reproduce the issue but I think it makes sense
> to try and generate some debug data on your system as you can reproduce it.
>

I'll get onto this, but it might not be until next week.

Thanks

Richard.

-- 
This email is sent on behalf of Northgate Public Services (UK) Limited and 
its associated companies including Rave Technologies (India) Pvt Limited 
(together "Northgate Public Services") and is strictly confidential and 
intended solely for the addressee(s). 
If you are not the intended 
recipient of this email you must: (i) not disclose, copy or distribute its 
contents to any other person nor use its contents in any way or you may be 
acting unlawfully;  (ii) contact Northgate Public Services immediately on 
+44(0)1442 768445 quoting the name of the sender and the addressee then 
delete it from your system.
Northgate Public Services has taken reasonable 
precautions to ensure that no viruses are contained in this email, but does 
not accept any responsibility once this email has been transmitted.  You 
should scan attachments (if any) for viruses.


Northgate Public Services 
(UK) Limited, registered in England and Wales under number 00968498 with a 
registered address of Peoplebuilding 2, Peoplebuilding Estate, Maylands 
Avenue, Hemel Hempstead, Hertfordshire, HP2 4NW.  Rave Technologies (India) 
Pvt Limited, registered in India under number 117068 with a registered 
address of 2nd Floor, Ballard House, Adi Marzban Marg, Ballard Estate, 
Mumbai, Maharashtra, India, 41.

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