Re: Getting the Manager app running on localhost.. Please help
Thx everyone for the great replies. I decided to take Konstantin Kolinko's advice and start a new installation from scratch using tomcat-8.5.32. I have had some success, but still can't deploy WARS. Here is what I did: == Step 1: Installing Tomcat per se == I used the instructions on this page: https://wolfpaulus.com/mac/tomcat/ * Download the zip file and unzip it on your HD under /usr/local/apache-tomcat-N.N.N (where N.N.N is the version number). ** Note: In the rest of this document, that directory will be referred to [CATALINA_HOME]. * Create a symlink /Library/Tomcat to make managing future versions easier: sudo rm -f /Library/Tomcat sudo ln -s [CATALINA_HOME] /Library/Tomcat * Change ownership of /Library/Tomcat sudo chown -R /Library/Tomcat * Make all scripts executable sudo chmod +x /Library/Tomcat/bin/*.sh * Now, I can start/stop tomcat as follows: /Library/Tomcat/bin/startup.sh /Library/Tomcat/bin/shutdown.sh ** IMPORTANT: DON’T RUN THOSE SCRIPTS WITH SUDO!!! Especially ‘startup.sh’, as this will end up creating a bunch of temporay dirs and files that will be owned by ROOT, and cannot be written unless you start Tomcat as ROOT. * Test the installation by: ** Starting Tomcat with startup.sh ** Pointing my browser at http://localhost:8080/. ** I see the Tomcat home page no problem == Step 2: Configuring the Tomcat Manager Apps == * Edit the file /Library/Tomcat/conf/tomcat-users.xml, and add the following lines inside the tag pair: * Shutdown and re-start Tomcat * At this point, I can click on any of the following buttons: 'Server Status', 'Manager' App, 'Host Manager' and once I enter the user and passwords I specified in , I get to see the corresponding page. ** On 'Manager App', I was able to start, stop, re-deploy EXISTING apps. ** BUT *** When I tried to deploy a new WAR file, I got: This site can’t be reached The connection was reset. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET After a bit of reading, it seems that this is because the WAR file I was deploying was larger than the maximum size allowed. I fixed that by editing /Library/Tomcat/webapps/manager/WEB-INF/web.xml, and changing the size in the following tags: 5000 5000 0 And now, all seem to work fine. Again, thanks to everyone who pitched in with some advice. It was really helpful. Alain
RE: Getting the Manager app running on localhost.. Please help
> From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] > Subject: Re: Getting the Manager app running on localhost.. Please help > FYI, I'm on MacOS (Sierra 10.12.6). I just now > 1) installed apache-tomcat-8.5.32 > 2) added these two lines to tomcat-users.xml > > > Note that such an addition must be done outside of the sample role/user elements, since they are commented out. A common error is failing to remove or otherwise avoid the comment markers. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. smime.p7s Description: S/MIME cryptographic signature
Re: Getting the Manager app running on localhost.. Please help
On Thu, Jul 12, 2018 at 7:58 AM, Désilets, Alain wrote: > I have been trying to get my local Tomcat installation to allow me to deploy > apps from the local machine and nothing I do seems to help. FYI, I'm on MacOS (Sierra 10.12.6). I just now 1) installed apache-tomcat-8.5.32 2) added these two lines to tomcat-users.xml 3) started tomcat (`bin/catalina.sh run`) 4) open browser to http://localhost:8080/manager/html 5) supplied above credentials 6) uploaded a war file which deployed correctly I'm not sure why you created a context file, but it seems extraneous... FWIW, -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan Consulting Availability : Silicon Valley or remote - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Getting the Manager app running on localhost.. Please help
To use host-manager you need admin-gui as the role. > On Jul 12, 2018, at 11:08 AM, Désilets, Alain > wrote: > > Thx for the reply. > >> have you enabled all user roles with passwords? in >> CATALINA_HOME/conf/tomcat-users.xml file? >> Also, don't forget to change >> the passwords noted as "" with something "interesting". > > Yes. As I mentioned in the first email of this thread, I have a file > [CATALINA_HOME]/conf/tomcat-users.xml with the following content: > > > > >roles="manager,manager-script,manager-gui"/> > >> By default, it can only run on localhost, and it's configured to listen to >> 127.0.0.1 via the valve. If you uncomment the user role part and change the >> password, you should be able to log in. i was able to start it by doing >> above. > > As I mentioned in the first email, when I tried it first with the above > tomcat-users.xml file and no manager.xml file, it didn't work. Server Status > worked, Manager opened the page but couldn't deploy a war file, and Host > Manager gave me 403. This happened whether I accessed the site as > http://localhost:8080 or http://127.0.0.1:8080. > > So for some reason or other, the default behaviour doesn't seem to work for > me. > > Note that I am using OSX. > > Could this be due to some sort of proxy issue? > > Thx again. > > Alain > > > > - > 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: Getting the Manager app running on localhost.. Please help
2018-07-12 18:24 GMT+03:00 Désilets, Alain : >> Where 132.246.129.58 is my IP address. Note that I tried also with >> “132.0.0.0” and with “^.*$” to no avail. > > I should be more precise… > > When I try with “^.*$”, I get same behavior as when I didn’t have a > manager.xml file, ie: > > * Server Status: works > * Manager: opens page but deploying war causes ‘This site can’t be > reached’ > * Host Manager: ‘403 Access Denied’ > > And by “132.0.0.0.”, I actually meant “127.0.0.1”. When I try that from > ‘localhost:8080’, all buttons result in ‘403 Access Denied’. But when I > access the buttons from “127.0.0.1:8080”, I get the same behavior as above See https://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics#Common_Troubleshooting_Scenario "localhost" name never resolves to "132."something. > /usr/local/apache-tomcat-8.5.4/bin Why 8.5.4??? Why not the current release (8.5.32)? See http://tomcat.apache.org/security-8.html > sudo sh startup.sh; Do not run Tomcat as root! See http://tomcat.apache.org/tomcat-8.5-doc/security-howto.html Delete all temporary files (in the logs, temp and work directories of Tomcat) that might now be owned by root and not writable by a regular user and start over. Note that deploying / undeploying a web application via Manager requires write access to the webapps, work and maybe conf directories for the user running Tomcat java process. > > > > The Manager app in Tomcat 8.5 does not use the "manager" role. The last time it was used was Tomcat 6. Are you sure that you are following a correct manual? The "manager-script" role should be used by automated scripts only. Granting "manager-script" and "manager-gui" to the same user means that CSRF protection (in the Manager web application) for that user will be ineffective. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Getting the Manager app running on localhost.. Please help
Thx for the reply. > have you enabled all user roles with passwords? in > CATALINA_HOME/conf/tomcat-users.xml file? > Also, don't forget to change > the passwords noted as "" with something "interesting". Yes. As I mentioned in the first email of this thread, I have a file [CATALINA_HOME]/conf/tomcat-users.xml with the following content: >By default, it can only run on localhost, and it's configured to listen to >127.0.0.1 via the valve. If you uncomment the user role part and change the >password, you should be able to log in. i was able to start it by doing >above. As I mentioned in the first email, when I tried it first with the above tomcat-users.xml file and no manager.xml file, it didn't work. Server Status worked, Manager opened the page but couldn't deploy a war file, and Host Manager gave me 403. This happened whether I accessed the site as http://localhost:8080 or http://127.0.0.1:8080. So for some reason or other, the default behaviour doesn't seem to work for me. Note that I am using OSX. Could this be due to some sort of proxy issue? Thx again. Alain - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Getting the Manager app running on localhost.. Please help
have you enabled all user roles with passwords? in CATALINA_HOME/conf/tomcat-users.xml file? Also, don't forget to change the passwords noted as "" with something "interesting". By default, it can only run on localhost, and it's configured to listen to 127.0.0.1 via the valve. If you uncomment the user role part and change the password, you should be able to log in. i was able to start it by doing above. Also, when you get 403, pay attention to what user roles you need to have for certain pages to be visible on localhost. Regards, On 12 July 2018 at 16:24, Désilets, Alain wrote: > > Where 132.246.129.58 is my IP address. Note that I tried also with > “132.0.0.0” and with “^.*$” to no avail. > > I should be more precise… > > When I try with “^.*$”, I get same behavior as when I didn’t have a > manager.xml file, ie: > > * Server Status: works > * Manager: opens page but deploying war causes ‘This site can’t be > reached’ > * Host Manager: ‘403 Access Denied’ > > And by “132.0.0.0.”, I actually meant “127.0.0.1”. When I try that from > ‘localhost:8080’, all buttons result in ‘403 Access Denied’. But when I > access the buttons from “127.0.0.1:8080”, I get the same behavior as above > > > Alain Désilets > National Research Council of Canada >
Re: Getting the Manager app running on localhost.. Please help
> Where 132.246.129.58 is my IP address. Note that I tried also with > “132.0.0.0” and with “^.*$” to no avail. I should be more precise… When I try with “^.*$”, I get same behavior as when I didn’t have a manager.xml file, ie: * Server Status: works * Manager: opens page but deploying war causes ‘This site can’t be reached’ * Host Manager: ‘403 Access Denied’ And by “132.0.0.0.”, I actually meant “127.0.0.1”. When I try that from ‘localhost:8080’, all buttons result in ‘403 Access Denied’. But when I access the buttons from “127.0.0.1:8080”, I get the same behavior as above Alain Désilets National Research Council of Canada