LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to connect with linux system to other linux system (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-connect-with-linux-system-to-other-linux-system-4175488104/)

SAbhi 12-18-2013 08:21 AM

@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


suvarna25 12-18-2013 10:52 PM

Output of netstat -lnp | grep http

tcp 0 0 :::80 :::* LISTEN 3076/httpd

SAbhi 12-19-2013 01:23 AM

Quote:

Originally Posted by suvarna25 (Post 5083647)
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


suvarna25 12-19-2013 01:39 AM

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)

suvarna25 12-19-2013 01:43 AM

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)

SAbhi 12-19-2013 03:17 AM

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.

suvarna25 12-19-2013 03:49 AM

Command lsof -i:8080 shows noting now.

SAbhi 12-19-2013 04:47 AM

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.

suvarna25 12-19-2013 05:05 AM

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?

SAbhi 12-19-2013 05:13 AM

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.

suvarna25 12-19-2013 05:36 AM

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

SAbhi 12-19-2013 09:34 AM

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..

smbhandary 12-19-2013 11:04 PM

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 ...

suvarna25 12-19-2013 11:24 PM

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.

SAbhi 12-20-2013 12:30 AM

@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.


All times are GMT -5. The time now is 03:12 PM.