LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2009, 12:43 PM   #1
jayrmca
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Rep: Reputation: 0
Question starting tomcat


i was using tomcat6 in windows. i copied the same tomcat6 folder in my home folder in ubuntu. i set the java_home variable and started tomcat using
tomcat6/bin#bash startup.sh
it started fine.but when i entered http://localhost:8080/ in the browser, it said Firefox can't establish a conn. to a server at 8080.
when i viewed the catalina.out in logs, i found,
java.net.BindException, permission denied:80.
what can i do for that? plz anyone answer.
 
Old 04-09-2009, 01:36 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,846

Rep: Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009
Quote:
Originally Posted by jayrmca View Post
i was using tomcat6 in windows. i copied the same tomcat6 folder in my home folder in ubuntu. i set the java_home variable and started tomcat using
tomcat6/bin#bash startup.sh
it started fine.but when i entered http://localhost:8080/ in the browser, it said Firefox can't establish a conn. to a server at 8080.
when i viewed the catalina.out in logs, i found,
java.net.BindException, permission denied:80.
what can i do for that? plz anyone answer.
Tomcat didn't start. You probably can't start the service, unless you're root. SU into the root user, and start it there.

And PLEASE spell out your words.
 
Old 04-09-2009, 02:17 PM   #3
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
I have a doubt, Shall We use same Windows source in Linux?
 
Old 04-09-2009, 05:10 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,846

Rep: Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009Reputation: 8009
Quote:
Originally Posted by kirukan View Post
I have a doubt, Shall We use same Windows source in Linux?
Obviously not...Windows programs work on Windows only. And what does this have to do with jayrmca's original question?? Don't hijack someone elses thread...open your own.
 
Old 04-09-2009, 09:03 PM   #5
jayrmca
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Red face still not working

Quote:
Originally Posted by TB0ne View Post
Tomcat didn't start. You probably can't start the service, unless you're root. SU into the root user, and start it there.

And PLEASE spell out your words.
Again the server started normally.but it doesn't work in browser.
but this is the log:
catalina.out
Apr 10, 2009 10:58:22 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/jdk1.5.0_18/jre/lib/i386/client:/opt/jdk1.5.0_18/jre/lib/i386:/opt/jdk1.5.0_18/jre/../lib/i386
Apr 10, 2009 10:58:23 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-80
Apr 10, 2009 10:58:23 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1217 ms
Apr 10, 2009 10:58:23 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Apr 10, 2009 10:58:23 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.16
Apr 10, 2009 10:58:23 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "listeners.ContextListener" is already configured for this context. The duplicate definition has been ignored.
Apr 10, 2009 10:58:23 AM org.apache.catalina.core.StandardContext addApplicationListener
INFO: The listener "listeners.SessionListener" is already configured for this context. The duplicate definition has been ignored.
Apr 10, 2009 10:58:24 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-80
Apr 10, 2009 10:58:24 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Apr 10, 2009 10:58:24 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/38 config=null
Apr 10, 2009 10:58:24 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1574 ms
 
Old 04-09-2009, 09:43 PM   #6
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@jayrmca: I don't see anything about failure to bind to port 80 in that log snippet.

What are you trying to do? Just run tomcat on port 8080? (I'm asking because you appear to have an ajp connector configured.)

In any case, post your server.xml (sans comments), and the output of # netstat -ltn after starting the service.
 
Old 04-10-2009, 01:12 PM   #7
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278

Rep: Reputation: 148Reputation: 148
Quote:
what does this have to do with jayrmca's original question?? Don't hijack someone elses thread...open your own.
I do not have any intention to hijack others thread, but in this circumstances the answer for my question will clear the different between windows and linux source.

Quote:
i was using tomcat6 in windows. i copied the same tomcat6 folder in my home folder in ubuntu.
This sound like that he copied tomcat windows folder in ubuntu.

The above is the main reason why i have posted the question on this same thread.
 
Old 04-10-2009, 02:08 PM   #8
sugantha
Member
 
Registered: Feb 2008
Distribution: Ubuntu 11.04 Natty Narwhal , Fedora Linux
Posts: 43

Rep: Reputation: 15
The apache tomcat download is independent of the OS... All the necessary files have a .bat type for windows and a .sh type for linux based distros. There is a difference only when you choose to install as a windows service. I guess in your case the issue is the port no already in use by another program. Look into the server.xml file in CATALINA_HOME/conf directory and change the default port no in the connector tag to something other than 8080...

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />


Modify 8080 to some unused port..
 
Old 04-15-2009, 08:06 AM   #9
jayrmca
LQ Newbie
 
Registered: Mar 2009
Posts: 11

Original Poster
Rep: Reputation: 0
Thumbs up it's working

Quote:
Originally Posted by anomie View Post
@jayrmca: I don't see anything about failure to bind to port 80 in that log snippet.

What are you trying to do? Just run tomcat on port 8080? (I'm asking because you appear to have an ajp connector configured.)

In any case, post your server.xml (sans comments), and the output of # netstat -ltn after starting the service.
hey, it's working when i startup as root. i didn't do anything for that. anyway thanx
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting apache tomcat at boot triley Linux - General 3 10-27-2008 02:01 PM
starting tomcat as a specific user kidswipe Linux - General 1 08-23-2007 11:57 PM
Starting Tomcat from Eclipse - Permission denied robbbert Programming 1 06-30-2006 04:23 AM
How many java Services will start while starting tomcat on mandrake linux naveenmadugula Linux - General 2 05-15-2005 11:52 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration