[Building Sakai] [Deploying Sakai] How to Run/Install Tomcat as a Service for Sakai 2.9.1 Demo?

Mark J. Norton markjnorton at earthlink.net
Thu Jun 13 06:36:56 PDT 2013


Your environment variables look fine to me, short of actually testing them.

 >  The I started Tomcat from the command line by copying the .BAT files 
from the demo folder.

Ah, I missed the fact that you are running this off the demo copy.

 >   I have no error messages and once I received the info message: 
INFO: Server startup in 217668 ms

Is that the only message you see?  If the  text in the console isn't too 
long, can you copy and paste it in an email and send to this list?  It 
might give us more clues.

 >  I tried again and now it shows correctly in my Browser.

You tried "http://server-name:8080/portal/"?   Might not be one port 
8080, in which case drop it.

- Mark

On 6/13/2013 9:25 AM, Pierre Kellerman wrote:
>
> Hi Mark.
>
> Great news I have it Working At least Partially now.
>
> I followed your advice stopping Tomcat as a Windows service. This do 
> not work by stopping it in the service manager. I suppose because the 
> correct shutdown messages is not sent to Tomcat.
>
> So I disabled the service and restart my PC (Once more go windows L)
>
> The I started Tomcat from the command line by copying the .BAT files 
> from the demo folder. I have no error messages and once I received the 
> info message
>
> INFO: Server startup in 217668 ms
>
> I tried again and now it shows correctly in my Browser. J
>
> Thank you very mush.
>
> One thing this is fine for my local Dev Machine. But on the live 
> server I really need to run Tomcat as a service. Any idea where to 
> start looking for the problem why it do not work when running as a 
> service. I do have the following Environment variables set.
>
> CATALINA_HOME = c:\opt\tomcat7
>
> JAVA_HOME = C:\Program Files\Java\jdk1.7.0_21
>
> JAVA_OPTS = -server -Xms512m -Xmx1024m -XX:PermSize=128m 
> -XX:MaxPermSize=512m -XX:NewSize=192m -XX:MaxNewSize=384m 
> -Djava.awt.headless=true -Dhttp.agent=Sakai 
> -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false 
> -Dsun.lang.ClassLoader.allowArraySyntax=true
>
> MAVEN_OPTS = -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m
>
> MAVEN2_HOME = C:\opt\apache-maven-3.0.5
>
> SUBVERSION_HOME = C:\opt\svn\
>
> And the relevant bin folders is all added to the PATH environment 
> variable.
>
> Or is CygWin really the only way to run a java service reliably on a 
> windows machine.
>
> BTW my OS is Windows 7 64 bit
>
> Thank you for the help so far.
>
> *From:*sakai-dev-bounces at collab.sakaiproject.org 
> [mailto:sakai-dev-bounces at collab.sakaiproject.org] *On Behalf Of *Mark 
> J. Norton
> *Sent:* 13 June 2013 01:18 PM
> *To:* sakai-dev at collab.sakaiproject.org
> *Subject:* Re: [Building Sakai] [Deploying Sakai] How to Run/Install 
> Tomcat as a Service for Sakai 2.9.1 Demo?
>
> I run Sakai in a Windows7 environment.  I can state clearly that 
> Tomcat under Windows doesn't generate a catalina.out file.  Instead, 
> output is written to a Windows console.  Starting Tomcat as a Windows 
> service suppresses the display of the console.  Try this:
>
>  1. In your Services Window, find Tomcat and turn it off (if running).
>  2. Bring up a Windows Command Shell ("cmd" in the Run box).
>  3. Change directory (CD) to "%CATALINA_OUT%/bin".
>  4. Enter the command "startup".
>
> This will bring Tomcat up and should display a console window.  
> Messages will scroll by pretty fast, but you should be able to see the 
> last error.  Copy that and send it to the this list.
>
> There are times when you just need to get access to the catalina.out 
> file on Windows.  That's a bit more complicated.  It involves 
> installing CygWin (a Linux emulator for Windows).  With CygWin in 
> stalled, you can launch Tomcat as a Linux task, which in turn creates 
> a catalina.out file.  Assuming you have CygWin installed:
>
>  1. In your Bash shell, enter "cd $CATALINA_OUT".  then "cd bin".
>  2. Run "bash tomcat.sh".  Tomcat will run in background.
>  3. While tomcat is running, you can use "tail -f
>     ../logs/catalina.out" to follow console messages.
>
> The bash shell has a much longer history buffer than the Windows 
> Command shell.  Also, you can open catalina.out as a file and do searches.
>
> To shutdown Tomcat in Windows, use the "shutdown" command in the bin 
> directory.  You can also just close the console window, though this 
> doesn't always shut down cleanly.  In CygWin, use the "bash 
> shutdown.sh" command in the bin directory.  If necessary, you can also 
> kill the Tomcat task, but that isn't recommended.
>
> - Mark Norton
>
>
>
>
> On 6/13/2013 6:43 AM, Aaron Zeckoski wrote:
>
>     I don't know a ton about windows though I have worked with some
>
>     windows servers on EC2 that had Sakai running on them and as long as
>
>     tomcat was running when I logged out it tended to keep running. Maybe
>
>     someone else on list can shed some light on this if you add some
>
>     details about what the OS version is and what steps you are taking on
>
>     logout?
>
>       
>
>     -AZ
>
>       
>
>       
>
>     On Thu, Jun 13, 2013 at 1:56 AM, Viviana Hidalgo<vivihodal at gmail.com>  <mailto:vivihodal at gmail.com>  wrote:
>
>         Hi Aaron.
>
>           
>
>         I followed the instructions mentioned in the page you gave me and Sakai
>
>         starts locally and remotely, however if I close windows session in the
>
>         server, sakai can't be accessed anymore by a client.
>
>           
>
>         Is it necessary to configure something else in the setenv.bat file?
>
>           
>
>         Thanks a lot for your help!
>
>           
>
>         Saludos,
>
>           
>
>         Viviana Hidalgo Quintero.
>
>         Gracias.
>
>           
>
>           
>
>         On Wed, Jun 12, 2013 at 3:00 PM, Viviana Hidalgo<vivihodal at gmail.com>  <mailto:vivihodal at gmail.com>
>
>         wrote:
>
>               
>
>             Hi Aaron.
>
>             Will it be the same instructions for Sakai 9,2,1 Demo version?
>
>             I see it is mentioned some files that do not exist in the Sakai folder of
>
>             the demo version.
>
>               
>
>             Thank you!
>
>               
>
>             Saludos,
>
>               
>
>             Viviana Hidalgo Quintero.
>
>             Gracias.
>
>               
>
>               
>
>             On Wed, Jun 12, 2013 at 2:55 PM, Aaron Zeckoski<azeckoski at unicon.net>  <mailto:azeckoski at unicon.net>
>
>             wrote:
>
>                   
>
>                 I would suggest you do not use tomcat as a service. I suggest you
>
>                 follow the tomcat portion of this guide which explains how to use the
>
>                 zip version:
>
>                   
>
>                 https://confluence.sakaiproject.org/display/BOOT/Development+Environment+Setup+Walkthrough
>
>                   
>
>                 -AZ
>
>                   
>
>                   
>
>                 On Wed, Jun 12, 2013 at 3:11 PM, Viviana Hidalgo<vivihodal at gmail.com>  <mailto:vivihodal at gmail.com>
>
>                 wrote:
>
>                     Hi there!
>
>                     I'm new to sakai...could you please help me?
>
>                       
>
>                     I've found in here
>
>                       
>
>                     (https://confluence.sakaiproject.org/pages/viewpage.action?pageId=69273826)
>
>                     instructions to install Tomcat as a Windows service, but it basically
>
>                     requires C:\tomcat\bin> service.bat, which I can't find in the sakai
>
>                     folder
>
>                     of the demo version, so I'm lost and don't know how to install Tomcat
>
>                     as a
>
>                     Windows service in my server.
>
>                       
>
>                     Thanks in advance!
>
>                       
>
>                     Saludos,
>
>                       
>
>                     Viviana Hidalgo Quintero.
>
>                     Gracias.
>
>                       
>
>                     _______________________________________________
>
>                     production mailing list
>
>                     production at collab.sakaiproject.org  <mailto:production at collab.sakaiproject.org>
>
>                     http://collab.sakaiproject.org/mailman/listinfo/production
>
>                       
>
>                     TO UNSUBSCRIBE: send email to
>
>                     production-unsubscribe at collab.sakaiproject.org  <mailto:production-unsubscribe at collab.sakaiproject.org>
>
>                     with a subject of "unsubscribe"
>
>                   
>
>                   
>
>                   
>
>                 --
>
>                 Aaron Zeckoski - Software Architect -http://tinyurl.com/azprofile
>
>               
>
>               
>
>           
>
>       
>
>       
>
>       
>
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20130613/ab628f2b/attachment.html 


More information about the sakai-dev mailing list