The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Jsp files open as text

Discussion in 'EasyApache' started by sreeninair, Jan 25, 2014.

  1. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    I have a server installed with tomat . When I call a page I am getting the output as text code.

    ============
    The port is listening

    netstat -tnpl | grep 8080
    tcp 0 0 :::8080 :::* LISTEN 11604/java
    =============

    Getting the following error while adding servlets


    ]# /usr/local/cpanel/scripts/addservlets2 --domain=exam.domain.com
    Scanning httpd.conf...................................................................................................................................................................................................................................................................................................................................................................................................................................................
    warn [gentomcatlist2] safeunlock: Invalid arguments
    Could not open '/var/run/jsvc.pid': No such file or directory
    Could not open '/var/run/jsvc.pid': No such file or directory
    Could not chdir into /usr/local/jakarta/tomcat/bin: No such file or directory
    Done: .jsp support installed for exam.domain.com


    But still the page is showing as text code


    Kindly assist

    Thanks
    Sreeni
     
  2. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    Now i have installed tomcat 7. Getting the following error while starting it.

    =======================
    =================================
    root@server01 [/usr/local/jakarta/apache-tomcat-7.0.50/logs]# /usr/local/cpanel/scripts/gentomcatlist
    Scanning httpd.conf...................................................................................................................................................................................................................................................................................................................................................................................................................................................
    Adding in custom Tomcat option(s): -Xmx200M
    Adding in custom Tomcat option(s): -Xms100M
    Command './jsvc -user tomcat -cp ./bootstrap.jar -Djava.endorsed.dirs=../common/endorsed -outfile ../logs/catalina.out -errfile ../logs/catalina.err -verbose -Xmx200M -Xms100M org.apache.catalina.startup.Bootstrap start' returned: 0
    ==================================

    root@server01 [/usr/local/jakarta/apache-tomcat-7.0.50/logs]# sh /usr/local/jakarta/tomcat/bin/version.sh
    Using CATALINA_BASE: /usr/local/jakarta/tomcat
    Using CATALINA_HOME: /usr/local/jakarta/tomcat
    Using CATALINA_TMPDIR: /usr/local/jakarta/tomcat/temp
    Using JRE_HOME: /usr/local/jdk
    Using CLASSPATH: /usr/local/jakarta/tomcat/bin/bootstrap.jar:/usr/local/jakarta/tomcat/bin/tomcat-juli.jar
    Server version: Apache Tomcat/7.0.50
    Server built: Dec 19 2013 10:18:12
    Server number: 7.0.50.0
    OS Name: Linux
    OS Version: 2.6.18-308.8.2.el5.028stab101.1
    Architecture: i386
    JVM Version: 1.6.0_37-b06
    JVM Vendor: Sun Microsystems Inc.

    ====================================

    root@server01 [/usr/local/jakarta]# /usr/local/cpanel/scripts/addservlets2 --domain=exam.ispa.com
    Scanning httpd.conf...................................................................................................................................................................................................................................................................................................................................................................................................................................................
    Adding in custom Tomcat option(s): -Xmx200M
    Adding in custom Tomcat option(s): -Xms100M
    Command './jsvc -user tomcat -cp ./bootstrap.jar -Djava.endorsed.dirs=../common/endorsed -outfile ../logs/catalina.out -errfile ../logs/catalina.err -verbose -Xmx200M -Xms100M org.apache.catalina.startup.Bootstrap start' returned: 0
    Done: .jsp support installed for exam.ispa.com
    =====================================
    root@server01 [/usr/local/jakarta]# /usr/sbin/starttomcat
    Adding in custom Tomcat option(s): -Xmx200M
    Adding in custom Tomcat option(s): -Xms100M
    Command './jsvc -user tomcat -cp ./bootstrap.jar -Djava.endorsed.dirs=../common/endorsed -outfile ../logs/catalina.out -errfile ../logs/catalina.err -verbose -Xmx200M -Xms100M org.apache.catalina.startup.Bootstrap start' returned: 0
    root@server01 [/usr/local/jakarta]#
    =====================================


    But getting following error in whm while restarting:

    Waiting for tomcat to restart....finished.

    tomcat (jsvc.exec -user tomcat -cp ./bootstrap.jar -Djava.endorsed.dirs=../common/endorsed -outfile ../logs/catalina.out -errfile ../logs/catalina.err -verbose -Xmx200M -Xms100M org.apache.catalina.startup.Bootstrap start) running as tomcat with PID 26016 (process table check method)

    tomcat has failed, please contact the sysadmin (result was "tomcat is not running").


    Please help

    Thanks
    Sreeni
     
  3. cPanelPeter

    cPanelPeter Technical Analyst III
    Staff Member

    Joined:
    Sep 23, 2013
    Messages:
    569
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    What do you get when you type the following command?

    Code:
    # ps auxfwww | grep tomcat
    
     
  4. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello Peter,

    I have now reinstalled tomcat to fix this issue. Now the pages are loading fine. Now I need help in two things.

    1. When I execute any command related to Java I am getting memory error.

    java -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.

    I have increased memory in

    # cat /var/cpanel/tomcat.options
    -Xmx512M
    -Xms100M

    But no use. How can I disable shell fork bomb protection from command line? and let me know how to fix the memory issue.

    2. How can I upgrade to topcat 7 without affecting my current domain. Please let me know the exact steps.


    Thanks
    Sreeni
     
  5. sreeninair

    sreeninair Well-Known Member

    Joined:
    Dec 23, 2013
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    Anyone ?

    Thanks
    Sreeni
     
Loading...

Share This Page