while working on our Neo4J graph application And setting debug logging for the root logger I came across the following statistics like message:
[DEBUG] HttpURLConnection: sun.net.www.MessageHeader#537f294a7 pairs: {GET /?totalmem=12758278144+propids=0+os.arch=amd64+edition=community+dist=unknown+source=maven+numprocs=4+mac=005056c00008+revision=2.1.5:2.1-maint:529/45c3cc04946c2b0e243e48c8252e40cb85931744+tags=spring,sdn,web+os.version=6.3+reg=unreg+relids=0+v=2.1.5+heapsize=47775896+os.name=Windows_8.1+id=641ca9a78ddc53ae+labelids=3+nodeids=0+p=-1 HTTP/1.1: null}{Cache-Control: no-cache}{Pragma: no-cache}{User-Agent: Java/1.8.0_51}{Host: 52.0.233.188}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
[DEBUG] HttpURLConnection: sun.net.www.MessageHeader#167dbd419 pairs: {null: HTTP/1.1 200 OK}{Server: nginx/1.6.2}{Date: Sun, 30 Aug 2015 10:05:40 GMT}{Content-Type: text/html}{Content-Length: 164}{Last-Modified: Fri, 01 Jun 2012 09:48:29 GMT}{Connection: keep-alive}{ETag: "4fc88fed-a4"}{Accept-Ranges: bytes}
I'm more than a little surprised because I haven't configured anything in Neo4j that tells it to share my machine configuration with some web server on the internets.
By the way, I know it is neo4j due to the version number (2.1.5) and community edition keywords, and the ip number 52.0.233.188 which resolves to an amazon aws dns entry but identifies itself as udc.neo4j.org.
I've discovered that this is a by-default-on Usage Data Collector service that Neo4j documents here:
http://neo4j.com/docs/stable/usage-data-collector.html
It contains details about how to disable it also.. Having said that, I really don't like this kind of stuff getting more and more prevalent in software nowadays.
UPDATE 1:
I've tried to disable the udc by following the steps described (http://neo4j.com/docs/stable/usage-data-collector.html#_how_to_disable_udc), but the UDC is still contacted. This is running from my Eclipse IDE, haven't tested yet with packaged fat jar:
[DEBUG] HttpURLConnection: sun.net.www.MessageHeader#32bc2cb97 pairs: {GET /?totalmem=42932072448+propids=1323+os.arch=amd64+edition=community+dist=unknown+source=maven+numprocs=24+mac=005056c00008+revision=2.1.8:2.1-maint:687/5c83ce3a5ddf33259593f719153ce71a6fe89fc7+tags=spring,sdn,web+os.version=6.3+reg=unreg+relids=810+v=2.1.8+heapsize=156271600+os.name=Windows_8.1+id=b599d44d76a45a87+labelids=10+nodeids=409+p=-1 HTTP/1.1: null}{Cache-Control: no-cache}{Pragma: no-cache}{User-Agent: Java/1.8.0_51}{Host: 52.0.233.188}{Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2}{Connection: keep-alive}
[DEBUG] HttpURLConnection: sun.net.www.MessageHeader#77bea48a9 pairs: {null: HTTP/1.1 200 OK}{Server: nginx/1.6.2}{Date: Mon, 31 Aug 2015 11:05:30 GMT}{Content-Type: text/html}{Content-Length: 164}{Last-Modified: Fri, 01 Jun 2012 09:48:29 GMT}{Connection: keep-alive}{ETag: "4fc88fed-a4"}{Accept-Ranges: bytes}
Related
Successfully installed influxdb on windows and everything is working as expected locally. But having trouble posting data from outside using http api.
I am able to connect to admin panel locally through
http://localhost:8083/
I am using below command for posting data from a remote server:
curl -i -XPOST 'http://172.29.6.195:8086/write?db=telegraf' --data-binary 'test_load,host=njxap1dbadm01 value=13.64'
I am getting below success message:
HTTP/1.1 204 No Content
Request-Id: d3b58c0c-f620-11e5-80a1-000000000000
X-Influxdb-Version: unknown
Date: Wed, 30 Mar 2016 02:40:55 GMT
log on server side:
[http] 2016/03/29 22:40:55 172.29.18.10 - - [29/Mar/2016:22:40:55
-0400] POST /write?db=telegraf HTTP/1.1 204 0 - curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC
zlib/1.2.3 libidn/1.18 libssh2/1.4.2
d3b58c0c-f620-11e5-80a1-000000000000 0
Even though I got the sucess message on client side some how the data is not getting saved on the database.
I checked for the data from admin panel and returning no data.Checked with curl get also no results.
I have retention policy of 1day for my database.
Please help me resolve with the issue of why the data is not getting saved to database.
I'm trying to reproduce this, but I'm not able to with the latest version on InfluxDB.
~$ curl -i -XPOST 'http://localhost:8086/write?db=telegraf' --data-binary 'test_load,host=njxap1dbadm01 value=13.64'
HTTP/1.1 204 No Content
Request-Id: 38fcfb17-fac3-11e5-8004-000000000000
X-Influxdb-Version: unknown
Date: Tue, 05 Apr 2016 00:13:28 GMT
Logs:
[http] 2016/04/04 17:13:28 ::1 - - [04/Apr/2016:17:13:28 -0700] POST /write?db=telegraf HTTP/1.1 204 0 - curl/7.43.0 38fcfb17-fac3-11e5-8004-000000000000 3.776752ms
Querying:
> use telegraf
Using database telegraf
> show series
key
test_load,host=njxap1dbadm01
> select * from test_load
name: test_load
---------------
time host value
1459815208633910164 njxap1dbadm01 13.64
Do you know what version of InfluxDB you are using?
When I try to create a database people collection on RavenDb, I get the following error:
The remote server returned an error: (403) Forbidden.
I hots the Raven on IIS and I am not sure what is going on. On the raven Management Studio, when I try to create a database, I get the below result:
Could not authenticate against server
Message: The remote server returned an error: NotFound. Uri:
/databases?database=Default Server Uri:
http://localhost:8888/docs/Raven/Databases/People
-- Error Information -- System.Net.WebException: The remote server returned an error: NotFound. at
System.Net.Browser.ClientHttpWebRequest.EndGetResponse(IAsyncResult
asyncResult) at System.Func2.Invoke(T arg) at
System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult
iar, Func2 endMethod, TaskCompletionSource1 tcs)
When I looked into this with process monitor, I see that I am getting bunch of not found errors:
Under C:\Utils\RavenDB\Web directory, there are Bin and Data folders, nothing more. Should I create the necessary folders by myself? I created the docs folder but nothing changed. Still having problems.
Any thoughts?
Edit:
Tried with fiddler on Raven Management Studio by creating a document:
Request:
PUT http://localhost:1786/docs/People HTTP/1.1
Accept: /
Accept-Language: en-US
Referer: http://localhost:1786/silverlight/Raven.Studio.xap
Content-Length: 24
Accept-Encoding: identity
If-None-Match: 00000000-0000-0000-0000-000000000000
Content-Type: application/json; charset=utf-8
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7
(KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7
Host: localhost:1786
Connection: Keep-Alive
Pragma: no-cache
{
"Name": "..."
}
Response:
HTTP/1.1 403 Forbidden
Cache-Control: private
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Thu, 08 Mar 2012 12:33:22 GMT
Content-Length: 0
This was answered in the comments, however I'll post it here for posterity.
The issue is resolved by changing the web.config value:
<add key="Raven/AnonymousAccess" value="Get"/>
To:
<add key="Raven/AnonymousAccess" value="All"/>
Here is the link to the config page that explains each of the options. Be aware that this option will in fact turn off authentication, if you wish to run with authentication you will need the 'Get' or 'None' setting and you will also need to make sure Windows Authentication is installed (IIS 7.5) and enabled on the Raven IIS Application.
I have recently moved my site over to a new host (VPS). Periodically when I browse to the site I see a string of data, such as --
��[�Rۺ� O���)��q.J�!l(�[�m2��8 �aɹ�ݙ�� ϓ�%�N���v�Mv'�-i]>----It�M�|�����p�B7���}����i��:�k\����~�Q.�մ��*BJ�soG���~�_ȸ���a���<�#HS}���\��R]ݕ ����\�\��A�caǬ(�QP��NE�� ����>����6����0��ZԹG��+oc���p�1]״�(�训錽oc�Z��%�Hwr��[����EX���G*o9p�� vڵ �HHW�C#{eT���#� =*U�%�Cz��J��jIAO"��q}�Q`U"�I�f��k�J�r����G��qcs[k�P��%�Bml�s��욃mh9"�1w�T��~�am���!+�p�K+i =J�t-%�O ީpU6l�P;�U��#T� 6l<�� �e���q�. N�E����Z�E���ў�1��.�j� ����4�/��pU&D�o�xW+��G��ہ����;�w���_ur�k�E�,#��Ġ���Д��.�A��t��/ ����\���{Ͼ=9�w�{jf��i������̹�C~�[���gc�;^��6��5�z)K��S��s����ku��l�7j�뇆�ɯr�6��WŜ�:7w��y}�e�1��;���������<�e|yV+l]7O�5u[?����V�`ҟ=�:\�^�}��_iY�����}9=���WEZ.l�ʞ�l���c�e+_82//h�!��V��o7g[��W�L��UU�����NtqG� b��b�]�i:�7�B��c���8wyUk}��k�����qʭ�I�xx�;��3]�Tw� ~-�w���m�o��K�4�ꃛsvsܻy,5���Qw�;|0�?�lY탃�˞�أ��p�g��枞36k����c��Z�{[�˂xO������K~|>�φ�֧Vùj�U�-/��� ѦL� �2}���� �R��-�b���ph� %?�֧��Q�]���B��kw�N���z#���e��F�S��~}�zUE�j�i�T�a��~'^3^�:k_�&ds{���6�r�����l.W�R����IZ�� z��ȈD�Z;pt)��:�S(31�2\=�!M��>�XD�֔��;gD_��IoDfCG�F�D�a�G!Μl 9ա��SX��N�T� �,��$<�j�kl~�Tp܅����X��>�p ���v�FڮO�L�����k��V��.����:�wo��P=��o���?��W��Q<8������uݏ��HkQ��?��1��SiaF.0�(;�7M�P�n4��4�x�IR�<3�����6rF�Ɇx���~ӄ=}pߑ�u�)�K�&���ړH�<+��&̎ y���& � D��I��Kܦ(?���(|� w6-c���N��ڞF�b۶|��!�%�l�|"���j6���-^A���X�w�pڦ�X��(��������f�h�ؐqb'όtI#<�-�="" r#d��w���w,okd�+nd�c�����="" 1k�w="" [�="" u�a��="" �v="" 4i;4�c���0���yo�]��z="">,��!��C��Q��>���zF;�:=�=���~�x�} c��Z!�tp��x�ǽ�oc���3�m��!Q~��ĵF�$̌N�ʂ��C�[���BIQ��}���q�j��I�:PR5H���RGC#/FSgU�V�Xz��$4�����~�w�5�n=ջ��}s|�]n�t/B��NC"�k��FE����GK� �#�>'��<���1b^Y�"p|Ԫ)HޞT���*:���W! �����]���f`6+["<�t'��d�h+��ܤ~q����Ȥ(="">N-��X�++R��`ŷcj2hӌ�OyGg JhZB�A*XY/+iث+�s%�1u��>2e���h(z�c#�N��A�e��}�{V�4��lR�}�jc�#��nGm�3���#�0"?�-�F5�#�"&?�&�Ԙ��d�W�����2���j�f�f�H� �b4zSs�w�B�$�3��:K��R�Ի*'�Ri3!�(F�skd+��]�R�u��'�J�|�eѯ��N�I1�:�����&j���;��Ҽ�eQ=Җ�zf�� �� �-�P�D�#n�h?�x�Q#��(&6�|���G�w�#�+;���*ͩL���:��Wr�I�f�aR�A�T#Oy��.R�#��!�.0�c�Z�Nbc�zU!z��eղ�e�W�X3�"�ӎ��Rh�ȇ~��܈��;:�s�t�Qڏ��Q�P��KE�������B��Ɖ�s�л�� V,�Z.$�W���K#�OBҨM���|�:��rC�'��.7i��F�s�T/R��"�^�����J�֞(�v��fC�8G��l/t���ƣ�ľ�����>�`�s�4�K�G5�a�{��D����<ԯ���K�O��sD�$�c�_d�7���{� �� �W�w>.-=�F�Z�W�;F��$�e-4�m�y����<�IĽv���C�c���M�v��O6l���ml�[َ�D��c�<د����p0�3�8���O�/�:�Ih���!<������c��ny=��9��jeee��|ֱ|'�8D|y zz�і��3�u��u����b�y�*jG������< ��Z4���v��c��I{�h�FB�����â���'sŴ,a����G5�%l��( #1�k3s���j�r͔L-���._ƶG� X<��C��y�߷DΒ��I�}#Y��#dJ����NxcJ���~���V���&��7"
Here is the header as seen in Firebug --
Response Headers
Cache-Control no-cache, must-revalidate, post-check=0, pre-check=0
Connection close
Content-Type text/html; charset=utf-8
Date Sun, 04 Mar 2012 17:43:55 GMT
Etag "1330883035"
Expires Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified Sun, 04 Mar 2012 17:43:55 +0000
Server Apache/2.2.15 (CentOS)
**Transfer-Encoding chunked**
Vary Cookie
**X-Drupal-Cache MISS**
X-Generator Drupal 7 (http://drupal.org)
X-Powered-By PHP/5.3.3
Request Headers
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-us,en;q=0.5
Connection keep-alive
Cookie __utma=162614910.1950275874.1326920494.1328073656.1328201988.4; __utmz=162614910.1326920494.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided); __utma=142212834.1354567149.1327029129.1329407721.1330721009.6; __utmz=142212834.1327029129.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); SESS9cac77df1227f59f7a6f85a5ce79093a=g49om8oemr508pag9qni57oj53; __qca=P0-556640154-1328084416252; DRUPAL_UID=1
Host domain.com
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
I'm at a loss here. I have searched for a solution with no luck. I hope I have provided enough information to diagnose this problem. Thanks.
UPDATE: when the header when display is normal (differences in **)--
Response Headers
**Cache-Control public, max-age=0**
Connection close
Content-Encoding gzip
Content-Length 3354
Content-Type text/html; charset=utf-8
Date Sun, 04 Mar 2012 19:24:29 GMT
Etag "1330883035-1"
Expires Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified Sun, 04 Mar 2012 17:43:55 +0000
Server Apache/2.2.15 (CentOS)
**Vary Cookie,Accept-Encoding**
**X-Drupal-Cache HIT**
X-Generator Drupal 7 (http://drupal.org)
X-Powered-By PHP/5.3.3
Request Headers
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-us,en;q=0.5
Connection keep-alive
Cookie __utma=162614910.1950275874.1326920494.1330883191.1330887981.6; __utmz=162614910.1330887981.6.2.utmcsr=xz.allanbendy.com|utmccn=(referral)|utmcmd=referral|utmcct=/; __utma=142212834.1354567149.1327029129.1329407721.1330721009.6; __utmz=142212834.1327029129.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); SESS9cac77df1227f59f7a6f85a5ce79093a=g49om8oemr508pag9qni57oj53; __qca=P0-556640154-1328084416252; DRUPAL_UID=1; has_js=1; __utmc=162614910; __utmb=162614910.6.10.1330887981
Host domain.com
**If-None-Match "1330883035-1"**
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
The Content-Type header here clearly says that the data is UTF-8 encoded. If it is not, then mess like the one in the example is to be expected, if there are any non-Ascii characters in the document.
Find out the actual encoding. If possible, convert the file to UTF-8 encoding. If that is not possible for some reason, check out whether you can affect the HTTP headers using a .htaccess file. Failing even that, you need to change all non-Ascii characters to character references or entity references.
It looks like the answer is compressed with gzip but the header "Content-Encoding: gzip" is missing in the first case.
I need charset to be utf-8, which seem to be the case by default. Recently I enabled page caching for a few static pages:
caches_page :about
The caching works fine, and I see the corresponding about.html and contact.html pages generated in my /public folder, except when the page renders, it's no longer in utf-8.
After googling for a bit I tried looking at the http headers with wget, before and after caching:
first time:
$wget --server-response http://localhost:3000/about
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 X-Ua-Compatible: IE=Edge
3 Etag: "f7b0b4dea015140f3b5ad90c3a392bef"
4 Connection: Keep-Alive
5 Content-Type: text/html; charset=utf-8
6 Date: Sun, 12 Jun 2011 03:44:22 GMT
7 Server: WEBrick/1.3.1 (Ruby/1.8.7/2009-06-12)
8 X-Runtime: 0.235347
9 Content-Length: 5520
10 Cache-Control: max-age=0, private, must-revalidate
cached:
$wget --server-response http://localhost:3000/about
Resolving localhost... 127.0.0.1
Connecting to localhost[127.0.0.1]:3000... connected.
HTTP request sent, awaiting response...
1 HTTP/1.1 200 OK
2 Last-Modified: Sun, 12 Jun 2011 03:34:42 GMT
3 Connection: Keep-Alive
4 Content-Type: text/html
5 Date: Sun, 12 Jun 2011 03:39:53 GMT
6 Server: WEBrick/1.3.1 (Ruby/1.8.7/2009-06-12)
7 Content-Length: 5783
as a result the page displays in ISO-8859-1 and I get a bunch of garbled text. Does anyone know how I can prevent this undesirable result? Thank you.
The solution will depend on the server used.
When you use page cache, the servers reads the server directly, so the rails stack does not provide encoding information to the server. Then the server default apply.
If you're using apache with passenger, add to the configuration:
AddDefaultCharset UTF-8
If you need specific charsets, use a solution like the one in http://www.philsergi.com/2007/06/rails-page-caching-and-mime-types.html
<LocationMatch \/(rss)\/?>
ForceType text/xml;charset=utf-8
</LocationMatch>
<LocationMatch \/(ical)\/?>
ForceType text/calendar;charset=utf-8
</LocationMatch>
I develop an internal web application for my company. It is used by our field technicians, all of whom carry a BlackBerry 8330 running 4.5. I would consider myself fortunate to have such a consistent target platform, if it wasn't BB 4.5...
I've noticed a lot of request overhead in loading the site, and know that if only my CSS resources were cached, the load time would be cut dramatically. The BB always requests a full copy of the CSS file, no matter if the Expires, Cache-Control, or Last-Modified headers are set. It doesn't hit its cache, it doesn't send an If-Modified-Since, nothing.
Anyone run into this or know what I can do to workaround it? I'd really like to avoid inlining my CSS if I don't have to.
EDIT: I just noticed that it is always requesting the page twice. Below are diffs between to 2 requests
GET /css/bb.css HTTP/1.1 |GET /css/bb.css HTTP/1.1
User-Agent: BlackBerry8330/4.5.0.77|User-Agent: BlackBerry8330/4.5.0.77
profile: http://www.blackberry.net/|profile: http://www.blackberry.net/
-----------------------------------|Accept: application/vnd.rim.html,te
-----------------------------------|Connection: close
Referer: http://10.7.2.167/page.php|Referer: http://10.7.2.167/page.php
-----------------------------------|Accept-Charset: ISO-8859-1,UTF-8,US
Host: 10.7.2.167 |Host: 10.7.2.167
-----------------------------------|Accept-Language: en-US,en;q=0.5
-----------------------------------|x-wap-profile: "http://www.blackber
Cookie: PHPSESSID=xxxxxxxx; token=x|Cookie: PHPSESSID=xxxxxxxx; token=x
-----------------------------------|Via: MDS_5.0.0.86
|
HTTP/1.1 200 OK |HTTP/1.1 200 OK
Date: Sun, 05 Sep 2010 09:34:52 GMT|Date: Sun, 05 Sep 2010 09:34:54 GMT
Server: Apache/2.2.15 (Debian) |Server: Apache/2.2.15 (Debian)
Last-Modified: Sat, 04 Sep 2010 02:|Last-Modified: Sat, 04 Sep 2010 02:
ETag: "10426-d64-48f65ab39bf80" |ETag: "10426-d64-48f65ab39bf80"
Accept-Ranges: bytes |Accept-Ranges: bytes
Content-Length: 3428 |Content-Length: 3428
Cache-Control: max-age=12960000 |Cache-Control: max-age=12960000
Expires: Wed, 02 Feb 2011 09:34:52 |Expires: Wed, 02 Feb 2011 09:34:54
Vary: Accept-Encoding |Vary: Accept-Encoding
-----------------------------------|Connection: close
Content-Type: text/css |Content-Type: text/css