LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-18-2013, 08:21 AM   #16
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81

@Suvarna:

Code:
login as root: service httpd stop
kill -9 pid_of_apache and 
service httpd start.

output of :
lsof -i:8080
netstat -lnp | grep http
 
Old 12-18-2013, 10:52 PM   #17
suvarna25
LQ Newbie
 
Registered: Dec 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Output of netstat -lnp | grep http

tcp 0 0 :::80 :::* LISTEN 3076/httpd
 
Old 12-19-2013, 01:23 AM   #18
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
Quote:
Originally Posted by suvarna25 View Post
Output of netstat -lnp | grep http

tcp 0 0 :::80 :::* LISTEN 3076/httpd
see your apache instance is using port 80 and you are trying to access your application from 8080.
Did you setup virtual host in apache for this application to check port 8080 ? if not you should try your application like this : http://site_address/

Also post me these if it is not accessible through port 80 from localhost* first and fetch the access.log and error.log output, i do asked for this:
Code:
login as root: service httpd stop
kill -9 pid_of_apache and 
service httpd start.

output of :
lsof -i:8080
 
Old 12-19-2013, 01:39 AM   #19
suvarna25
LQ Newbie
 
Registered: Dec 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Yes i am trying to setup my virtual host. output of command lsof -i:8080 is

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 3577 root 38u IPv6 56042 0t0 TCP *:webcache (LISTEN)
 
Old 12-19-2013, 01:43 AM   #20
suvarna25
LQ Newbie
 
Registered: Dec 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Yes i m trying to setup my virtual host. One thing which i cann't understand is, tutorial suggest that edit the /etc/host files to configure your server. Which file i have to edit?

Output of the command lsof -i:8080 is....

> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> java 3577 root 38u IPv6 56042 0t0 TCP *:webcache (LISTEN)
 
Old 12-19-2013, 03:17 AM   #21
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
Quote:
Output of the command lsof -i:8080 is....

> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
> java 3577 root 38u IPv6 56042 0t0 TCP *:webcache (LISTEN)
The first thing is you were wrong when trying to access the page with ":8080". So try access the page first as i have told in my previous comment.
Quote:
One thing which i cann't understand is, tutorial suggest that edit the /etc/host files to configure your server. Which file i have to edit?
The tutorial you are checking is not for virtual hosts. /etc/hosts file is used by an OS to map hostname to ip address, just to tell OS that a hostname exists with this IP formally.

to setup virtual hosts there's a file in conf dir under /etc/httpd/conf/ (for redhat, differs with distro and versions). we will come to it but first let the main issue resolve.

Last edited by SAbhi; 12-19-2013 at 03:19 AM.
 
Old 12-19-2013, 03:49 AM   #22
suvarna25
LQ Newbie
 
Registered: Dec 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Command lsof -i:8080 shows noting now.
 
Old 12-19-2013, 04:47 AM   #23
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
tomcat must be down .. start it up again... what i can see on your earlier post was a html file you were trying to access that can be accessible without tomcat.
 
Old 12-19-2013, 05:05 AM   #24
suvarna25
LQ Newbie
 
Registered: Dec 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
I have configured Apache server. Make appropriated changes in httpd.conf add my website on place of ServerName. Edited /etc/hosts file also. Allow other ip address to access my website as suggested in the tutorial. An output is I can access my website on my ip address but still unable to access my website from other linux system. I m much confused where i m going wrong?
 
Old 12-19-2013, 05:13 AM   #25
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
It is always suggested to have atleast answered these questions when you ask something like above ..

how you are accessing it ?
how have you configured it ?
what is in the logs ?
which tutorial you are following ?

a good one is here and here

nothing can explain better than this.. hope you know selinux is only available in redhat, centos and fedora, if you are using any other OS leave selinux part.
Configure following one of these.

Last edited by SAbhi; 12-19-2013 at 05:19 AM.
 
Old 12-19-2013, 05:36 AM   #26
suvarna25
LQ Newbie
 
Registered: Dec 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
I m going through this https://www.dropbox.com/s/zxtvgi2ifg...-server-lm.pdf

I m accessing my file as suggested in section 2.7.2
 
Old 12-19-2013, 09:34 AM   #27
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
Ok its a good tutorial for a beginner.
So what error you get while you access the site with IP address ?
fetch the logs "tail -f access.log" and error.log ? (this is imp to provide the logs)

Consider answering all question that i ask and not one..
 
Old 12-19-2013, 11:04 PM   #28
smbhandary
LQ Newbie
 
Registered: Jan 2013
Distribution: RHEL and AIX ( sort of )
Posts: 18

Rep: Reputation: Disabled
suvarna25,

Could you describe the environment a bit ?

You have two servers. Are they both on VirtualBox or VMWare or are they two different physical systems ?

Can they ping each other ? If not then first enable that.

Is port 8080 being listened on on the webserver on which the war file is ? run " netstat -an | grep -i list | grep 8080 " . If not first fix the webserver.

Check if the service is usable. run "ssh -v -p 8080 <ip of webserver where war file is > " first on the webserver itself and then on the remote server.
Do you see a line "connection established" ?
If not
a) disable SELinux ( its your test server anyway ) or configure SELinux .
b) get the web server - apache or tomcat or the thingamagic in use - running.

Have you configured your webserver to serve your application when requested ?

For all questions on How do I do that , please allow me to say RTFM and then ask Uncle Google. If those were not helpful, there is always linuxquestions.org you can bring your error message to.

Lets kick some ...
 
Old 12-19-2013, 11:24 PM   #29
suvarna25
LQ Newbie
 
Registered: Dec 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
I have created a website using apache server www.TestMerchant.com & able to access it on my pc. As i typed in address bar www.TestMerchant.com it gave me the appropriate output. Now I have to access my web site from other linux system which is o n same LAN. I have tried this as described in the section 3.1.1. As shown in fig 20 i also allowed that ip address to access web site but it didn't work. I don't know what to do.

There is no error log in access.log file because i can access web site easily on my ip address.
 
Old 12-20-2013, 12:30 AM   #30
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 664

Rep: Reputation: 81
@suvarna:
make a note of :

/etc/hosts file on other server has this entry
[your_web_server_ip] www.TestMerchant.com

if not try accessing your site by http://IP/site_dir

also check firewall connections if its tuned on, if your firewall is blocking the connections from the web server.
 
  


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
connect to remote linux system soumya_r Linux - Networking 2 03-26-2010 04:41 AM
Unable to connect to any system on the Network kvvsrinivas Linux - Networking 4 11-14-2008 07:39 AM
xhost issues: remote system unable to connect DaFrEQ SUSE / openSUSE 1 05-21-2008 08:45 PM
How to connect a Linux and a Windows system? bitpicker Linux - Networking 7 10-17-2004 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:50 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration