dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23538
Re: Strange request from 127.0.0.1
Thinking about the nature of IP this is probably not possible ... the
"real" server name from the request is certainly possible, but the
destination IP (as used by the client) is not really recoverable - along
the way it might well have been natted for example (or even load balanced),
so the IP of the interface the server is listening on will rarely be the
same as the one the client resolved for the FQDN. The only way to know it
really is to request the same nameserver which the client did. There isn't
any realistic way you could do this :-)
On 19 July 2013 18:41, Jason Pickering <jason.p.pickering@xxxxxxxxx> wrote:
> I run the same type of setup on a number of production servers.
> Nginx/Apache are definitely not the problem, as their memory consumption
> compared to DHIS2 and the database, is negligible. I suspect it is a
> configuration issue of your server.
>
> On a related note Bob, do you know how to get the "real IP" of the server
> into the Tomcat logs? The header directive is necessary, but does not show
> up in my Tomcat logs with the user's IP. I somehow think it is not possible
> but maybe I am missing something.
>
> Regards,
> Jason
>
>
>
> On Fri, Jul 19, 2013 at 4:26 PM, Ngoc Thanh Nguyen <
> thanh.hispvietnam@xxxxxxxxx> wrote:
>
>> Thanks Bob. That's definitely the case. However, do you think this can
>> affect the performance? In other words, will it cause server memory or cpu
>> problem?
>>
>> Thanh
>>
>>
>> On Fri, Jul 19, 2013 at 7:24 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>wrote:
>>
>>> I am sure you have a proxy (nginx or apache?) on the same machine. So
>>> the users access the proxy and the proxy accesses tomcat (which sees the
>>> request as a local one).
>>>
>>> You need to add a directive to your proxy to preserve the name of the
>>> requesting host. On nginx this is:
>>>
>>> see http://ashberlin.co.uk/blog/nginx-proxy-host-header
>>>
>>> On apache2:
>>>
>>> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost
>>>
>>> Bob
>>>
>>>
>>>
>>>
>>>
>>> On 19 July 2013 13:39, <jeromeshaguy@xxxxxxxxx> wrote:
>>>
>>>> **
>>>> Hi Ngoc, no my server is not public
>>>> Sent from my BlackBerry wireless device from MTN
>>>> ------------------------------
>>>> *From: * Ngoc Thanh Nguyen <thanh.hispvietnam@xxxxxxxxx>
>>>> *Date: *Fri, 19 Jul 2013 18:36:20 +0700
>>>> *To: *jerome shaguy<jeromeshaguy@xxxxxxxxx>
>>>> *Cc: *dhis2-devs<dhis2-devs@xxxxxxxxxxxxxxxxxxx>
>>>> *Subject: *Re: [Dhis2-devs] Strange request from 127.0.0.1
>>>>
>>>> Hi Jerome,
>>>>
>>>> Is your server public? In my case, I am guessing that some bad guys
>>>> have hacked into the system by exploiting some security holes of the system
>>>> or probably dhis2 itself.
>>>>
>>>> Thanh
>>>>
>>>>
>>>> On Fri, Jul 19, 2013 at 5:05 PM, jerome shaguy <jeromeshaguy@xxxxxxxxx>wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I have also been experiencing the same problem with my tomcat as
>>>>> reported by Ngoc (but in my case it was only after I upgraded my war file
>>>>> to 2.12) I am seeing a lot of requests in the log even though I am on
>>>>> 127.0.0.1 and its constantly exceeding memory and completely halting simple
>>>>> processes... I have tried to adjust memory to tomcat but this has not
>>>>> helped. I join Ngoc in asking is there anyone out there with a solution?
>>>>>
>>>>>
>>>>> On Fri, Jul 19, 2013 at 10:20 AM, Ngoc Thanh Nguyen <
>>>>> thanh.hispvietnam@xxxxxxxxx> wrote:
>>>>>
>>>>>> In our server tomcat access log, there are lots of requests from
>>>>>> 127.0.0.1 which is obviously local request. However, no one from our team
>>>>>> actually working from the server so it must be automatic requests. This
>>>>>> might be the reason for our server problems last several days as the system
>>>>>> always results in full CPU or exceeding memory.
>>>>>>
>>>>>> Any one have ideas on how to kill these process?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
References