Re: Can you access my Manager App? http://24.0.5.14:8081/manager/html Tomcat/8.5.29, CentOS

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 <ma...@apache.org> 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
> >> <ch...@christopherschultz.net <mailto:ch...@christopherschultz.net>>
> wrote:
> >>
> >> Philip,
> >>
> >> On 4/5/18 12:37 AM, Philip Rego wrote:
> >>> http://24.0.5.14:8081/manager/html
> >> <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
> >> <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
> >>
> >> <http://24.0.5.14:8081/docs/manager-howto.html#Configuring_Manager_App
> >> <http://24.0.5.14:8081/docs/manager-howto.html#Configuring_Manager_App>
> >> 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
> >> <mailto:users-unsubscr...@tomcat.apache.org>
> >> For additional commands, e-mail: users-h...@tomcat.apache.org
> >> <mailto: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
> >
>
>


Re: Can you access my Manager App? http://24.0.5.14:8081/manager/html Tomcat/8.5.29, CentOS

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
> > <http://24.0.5.14:8081/docs/manager-howto.html#Configuring_Manager_App
> 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
>
>




  
  
  
  
  
  
  
  

  
  


  

  
  























  
 

Can you access my Manager App? http://24.0.5.14:8081/manager/html Tomcat/8.5.29, CentOS

2018-04-04 Thread Philip Rego
http://24.0.5.14:8081/manager/html


*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">
  
  
  
  
  
  
  
  
  


(I followed this  so I
believe anyone could have access.)

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)