Hi Gwyn,

There are no stupid questions!!   Everyone tends to miss something very obvious at times and usually screws things up..
 
Here is my setup..  

I have these virtual hosts:
login.virtualrealmsgrid.com 
hg.virtualrealmsgrid.com

For my networking..   Internal IP are changed for example.. 
 Internet IP: 184.70.53.242
Internal network:
Router IP:            10.10.10.2
Webserver:         10.10.10.4
Robust server:    10.10.10.8
Region server 1: 10.10.10.10

Nginx server:      10.10.10.18

port 80 is open on my router..
port 9000 is open on my router

My opensim .ini's    point to either login.virtualrealmsgrid.com or hg.virtualrealmsgrid.com depending on the proper places..  I do not use Ip addresses.. 
My Nginx vhost.conf is setup like this..

server {
   listen 80;
   server_name virtualrealmsgrid.com www.virtualrealmsgrid.com;

   access_log /var/log/nginx/vrg.log;
   error_log /var/log/nginx/errorvrg.log;
   #access_log logs/host.access.log main;

   location / {
   proxy_pass http://10.10.10.4:8010/;

  proxy_redirect off;

  proxy_set_header Host $host; 
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_max_temp_file_size 1m;

 client_max_body_size 10m;
 client_body_buffer_size 128k;

 proxy_connect_timeout 90;
 proxy_send_timeout 90;
 proxy_read_timeout 90;

 proxy_buffer_size 4k;
 proxy_buffers 4 32k;
 proxy_busy_buffers_size 64k;
 proxy_temp_file_write_size 64k;
 }

 # redirect server error pages to the static page /50x.html 
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root /usr/share/nginx/html;
 }
server {

 server_name login.virtualrealmsgrid.com hg.virtualrealmsgrid.com;

 access_log /var/log/nginx/vrgmain.log;
 error_log /var/log/nginx/vrgmainerror.log;
 #access_log logs/host.access.log main;

 location / {

 proxy_redirect off;


 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
 #proxy_set_header X-Forwarded-For $remote_addr;
 proxy_pass http://10.10.1.8:8002;


 proxy_max_temp_file_size 1m;


 client_max_body_size 10m;
 client_body_buffer_size 128k;

 proxy_connect_timeout 90;
 proxy_send_timeout 90;
 proxy_read_timeout 90;

 proxy_buffer_size 4k;
 proxy_buffers 4 32k;
 proxy_busy_buffers_size 64k;
 proxy_temp_file_write_size 64k;
 }

 # redirect server error pages to the static page /50x.html
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root /usr/share/nginx/html;
 }
}

Now when I log in to opensim..   things look okay everything works.
Except when I logoff I get:
 13:44:02 - [USER AGENT CONNECTOR]: Unable to contact remote server http://184.70.53.242/ for GetBoolResponse
 and when I try to hypergrid I get:
2013-11-09 13:43:24,866 DEBUG - OpenSim.Services.Connectors.Simulation.SimulationServiceConnector [REMOTE SIMULATION CONNECTOR]: Creating agent at http://184.70.53.242/
2013-11-09 13:43:24,874 DEBUG - OpenSim.Framework.WebUtil [WEB UTIL]: ServiceOSD request 482 http://184.70.53.242/homeagent/a887910d-072c-42f2-92ae-17e69f65d118/ POST FAILED: [NotFound] Not Found
2013-11-09 13:43:24,882 DEBUG - OpenSim.Framework.WebUtil [WEB UTIL]: ServiceOSD request 483 http://184.70.53.242/homeagent/a887910d-072c-42f2-92ae-17e69f65d118/ POST FAILED: [NotFound] Not Found
2013-11-09 13:43:24,882 WARN - OpenSim.Services.Connectors.Simulation.SimulationServiceConnector [REMOTE SIMULATION CONNECTOR]: Failed to create agent Todd Davis at remote simulator
 
I have looked every where for a reference pointing to the Internet IP 184.70.53.242 there is nothing.. 

I have no idea where OpenSim is getting my internet ip from..   Now I can work around that by yes as you thought, by pointing nginx to forward my internet Ip 184.70.53.242 to my robust server then both these errors go away..  But then I get
nginx passing its ip address to opensim when I hypergrid and the hypergrid fails because opensim sees my remote ip and the nginx ip and fails the hypergrid Ip verification..  And no matter what setting I have for remote ip forwarding in my nginx config..  

I am more then a little confused..    Where have I messed up or what setting have I missed?   

Any ideas??

Thanks
Todd


-------- Original Message --------
Subject: Re: [Opensim-users] Hypergrid issues after installing Nginx
Reverse Proxy
From: Gwyneth Llewelyn <[email protected]>
Date: Sat, November 09, 2013 8:17 am
To: [email protected]

Hi Todd,

I know that this might not be very helpful, but as both a fan of Nginx and OpenSim, your thread interested me :)

I have what might be a very stupid question, so feel free to ignore me, but... as far as I can see, you are somehow redirecting the connection to 184.70.53.242:80 to your internal IP on port 8002. This is confusing to me, since http://184.70.53.242:80/ is actually being forwarded to your own webserver running Joomla. So a request to http://184.70.53.242/homeagent/a887910d-072c-42f2-92ae-17e69f65d118/ is being sent to Joomla and not to your OpenSim grid.

My question is how you manage to get both working at the same time *if you're using an IP address*. I supposed that if you had a virtual host, e.g. grid.virtualrealmsgrid.com, and configure everything at Nginx to point requests to grid.virtualrealmsgrid.com instead of using the IP address, this ought to work, because Nginx or any other webserver/proxy server/reverse proxy cache server is able to deal with virtual hosting. I fail to understand how you can accomplish that merely with an IP address (unless you explicitly list the port for it).

In my case, I have a grid behind a firewall, obviously with private addresses. There is a virtual host for the grid, which runs at the usual ports, but using that virtual host at port 80 will redirect users to a site running WordPress. The difference in my case is that, to keep things simple at the Nginx level, I explicitly add the port at the end, so I can be sure that :8002 is OpenSim, :80 is WordPress :) However, all the configurations in the OpenSim .ini files always use the virtual host, never the IP address, EXCEPT on the Regions file, where the INTERNAL IP address is listed explicitly.

Maybe this helps, or maybe I've completely misunderstood your configuration!

- Gwyn

On 08/11/2013, at 00:48, <[email protected]> <[email protected]> wrote:

>
>
> Hi,
>
> So I did some research.. I still can not get hypergrid to work.. I have changed the forward headers like Michael and Tim suggested.. Thanks guys for the suggestion.
>
> I still get the same errors..
>
> When I log off:
> 2013-11-06 16:26:24,869 DEBUG - OpenSim.Services.Connectors.Hypergrid.UserAgentServiceConnector [USER AGENT CONNECTOR]: Unable to contact remote server http://184.70.53.242/ for GetBoolResponse
>
>
> When I try to hypergrid:
> 2013-11-06 16:25:51,857 DEBUG - OpenSim.Framework.WebUtil [WEB UTIL]: ServiceOSD request 1506 http://184.70.53.242/homeagent/a887910d-072c-42f2-92ae-17e69f65d118/ POST FAILED: [NotFound] Not Found
>
> 2013-11-06 16:25:51,864 DEBUG - OpenSim.Framework.WebUtil [WEB UTIL]: ServiceOSD request 1507 http://184.70.53.242/homeagent/a887910d-072c-42f2-92ae-17e69f65d118/ POST FAILED: [NotFound] Not Found
> 2013-11-06 16:25:51,866 WARN - OpenSim.Services.Connectors.Simulation.SimulationServiceConnector [REMOTE SIMULATION CONNECTOR]: Failed to create agent Todd Davis at remote simulator
>
> 2013-11-06 16:25:51,868 DEBUG - OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule [ENTITY TRANSFER MODULE]: Teleport of Todd Davis from Mezzo Realm to Lbsa Plaza was refused because Service request failed: [NotFound] Not Found
>
> For the hypergrid try why is it using my external Ip to look for my home agent and not hg.virtualrealmsgrid.com?
>
> console post just before this says:
> 19:31:13 - [REMOTE SIMULATION CONNECTOR]: Creating agent at http://184.70.53.242/
>
> So is something not getting passed from Nginx telling the robust that I am using hg.virtualrealmsgrid.com?
>
> Sorry to bother about this it is just a little confusing.. Any more suggestion would be greatly appreciated..
>
> Thanks
> Todd
>
>
>
> -------- Original Message --------
> Subject: Re: [Opensim-users] Hypergrid issues after installing Nginx
> Reverse Proxy
> From: Michael Emory Cerquoni <[email protected]>
> Date: Wed, November 06, 2013 7:45 pm
> To: OpenSim Users Mailing List <[email protected]>
>
> Nothing to worry about its likely cached, clear viewer cache and it should go back to normal.
> On Nov 6, 2013 9:14 PM, <[email protected]> wrote:
> Okay something very odd.. I am using Firestorm.. when I log in I get this above my head..
>
> Todd Davis
> @virtualrealmsgrid.com:8002
>
> It is like the grid is treating me like I am hypergriding with my former grid URI.
> Any ideas?
>
> Todd
>
> -------- Original Message --------
> Subject: Re: [Opensim-users] Hypergrid issues after installing Nginx
> Reverse Proxy
> From: Timothy Rogers <[email protected]>
> Date: Wed, November 06, 2013 3:49 pm
> To: [email protected]
>
> Thanks Michael, if I ever decide to use NiGNX or anyone else that is
> an awesome article! Here is the one for Apache for people using Apache
> setup: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html
>
> On Wed, Nov 6, 2013 at 5:44 PM, Michael Emory Cerquoni
> <[email protected]> wrote:
> > Teravus posted this here 3-4 weeks ago it may help you out >
> > http://www.networkinghowtos.com/howto/set-the-x-forwarded-for-header-on-a-nginx-reverse-proxy-setup/
> >
> >
> > On Wed, Nov 6, 2013 at 5:42 PM, Timothy Rogers <[email protected]>
> > wrote:
> >>
> >> One issue I ran into when I was setting up Apache Reverse Proxy, I
> >> noticed I never told it to forward headers, that may be one of your
> >> issues if it is not forwarding the proper header information. I am not
> >> to sure how NiGNX handles headers through reverse proxy.
> >>
> >> On Wed, Nov 6, 2013 at 5:18 PM, <[email protected]>
> >> wrote:
> >> > Hi I setup a Nginx Reverse Proxy on my grid. Now I no one can hypergrid
> >> > in
> >> > or out.
> >> >
> >> > I did check connectivity thru the Proxy server and it works. I can log
> >> > in
> >> > via the new login Uri: login.virtualrealmsgrid.com and I can even log in
> >> > with the new hypergrid address hg.virtualrealmsgrid.com as the login
> >> > url..
> >> > SO I know the proxy server is working.
> >> >
> >> > Trying to hypergrid in to the grid from another grid I get this result.
> >> >
> >> > If I log into Osgrid or Craftworld I search for hg.virtualrealmsgrid.com
> >> > in
> >> > the map they find the grid. But when I try to teleport to I get
> >> > Problem
> >> > Destination. I look at my robust log and there is nothing about
> >> > hypergrid
> >> > in from either grid.
> >> > If I open my port 8002 on my router I see an attempt at hypergrid but
> >> > the
> >> > error I get is:
> >> > 2013-11-06 04:01:48,202 DEBUG -
> >> > OpenSim.Services.HypergridService.GatekeeperService [GATEKEEPER
> >> > SERVICE]:
> >> > Verifying http://virtualrealmsgrid.com:8002 against
> >> > http://hg.virtualrealmsgrid.com
> >> >
> >> > virtualrealmsgrid.com:8002 use to be the Login URI and Hypergate info..
> >> > with the Proxy it is:
> >> >
> >> > login URI = "login.virtualrealmsgrid.com"
> >> >
> >> > hypergrid info for the grid is:
> >> > HomeURI = "http://hg.virtualrealmsgrid.com"
> >> >
> >> > GatekeeperURI = "http://hg.virtualrealmsgrid.com"
> >> >
> >> >
> >> > When I log in to the grid as a local user I get some errors in the
> >> > OpenSim.log when I try to hypergrid. these are:
> >> >
> >> > 2013-11-06 16:25:51,857 DEBUG - OpenSim.Framework.WebUtil [WEB UTIL]:
> >> > ServiceOSD request 1506
> >> > http://184.70.53.242/homeagent/a887910d-072c-42f2-92ae-17e69f65d118/
> >> > POST
> >> > FAILED: [NotFound] Not Found
> >> >
> >> > 2013-11-06 16:25:51,864 DEBUG - OpenSim.Framework.WebUtil [WEB UTIL]:
> >> > ServiceOSD request 1507
> >> > http://184.70.53.242/homeagent/a887910d-072c-42f2-92ae-17e69f65d118/
> >> > POST
> >> > FAILED: [NotFound] Not Found
> >> > 2013-11-06 16:25:51,866 WARN -
> >> > OpenSim.Services.Connectors.Simulation.SimulationServiceConnector
> >> > [REMOTE
> >> > SIMULATION CONNECTOR]: Failed to create agent Todd Davis at remote
> >> > simulator
> >> >
> >> > 2013-11-06 16:25:51,868 DEBUG -
> >> > OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule
> >> > [ENTITY TRANSFER MODULE]: Teleport of Todd Davis from Mezzo Realm to
> >> > Lbsa
> >> > Plaza was refused because Service request failed: [NotFound] Not Found
> >> >
> >> >
> >> >
> >> > Also I get one error when I log off the grid as a user in the
> >> > OpenSim.log.
> >> >
> >> > 2013-11-06 16:26:24,869 DEBUG -
> >> > OpenSim.Services.Connectors.Hypergrid.UserAgentServiceConnector [USER
> >> > AGENT
> >> > CONNECTOR]: Unable to contact remote server http://184.70.53.242/ for
> >> > GetBoolResponse
> >> >
> >> > The setup for the grid is the only the hypergrid server information is
> >> > exposed to the internet ie: all the 8002 connectors pass through the
> >> > proxy
> >> > and the 8003 connectors are on a internal network ip system.. Save I
> >> > have a
> >> > SRAS Asset server running that is on 8004 and that is exposed to the
> >> > internet also (that is another question but it needs to wait).
> >> >
> >> > I have checked and rechecked to make sure all references to old
> >> > virtualrealmsgrid.com:8002 are changed to new proxy URIs.. I have
> >> > even
> >> > gone through all my databases to make sure nothing shows
> >> > virtualrealmsgrid:8002
> >> >
> >> > So the long and short of this is I think there is something not pointing
> >> > properly in either the Robust.HG.ini, OpenSim.ini or GridCommon.ini not
> >> > talking to the hypergrid connectors..
> >> >
> >> > Thanks for the help in advance..
> >> >
> >> > Todd
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > Opensim-users mailing list
> >> > [email protected]
> >> > https://lists.berlios.de/mailman/listinfo/opensim-users
> >> _______________________________________________
> >> Opensim-users mailing list
> >> [email protected]
> >> https://lists.berlios.de/mailman/listinfo/opensim-users
> >
> >
> >
> >
> > --
> > Michael Emory Cerquoni
> >
> > _______________________________________________
> > Opensim-users mailing list
> > [email protected]
> > https://lists.berlios.de/mailman/listinfo/opensim-users
> _______________________________________________
> Opensim-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/opensim-users
>
> _______________________________________________
> Opensim-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/opensim-users
> _______________________________________________
> Opensim-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/opensim-users
> _______________________________________________
> Opensim-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users

Reply via email to