fzaninotto / uptime

A remote monitoring application using Node.js, MongoDB, and Twitter Bootstrap.
http://fzaninotto.github.com/uptime/
MIT License
3.62k stars 706 forks source link

node-gyp rebuild #304

Closed i-sam closed 9 years ago

i-sam commented 9 years ago
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls raw-socket
npm ERR! There is likely additional logging output above.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'install' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose install where, deps [ '/srv/uptime',
4 verbose install   [ 'mongoose',
4 verbose install     'mongoose-lifecycle',
4 verbose install     'express',
4 verbose install     'express-partials',
4 verbose install     'connect-flash',
4 verbose install     'ejs',
4 verbose install     'config',
4 verbose install     'async',
4 verbose install     'socket.io',
4 verbose install     'semver',
4 verbose install     'moment',
4 verbose install     'nodemailer',
4 verbose install     'net-ping',
4 verbose install     'js-yaml',
4 verbose install     'webpagetest',
4 verbose install     'mocha',
4 verbose install     'should' ] ]
5 verbose install where, peers [ '/srv/uptime', [] ]
6 info preinstall node-uptime@3.2.0
7 warn package.json connect-flash@0.1.0 No README data
8 warn package.json mongoose@3.6.7 bugs.email field must be a string email. Deleted.
9 verbose already installed skipping mocha@1.7.x /srv/uptime
10 verbose already installed skipping should@1.1.0 /srv/uptime
11 verbose already installed skipping mongoose@3.6.7 /srv/uptime
12 verbose already installed skipping mongoose-lifecycle@1.0.0 /srv/uptime
13 verbose already installed skipping express@3.2.0 /srv/uptime
14 verbose already installed skipping express-partials@0.1.1 /srv/uptime
15 verbose already installed skipping connect-flash@0.1.0 /srv/uptime
16 verbose already installed skipping ejs@0.8.3 /srv/uptime
17 verbose already installed skipping config@0.4.32 /srv/uptime
18 verbose already installed skipping async@0.1.22 /srv/uptime
19 verbose already installed skipping socket.io@0.9.14 /srv/uptime
20 verbose already installed skipping semver@1.1.0 /srv/uptime
21 verbose already installed skipping moment@2.1.0 /srv/uptime
22 verbose already installed skipping nodemailer@0.3.35 /srv/uptime
23 silly cache add args [ 'net-ping@1.1.7', null ]
24 verbose cache add spec net-ping@1.1.7
25 silly cache add parsed spec { raw: 'net-ping@1.1.7',
25 silly cache add   scope: null,
25 silly cache add   name: 'net-ping',
25 silly cache add   rawSpec: '1.1.7',
25 silly cache add   spec: '1.1.7',
25 silly cache add   type: 'version' }
26 verbose addNamed net-ping@1.1.7
27 silly addNamed semver.valid 1.1.7
28 silly addNamed semver.validRange 1.1.7
29 silly mapToRegistry name net-ping
30 silly mapToRegistry using default registry
31 silly mapToRegistry registry https://registry.npmjs.org/
32 silly mapToRegistry uri https://registry.npmjs.org/net-ping
33 verbose addNameVersion registry:https://registry.npmjs.org/net-ping not in flight; fetching
34 verbose already installed skipping js-yaml@2.1.0 /srv/uptime
35 verbose already installed skipping webpagetest@0.2.0 /srv/uptime
36 verbose request uri https://registry.npmjs.org/net-ping
37 verbose request no auth needed
38 info attempt registry request try #1 at 12:24:01
39 verbose request id 063f67cd554403c4
40 verbose etag "8Z4WQES7MLNTSODUMTAT7D6M0"
41 http request GET https://registry.npmjs.org/net-ping
42 http 304 https://registry.npmjs.org/net-ping
43 silly get cb [ 304,
43 silly get   { date: 'Mon, 16 Mar 2015 12:24:08 GMT',
43 silly get     server: 'Apache',
43 silly get     via: '1.1 varnish',
43 silly get     'last-modified': 'Mon, 16 Mar 2015 12:24:08 GMT',
43 silly get     'cache-control': 'max-age=60',
43 silly get     etag: '"8Z4WQES7MLNTSODUMTAT7D6M0"',
43 silly get     age: '0',
43 silly get     'x-served-by': 'cache-ams4138-AMS',
43 silly get     'x-cache': 'MISS',
43 silly get     'x-cache-hits': '0',
43 silly get     'x-timer': 'S1426508648.086515,VS0,VE840',
43 silly get     vary: 'Accept',
43 silly get     'content-length': '0',
43 silly get     'keep-alive': 'timeout=10, max=50',
43 silly get     connection: 'Keep-Alive' } ]
44 verbose etag https://registry.npmjs.org/net-ping from cache
45 verbose get saving net-ping to /root/.npm/registry.npmjs.org/net-ping/.cache.json
46 silly cache afterAdd net-ping@1.1.7
47 verbose afterAdd /root/.npm/net-ping/1.1.7/package/package.json not in flight; writing
48 verbose afterAdd /root/.npm/net-ping/1.1.7/package/package.json written
49 silly install resolved [ { name: 'net-ping',
49 silly install resolved     version: '1.1.7',
49 silly install resolved     description: 'Ping many hosts at once.',
49 silly install resolved     main: 'index.js',
49 silly install resolved     directories: { example: 'example' },
49 silly install resolved     dependencies: { 'raw-socket': '*' },
49 silly install resolved     contributors: [ [Object] ],
49 silly install resolved     repository:
49 silly install resolved      { type: 'mercurial',
49 silly install resolved        url: 'https://bitbucket.org/stephenwvickers/node-net-ping' },
49 silly install resolved     keywords:
49 silly install resolved      [ 'echo',
49 silly install resolved        'icmp',
49 silly install resolved        'monitor',
49 silly install resolved        'monitoring',
49 silly install resolved        'net',
49 silly install resolved        'network',
49 silly install resolved        'ping',
49 silly install resolved        'trace',
49 silly install resolved        'trace-route',
49 silly install resolved        'traceroute',
49 silly install resolved        'tracert' ],
49 silly install resolved     author:
49 silly install resolved      { name: 'Stephen Vickers',
49 silly install resolved        email: 'stephen.vickers.sv@gmail.com' },
49 silly install resolved     license: 'MIT',
49 silly install resolved     _id: 'net-ping@1.1.7',
49 silly install resolved     dist:
49 silly install resolved      { shasum: '49f5bca55a30a3726d69253557f231135a637075',
49 silly install resolved        tarball: 'http://registry.npmjs.org/net-ping/-/net-ping-1.1.7.tgz' },
49 silly install resolved     _from: 'net-ping@1.1.7',
49 silly install resolved     _npmVersion: '1.2.17',
49 silly install resolved     _npmUser:
49 silly install resolved      { name: 'stephen.vickers',
49 silly install resolved        email: 'stephen.vickers.sv@gmail.com' },
49 silly install resolved     maintainers: [ [Object] ],
49 silly install resolved     _shasum: '49f5bca55a30a3726d69253557f231135a637075',
49 silly install resolved     _resolved: 'https://registry.npmjs.org/net-ping/-/net-ping-1.1.7.tgz',
49 silly install resolved     readme: 'ERROR: No README data found!' } ]
50 info install net-ping@1.1.7 into /srv/uptime
51 info installOne net-ping@1.1.7
52 verbose installOne of net-ping to /srv/uptime not in flight; installing
53 verbose lock using /root/.npm/_locks/net-ping-3d2b0c572a49c75f.lock for /srv/uptime/node_modules/net-ping
54 silly install write writing net-ping 1.1.7 to /srv/uptime/node_modules/net-ping
55 silly cache addNamed cb net-ping@1.1.7
56 verbose unbuild node_modules/net-ping
57 verbose gentlyRm vacuuming /srv/uptime/node_modules/net-ping
58 verbose tar unpack /root/.npm/net-ping/1.1.7/package.tgz
59 verbose tar unpacking to /srv/uptime/node_modules/net-ping
60 verbose gentlyRm vacuuming /srv/uptime/node_modules/net-ping
61 silly gunzTarPerm modes [ '755', '644' ]
62 silly gunzTarPerm extractEntry package.json
63 silly gunzTarPerm extractEntry README.md
64 silly gunzTarPerm extractEntry index.js
65 silly gunzTarPerm extractEntry .hgignore
66 silly gunzTarPerm extractEntry .hgtags
67 silly gunzTarPerm extractEntry example/ping-packet-size.js
68 silly gunzTarPerm extractEntry example/ping-response-time.js
69 silly gunzTarPerm extractEntry example/ping-ttl.js
70 silly gunzTarPerm extractEntry example/ping.js
71 silly gunzTarPerm extractEntry example/ping6-ttl.js
72 silly gunzTarPerm extractEntry example/ping6.js
73 silly gunzTarPerm extractEntry example/trace-route.js
74 info preinstall net-ping@1.1.7
75 silly prepareForInstallMany adding raw-socket@* from net-ping dependencies
76 silly cache add args [ 'raw-socket@*', null ]
77 verbose cache add spec raw-socket@*
78 silly cache add parsed spec { raw: 'raw-socket@*',
78 silly cache add   scope: null,
78 silly cache add   name: 'raw-socket',
78 silly cache add   rawSpec: '*',
78 silly cache add   spec: '*',
78 silly cache add   type: 'range' }
79 verbose addNamed raw-socket@*
80 silly addNamed semver.valid null
81 silly addNamed semver.validRange *
82 silly addNameRange { name: 'raw-socket', range: '*', hasData: false }
83 silly mapToRegistry name raw-socket
84 silly mapToRegistry using default registry
85 silly mapToRegistry registry https://registry.npmjs.org/
86 silly mapToRegistry uri https://registry.npmjs.org/raw-socket
87 verbose addNameRange registry:https://registry.npmjs.org/raw-socket not in flight; fetching
88 verbose request uri https://registry.npmjs.org/raw-socket
89 verbose request no auth needed
90 info attempt registry request try #1 at 12:24:02
91 verbose etag "5E4VZVIYLGNMP163XP39160NK"
92 http request GET https://registry.npmjs.org/raw-socket
93 http 304 https://registry.npmjs.org/raw-socket
94 silly get cb [ 304,
94 silly get   { date: 'Mon, 16 Mar 2015 12:24:09 GMT',
94 silly get     server: 'Apache',
94 silly get     via: '1.1 varnish',
94 silly get     'last-modified': 'Mon, 16 Mar 2015 12:24:10 GMT',
94 silly get     'cache-control': 'max-age=60',
94 silly get     etag: '"5E4VZVIYLGNMP163XP39160NK"',
94 silly get     age: '1',
94 silly get     'x-served-by': 'cache-ams4131-AMS',
94 silly get     'x-cache': 'MISS',
94 silly get     'x-cache-hits': '0',
94 silly get     'x-timer': 'S1426508649.149829,VS0,VE1580',
94 silly get     vary: 'Accept',
94 silly get     'content-length': '0',
94 silly get     'keep-alive': 'timeout=10, max=50',
94 silly get     connection: 'Keep-Alive' } ]
95 verbose etag https://registry.npmjs.org/raw-socket from cache
96 verbose get saving raw-socket to /root/.npm/registry.npmjs.org/raw-socket/.cache.json
97 silly addNameRange number 2 { name: 'raw-socket', range: '*', hasData: true }
98 silly addNameRange versions [ 'raw-socket',
98 silly addNameRange   [ '1.0.0',
98 silly addNameRange     '1.0.1',
98 silly addNameRange     '1.0.2',
98 silly addNameRange     '1.1.0',
98 silly addNameRange     '1.1.1',
98 silly addNameRange     '1.1.2',
98 silly addNameRange     '1.1.3',
98 silly addNameRange     '1.1.4',
98 silly addNameRange     '1.1.5',
98 silly addNameRange     '1.1.6',
98 silly addNameRange     '1.1.7',
98 silly addNameRange     '1.2.0',
98 silly addNameRange     '1.2.1',
98 silly addNameRange     '1.2.2' ] ]
99 verbose addNamed raw-socket@1.2.2
100 silly addNamed semver.valid 1.2.2
101 silly addNamed semver.validRange 1.2.2
102 silly cache afterAdd raw-socket@1.2.2
103 verbose afterAdd /root/.npm/raw-socket/1.2.2/package/package.json not in flight; writing
104 verbose afterAdd /root/.npm/raw-socket/1.2.2/package/package.json written
105 silly install resolved [ { name: 'raw-socket',
105 silly install resolved     version: '1.2.2',
105 silly install resolved     description: 'Raw sockets for Node.js.',
105 silly install resolved     main: 'index.js',
105 silly install resolved     directories: { example: 'example' },
105 silly install resolved     dependencies: {},
105 silly install resolved     contributors: [ [Object] ],
105 silly install resolved     repository:
105 silly install resolved      { type: 'mercurial',
105 silly install resolved        url: 'https://bitbucket.org/stephenwvickers/node-raw-socket' },
105 silly install resolved     keywords:
105 silly install resolved      [ 'checksum',
105 silly install resolved        'checksums',
105 silly install resolved        'htonl',
105 silly install resolved        'htons',
105 silly install resolved        'net',
105 silly install resolved        'network',
105 silly install resolved        'ntohl',
105 silly install resolved        'ntohs',
105 silly install resolved        'raw',
105 silly install resolved        'raw-socket',
105 silly install resolved        'raw-sockets',
105 silly install resolved        'socket',
105 silly install resolved        'sockets' ],
105 silly install resolved     author:
105 silly install resolved      { name: 'Stephen Vickers',
105 silly install resolved        email: 'stephen.vickers.sv@gmail.com' },
105 silly install resolved     license: 'MIT',
105 silly install resolved     scripts: { install: 'node-gyp rebuild' },
105 silly install resolved     gypfile: true,
105 silly install resolved     readme: '\n# raw-socket - [homepage][homepage]\n\nThis module implements raw sockets for [Node.js][nodejs].\n\n*This module has been created primarily to facilitate implementation of the\n[net-ping][net-ping] module.*\n\nThis module is installed using [node package manager (npm)][npm]:\n\n    # This module contains C++ source code which will be compiled\n    # during installation using node-gyp.  A suitable build chain\n    # must be configured before installation.\n    \n    npm install raw-socket\n\nIt is loaded using the `require()` function:\n\n    var raw = require ("raw-socket");\n\nRaw sockets can then be created, and data sent using [Node.js][nodejs]\n`Buffer` objects:\n\n    var socket = raw.createSocket ({protocol: raw.Protocol.None});\n\n    socket.on ("message", function (buffer, source) {\n        console.log ("received " + buffer.length + " bytes from " + source);\n    });\n    \n    socket.send (buffer, 0, buffer.length, "1.1.1.1", function (error, bytes) {\n        if (error)\n            console.log (error.toString ());\n    });\n\n[homepage]: http://re-tool.org "Homepage"\n[nodejs]: http://nodejs.org "Node.js"\n[net-ping]: https://npmjs.org/package/net-ping "net-ping"\n[npm]: https://npmjs.org/ "npm"\n\n# Network Protocol Support\n\nThe raw sockets exposed by this module support IPv4 and IPv6.\n\nRaw sockets are created using the operating systems `socket()` function, and\nthe socket type `SOCK_RAW` specified.\n\n# Raw Socket Behaviour\n\nRaw sockets behave in different ways depending on operating system and\nversion, and may support different socket options.\n\nSome operating system versions may restrict the use of raw sockets to\nprivileged users.  If this is the case an exception will be thrown on socket\ncreation using a message similar to `Operation not permitted` (this message\nis likely to be different depending on operating system version).\n\nThe appropriate operating system documentation should be consulted to\nunderstand how raw sockets will behave before attempting to use this module.\n\n# Keeping The [Node.js][nodejs] Event Loop Alive\n\nThis module uses the `libuv` library to integrate into the [Node.js][nodejs]\nevent loop - this library is also used by [Node.js][nodejs].  An underlying\n `libuv` library `poll_handle_t` event watcher is used to monitor the\nunderlying operating system raw socket used by a socket object.\n\nAll the while a socket object exists, and the sockets `close()` method has not\nbeen called, the raw socket will keep the [Node.js][nodejs] event loop alive\nwhich will prevent a program from exiting.\n\nThis module exports four methods which a program can use to control this\nbehaviour.\n\nThe `pauseRecv()` and `pauseSend()` methods stop the underlying `poll_handle_t`\nevent watcher used by a socket from monitoring for readable and writeable\nevents.  While the `resumeRecv()` and `resumeSend()` methods start the\nunderlying `poll_handle_t` event watcher used by a socket allowing it to\nmonitor for readable and writeable events.\n\nEach socket object also exports the `recvPaused` and `sendPaused` boolean\nattributes to determine the state of the underlying `poll_handle_t` event\nwatcher used by a socket.\n\nSocket creation can be expensive on some platforms, and the above methods offer\nan alternative to closing and deleting a socket to prevent it from keeping the\n[Node.js][nodejs] event loop alive.\n\nThe [Node.js][nodejs] [net-ping][net-ping] module offers a concrete example\nof using these methods.  Since [Node.js][nodejs] offers no raw socket support\nthis module is used to implement ICMP echo (ping) support.  Once all ping\nrequests have been processed by the [net-ping][net-ping] module the\n`pauseRecv()` and `pauseSend()` methods are used to allow a program to exit if\nrequired.\n\nThe following example stops the underlying `poll_handle_t` event watcher used\nby a socket from generating writeable events, however since readable events\nwill still be watched for the program will not exit immediately:\n\n    if (! socket.recvPaused)\n        socket.pauseRecv ();\n\nThe following can the be used to resume readable events:\n\n    if (socket.recvPaused)\n        socket.resumeRecv ();\n\nThe following example stops the underlying `poll_handle_t` event watcher used\nby a socket from generating both readable and writeable events, if no other\nevent watchers have been setup (e.g. `setTimeout()`) the program will exit.\n\n    if (! socket.recvPaused)\n        socket.pauseRecv ();\n    if (! socket.sendPaused)\n        socket.pauseSend ();\n\nThe following can the be used to resume both readable and writeable events:\n\n    if (socket.recvPaused)\n        socket.resumeRecv ();\n    if (socket.sendPaused)\n        socket.resumeSend ();\n\nWhen data is sent using a sockets `send()` method the `resumeSend()` method\nwill be called if the sockets `sendPaused` attribute is `true`, however the\n`resumeRecv()` method will not be called regardless of whether the sockets\n`recvPaused` attribute is `true` or `false`.\n\n[nodejs]: http://nodejs.org "Node.js"\n[net-ping]: http://npmjs.org/package/net-ping "net-ping"\n\n# Constants\n\nThe following sections describe constants exported and used by this module.\n\n## raw.AddressFamily\n\nThis object contains constants which can be used for the `addressFamily`\noption to the `createSocket()` function exposed by this module.  This option\nspecifies the IP protocol version to use when creating the raw socket.\n\nThe following constants are defined in this object:\n\n * `IPv4` - IPv4 protocol\n * `IPv6` - IPv6 protocol\n\n## raw.Protocol\n\nThis object contains constants which can be used for the `protocol` option to\nthe `createSocket()` function exposed by this module.  This option specifies\nthe protocol number to place in the protocol field of IP headers generated by\nthe operating system.\n\nThe following constants are defined in this object:\n\n * `None` - protocol number 0\n * `ICMP` - protocol number 1\n * `TCP` - protocol number 6\n * `UDP` - protocol number 17\n * `ICMPv6` - protocol number 58\n\n## raw.SocketLevel\n\nThis object contains constants which can be used for the `level` parameter to\nthe `getOption()` and `setOption()` methods exposed by this module.\n\nThe following constants are defined in this object:\n\n * `SOL_SOCKET`\n * `IPPROTO_IP`\n * `IPPROTO_IPV6`\n\n## raw.SocketOption\n\nThis object contains constants which can be used for the `option` parameter to\nthe `getOption()` and `setOption()` methods exposed by this module.\n\nThe following constants are defined in this object:\n\n * `SO_RCVBUF`\n * `SO_RCVTIMEO`\n * `SO_SNDBUF`\n * `SO_SNDTIMEO`\n * `IP_HDRINCL`\n * `IP_OPTIONS`\n * `IP_TOS`\n * `IP_TTL`\n * `IPV6_TTL`\n * `IPV6_UNICAST_HOPS`\n * `IPV6_V6ONLY`\n\n*The `IPV6_TTL` socket option is not known to be defined by any operating\nsystem, it is provided in convenience to be synonymous with IPv4*\n\nFor Windows platforms the following constant is also defined:\n\n * `IPV6_HDRINCL`\n\n# Using This Module\n\nRaw sockets are represented by an instance of the `Socket` class.  This\nmodule exports the `createSocket()` function which is used to create\ninstances of the `Socket` class.\n\nThe module also exports a number of stubs which call through to a number of\nfunctions provided by the operating system, i.e. `htonl()`.\n\nThis module also exports a function to generate protocol checksums.\n\n## raw.createChecksum (bufferOrObject, [bufferOrObject, ...])\n\nThe `createChecksum()` function creates and returns a 16 bit one\'s complement\nof the one\'s complement sum for all the data specified in one or more\n[Node.js][nodejs] `Buffer` objects.  This is useful for creating checksums for\nprotocols such as IP, TCP, UDP and ICMP.\n\nThe `bufferOrObject` parameter can be one of two types.  The first is a\n[Node.js][nodejs] `Buffer` object.  In this case a checksum is calculated from\nall the data it contains.  The `bufferOrObject` parameter can also be an\nobject which must contain the following attributes:\n\n * `buffer` - A [Node.js][nodejs] `Buffer` object which contains data which\n   to generate a checksum for\n * `offset` - Skip this number of bytes from the beginning of `buffer`\n * `length` - Only generate a checksum for this number of bytes in `buffer`\n   from `offset`\n\nThe second parameter type provides control over how much of the data in a\n[Node.js][nodejs] `Buffer` object a checksum should be generated for.\n\nWhen more than one parameter is passed a single checksum is calculated as if\nthe data in in all parameters were in a single buffer.  This is useful for\nwhen calulating checksums for TCP and UDP for example - where a psuedo header\nmust be created and used for checksum calculation.\n\nIn this case two buffers can be passed, the first containing the psuedo header\nand the second containing the real TCP packet, and the offset and length\nparameters used to specify the bounds of the TCP packet payload.\n\nThe following example generates a checksum for a TCP packet and its psuedo\nheader:\n\n    var sum = raw.createChecksum (pseudo_header, {buffer: tcp_packet,\n            offset: 20, length: tcp_packet.length - 20});\n\nBoth buffers will be treated as one, i.e. as if the data at offset `20` in\n`tcp_packet` had followed all data in `pseudo_header` - as if they were one\nbuffer.\n\n## raw.writeChecksum (buffer, offset, checksum)\n\nThe `writeChecksum()` function writes a checksum created by the\n`raw.createChecksum()` function to the [Node.js][nodejs] `Buffer` object \n`buffer` at offsets `offset` and `offset` + 1.\n\nThe following example generates and writes a checksum at offset `2` in a\n[Node.js][nodejs] `Buffer` object:\n\n    raw.writeChecksum (buffer, 2, raw.createChecksum (buffer));\n\n## raw.htonl (uint32)\n\nThe `htonl()` function converts a 32 bit unsigned integer from host byte\norder to network byte order and returns the result.  This function is simply\na stub through to the operating systems `htonl()` function.\n\n## raw.htons (uint16)\n\nThe `htons()` function converts a 16 bit unsigned integer from host byte\norder to network byte order and returns the result.  This function is simply\na stub through to the operating systems `htons()` function.\n\n## raw.ntohl (uint32)\n\nThe `ntohl()` function converts a 32 bit unsigned integer from network byte\norder to host byte order and returns the result.  This function is simply\na stub through to the operating systems `ntohl()` function.\n\n## raw.ntohs (uint16)\n\nThe `ntohs()` function converts a 16 bit unsigned integer from network byte\norder to host byte order and returns the result.  This function is simply\na stub through to the operating systems `ntohs()` function.\n\n## raw.createSocket ([options])\n\nThe `createSocket()` function instantiates and returns an instance of the\n`Socket` class:\n\n    // Default options\n    var options = {\n        addressFamily: raw.AddressFamily.IPv4,\n        protocol: raw.Protocol.None,\n        bufferSize: 4096,\n        generateChecksums: false,\n        checksumOffset: 0\n    };\n    \n    var socket = raw.createSocket (options);\n\nThe optional `options` parameter is an object, and can contain the following\nitems:\n\n * `addressFamily` - Either the constant `raw.AddressFamily.IPv4` or the\n   constant `raw.AddressFamily.IPv6`, defaults to the constant\n   `raw.AddressFamily.IPv4`\n * `protocol` - Either one of the constants defined in the `raw.Protocol`\n   object or the protocol number to use for the socket, defaults to the\n   consant `raw.Protocol.None`\n * `bufferSize` - Size, in bytes, of the sockets internal receive buffer,\n   defaults to 4096\n * `generateChecksums` - Either `true` or `false` to enable or disable the\n   automatic checksum generation feature, defaults to `false`\n * `checksumOffset` - When `generateChecksums` is `true` specifies how many\n   bytes to index into the send buffer to write automatically generated\n   checksums, defaults to `0`\n\nAn exception will be thrown if the underlying raw socket could not be created.\nThe error will be an instance of the `Error` class.\n\nThe `protocol` parameter, or its default value of the constant\n`raw.Protocol.None`, will be specified in the protocol field of each IP\nheader.\n\n## socket.on ("close", callback)\n\nThe `close` event is emitted by the socket when the underlying raw socket\nis closed.\n\nNo arguments are passed to the callback.\n\nThe following example prints a message to the console when the socket is\nclosed:\n\n    socket.on ("close", function () {\n        console.log ("socket closed");\n    });\n\n## socket.on ("error", callback)\n\nThe `error` event is emitted by the socket when an error occurs sending or\nreceiving data.\n\nThe following arguments will be passed to the `callback` function:\n\n * `error` - An instance of the `Error` class, the exposed `message` attribute\n   will contain a detailed error message.\n\nThe following example prints a message to the console when an error occurs,\nafter which the socket is closed:\n\n    socket.on ("error", function (error) {\n        console.log (error.toString ());\n        socket.close ();\n    });\n\n## socket.on ("message", callback)\n\nThe `message` event is emitted by the socket when data has been received.\n\nThe following arguments will be passed to the `callback` function:\n\n * `buffer` - A [Node.js][nodejs] `Buffer` object containing the data\n   received, the buffer will be sized to fit the data received, that is the\n   `length` attribute of buffer will specify how many bytes were received\n * `address` - For IPv4 raw sockets the dotted quad formatted source IP\n   address of the message, e.g `192.168.1.254`, for IPv6 raw sockets the\n   compressed formatted source IP address of the message, e.g.\n   `fe80::a00:27ff:fe2a:3427`\n\nThe following example prints received messages in hexadecimal to the console:\n\n    socket.on ("message", function (buffer, address) {\n        console.log ("received " + buffer.length + " bytes from " + address\n                + ": " + buffer.toString ("hex"));\n    });\n\n## socket.generateChecksums (generate, offset)\n\nThe `generateChecksums()` method is used to specify whether automatic checksum\ngeneration should be performed by the socket.\n\nThe `generate` parameter is either `true` or `false` to enable or disable the\nfeature.  The optional `offset` parameter specifies how many bytes to index\ninto the send buffer when writing the generated checksum to the send buffer.\n\nThe following example enables automatic checksum generation at offset 2\nresulting in checksums being written to byte 3 and 4 of the send buffer\n(offsets start from 0, meaning byte 1):\n\n    socket.generateChecksums (true, 2);\n\n## socket.getOption (level, option, buffer, length)\n\nThe `getOption()` method gets a socket option using the operating systems\n`getsockopt()` function.\n\nThe `level` parameter is one of the constants defined in the `raw.SocketLevel`\nobject.  The `option` parameter is one of the constants defined in the\n`raw.SocketOption` object.  The `buffer` parameter is a [Node.js][nodejs]\n`Buffer` object where the socket option value will be written.  The `length`\nparameter specifies the size of the `buffer` parameter.\n\nIf an error occurs an exception will be thrown, the exception will be an\ninstance of the `Error` class.\n\nThe number of bytes written into the `buffer` parameter is returned, and can\ndiffer from the amount of space available.\n\nThe following example retrieves the current value of `IP_TTL` socket option:\n\n    var level = raw.SocketLevel.IPPROTO_IP;\n    var option = raw.SocketOption.IP_TTL;\n    \n    # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used\n    var buffer = new Buffer (4);\n    \n    var written = socket.getOption (level, option, buffer, buffer.length);\n    \n    console.log (buffer.toString ("hex"), 0, written);\n\n## socket.send (buffer, offset, length, address, beforeCallback, afterCallback)\n\nThe `send()` method sends data to a remote host.\n\nThe `buffer` parameter is a [Node.js][nodejs] `Buffer` object containing the\ndata to be sent.  The `length` parameter specifies how many bytes from\n`buffer`, beginning at offset `offset`, to send.  For IPv4 raw sockets the\n`address` parameter contains the dotted quad formatted IP address of the\nremote host to send the data to, e.g `192.168.1.254`, for IPv6 raw sockets the\n`address` parameter contains the compressed formatted IP address of the remote\nhost to send the data to, e.g. `fe80::a00:27ff:fe2a:3427`.  If provided the\noptional `beforeCallback` function is called right before the data is actually\nsent using the underlying raw socket, giving users the opportunity to perform\npre-send actions such as setting a socket option, e.g. the IP header TTL.  No\narguments are passed to the `beforeCallback` function.  The `afterCallback`\nfunction is called once the data has been sent.  The following arguments will\nbe passed to the `afterCallback` function:\n\n * `error` - Instance of the `Error` class, or `null` if no error occurred\n * `bytes` - Number of bytes sent\n\nThe following example sends a ICMP ping message to a remote host, before the\nrequest is actually sent the IP header TTL is modified, and modified again\nafter the data has been sent:\n\n    // ICMP echo (ping) request, checksum should be ok\n    var buffer = new Buffer ([\n            0x08, 0x00, 0x43, 0x52, 0x00, 0x01, 0x0a, 0x09,\n            0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,\n            0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70,\n            0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x61,\n            0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69]);\n\n    var socketLevel = raw.SocketLevel.IPPROTO_IP\n    var socketOption = raw.SocketOption.IP_TTL;\n\n    function beforeSend () {\n        socket.setOption (socketLevel, socketOption, 1);\n    }\n    \n    function afterSend (error, bytes) {\n        if (error)\n            console.log (error.toString ());\n        else\n            console.log ("sent " + bytes + " bytes");\n        \n        socket.setOption (socketLevel, socketOption, 1);\n    }\n\n    socket.send (buffer, 0, buffer.length, target, beforeSend, afterSend);\n\n## socket.setOption (level, option, buffer, length)\n\nThe `setOption()` method sets a socket option using the operating systems\n`setsockopt()` function.\n\nThe `level` parameter is one of the constants defined in the `raw.SocketLevel`\nobject.  The `option` parameter is one of the constants defined in the\n`raw.SocketOption` object.  The `buffer` parameter is a [Node.js][nodejs]\n`Buffer` object where the socket option value is specified.  The `length`\nparameter specifies how much space the option value occupies in the `buffer`\nparameter.\n\nIf an error occurs an exception will be thrown, the exception will be an\ninstance of the `Error` class.\n\nThe following example sets the value of `IP_TTL` socket option to `1`:\n\n    var level = raw.SocketLevel.IPPROTO_IP;\n    var option = raw.SocketOption.IP_TTL;\n    \n    # IP_TTL is a signed integer on some platforms so a 4 byte buffer is used,\n    # x86 computers use little-endian format so specify bytes reverse order\n    var buffer = new Buffer ([0x01, 0x00, 0x00, 0x00]);\n    \n    socket.setOption (level, option, buffer, buffer.length);\n\nTo avoid dealing with endianess the `setOption()` method supports a three\nargument form which can be used for socket options requiring a 32bit unsigned\ninteger value (for example the `IP_TTL` socket option used in the previous\nexample).  Its signature is as follows:\n\n    socket.setOption (level, option, value)\n\nThe previous example can be re-written to use this form:\n\n    var level = raw.SocketLevel.IPPROTO_IP;\n    var option = raw.SocketOption.IP_TTL;\n\n    socket.setOption (level, option, 1);\n\n# Example Programs\n\nExample programs are included under the modules `example` directory.\n\n# Bugs & Known Issues\n\nNone, yet!\n\nBug reports should be sent to <stephen.vickers.sv@gmail.com>.\n\n# Changes\n\n## Version 1.0.0 - 29/01/2013\n\n * Initial release\n\n## Version 1.0.1 - 01/02/2013\n\n * Move `SOCKET_ERRNO` define from `raw.cc` to `raw.h`\n * Error in exception thrown by `SocketWrap::New` in `raw.cc` stated that two\n   arguments were required, this should be one\n * Corrections to the README.md\n * Missing includes causes compilation error on some systems (maybe Node\n   version dependant)\n\n## Version 1.0.2 - 02/02/2013\n\n * Support automatic checksum generation\n\n## Version 1.1.0 - 13/02/2013\n\n * The [net-ping][net-ping] module is now implemented so update the note about\n   it in the first section of the README.md\n * Support IPv6\n * Support the `IP_HDRINCL` socket option via the `noIpHeader` option to the\n   `createSocket()` function and the `noIpHeader()` method exposed by the\n   `Socket` class\n\n## Version 1.1.1 - 14/02/2013\n\n * IP addresses not being validated\n\n## Version 1.1.2 - 15/02/2013\n\n * Default protocol option to `createSession()` was incorrect in the README.md\n * The `session.on("message")` example used `message` instead of `buffer` in\n   the README.md\n\n## Version 1.1.3 - 04/03/2013\n\n * `raw.Socket.onSendReady()` emit\'s an error when `raw.SocketWrap.send()`\n   throws an exception when it should call the `req.callback` callback\n * Added the `pauseRecv()`, `resumeRecv()`, `pauseSend()` and `resumeSend()`\n   methods\n\n[net-ping]: https://npmjs.org/package/net-ping "net-ping"\n\n## Version 1.1.4 - 05/03/2013\n\n * Cleanup documentation for the `pauseSend()`, `pauseRecv()`, `resumeSend()`\n   and `resumeRecv()` methods in the README.md\n\n## Version 1.1.5 - 09/05/2013\n\n * Reformated lines in the README.md file inline with the rest of the file\n * Removed the `noIpHeader()` method (the `setOption()` method should be\n   used to configure the `IP_HDRINCL` socket option - and possibly\n   `IPV6_HDRINCL` on Windows platforms), and removed the `Automatic IP Header\n   Generation` section from the README.md file\n * Added the `setOption()` and `getOption()` methods, and added the\n   `SocketLevel` and `SocketOption` constants\n * Tidied up the example program `ping-no-ip-header.js` (now uses the\n   `setOption()` method to configure the `IP_HDRINCL` socket option)\n * Tidied up the example program `ping6-no-ip-header.js` (now uses the\n   `setOption()` method to configure the `IPV6_HDRINCL` socket option)\n * Added the example program `get-option.js`\n * Added the example program `ping-set-option-ip-ttl.js`\n * Use MIT license instead of GPL\n\n## Version 1.1.6 - 18/05/2013\n\n * Added the `beforeCallback` parameter to the `send()` method, and renamed the\n   `callback` parameter to `afterCallback`\n * Fixed a few typos in the README.md file\n * Modified the example program `ping-set-option-ip-ttl.js` to use the\n   `beforeCallback` parameter to the `send()` method\n * The example program `ping6-no-ip-header.js` was not passing the correct\n   arguments to the `setOption()` method\n\n## Version 1.1.7 - 23/06/2013\n\n * Added the `htonl()`, `htons()`, `ntohl()`, and `ntohs()` functions, and\n   associated example programs\n * Added the `createChecksum()` function, and associated example program\n\n## Version 1.1.8 - 01/07/2013\n\n * Added the `writeChecksum()` function\n * Removed the "Automated Checksum Generation" feature - this has been\n   replaced with the `createChecksum()` and `writeChecksum()` functions\n\n## Version 1.2.0 - 02/07/2013\n\n * Up version number to 1.2.0 (we should have done this for 1.1.8 because it\n   introduced some API breaking changes)\n\n## Version 1.2.1 - 15/08/2013\n\n * Receiving `Assertion \'!(handle->flags & (UV_CLOSING | UV_CLOSED))\' failed`\n   error after a number of pings - the underlying `uv_poll_t` handle was being\n   closed twice\n\n## Version 1.2.2 - 21/09/2013\n\n * Using uint16_t instead of uint32_t on line 87 in src/raw.cc for a value\n   that is out of range\n * raw::SocketWrap::pause() only uses the first argument\n * Delete uv_poll_t watcher in uv_close() OnClose callback instead of in the\n   wrapped C++ objects deconstructor\n\n# Roadmap\n\nIn no particular order:\n\n * Enhance performance by moving the send queue into the C++ raw::SocketWrap\n   class\n\nSuggestions and requirements should be sent to <stephen.vickers.sv@gmail.com>.\n\n# License\n\nCopyright (c) 2013 Stephen Vickers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n# Author\n\nStephen Vickers <stephen.vickers.sv@gmail.com>\n',
105 silly install resolved     readmeFilename: 'README.md',
105 silly install resolved     _id: 'raw-socket@1.2.2',
105 silly install resolved     dist:
105 silly install resolved      { shasum: 'c9be873878a1ef70497a27e40b6e55b563d8f886',
105 silly install resolved        tarball: 'http://registry.npmjs.org/raw-socket/-/raw-socket-1.2.2.tgz' },
105 silly install resolved     _from: 'raw-socket@*',
105 silly install resolved     _npmVersion: '1.2.17',
105 silly install resolved     _npmUser:
105 silly install resolved      { name: 'stephen.vickers',
105 silly install resolved        email: 'stephen.vickers.sv@gmail.com' },
105 silly install resolved     maintainers: [ [Object] ],
105 silly install resolved     _shasum: 'c9be873878a1ef70497a27e40b6e55b563d8f886',
105 silly install resolved     _resolved: 'https://registry.npmjs.org/raw-socket/-/raw-socket-1.2.2.tgz' } ]
106 info install raw-socket@1.2.2 into /srv/uptime/node_modules/net-ping
107 info installOne raw-socket@1.2.2
108 verbose installOne of raw-socket to /srv/uptime/node_modules/net-ping not in flight; installing
109 verbose lock using /root/.npm/_locks/raw-socket-4a9883a1f94321ab.lock for /srv/uptime/node_modules/net-ping/node_modules/raw-socket
110 silly install write writing raw-socket 1.2.2 to /srv/uptime/node_modules/net-ping/node_modules/raw-socket
111 silly cache addNamed cb raw-socket@1.2.2
112 verbose unbuild node_modules/net-ping/node_modules/raw-socket
113 verbose gentlyRm vacuuming /srv/uptime/node_modules/net-ping/node_modules/raw-socket
114 verbose tar unpack /root/.npm/raw-socket/1.2.2/package.tgz
115 verbose tar unpacking to /srv/uptime/node_modules/net-ping/node_modules/raw-socket
116 verbose gentlyRm vacuuming /srv/uptime/node_modules/net-ping/node_modules/raw-socket
117 silly gunzTarPerm modes [ '755', '644' ]
118 silly gunzTarPerm extractEntry package.json
119 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ]
120 silly gunzTarPerm extractEntry .npmignore
121 silly gunzTarPerm modified mode [ '.npmignore', 438, 420 ]
122 silly gunzTarPerm extractEntry README.md
123 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ]
124 silly gunzTarPerm extractEntry index.js
125 silly gunzTarPerm modified mode [ 'index.js', 438, 420 ]
126 silly gunzTarPerm extractEntry binding.gyp
127 silly gunzTarPerm modified mode [ 'binding.gyp', 438, 420 ]
128 silly gunzTarPerm extractEntry example/create-checksum.js
129 silly gunzTarPerm modified mode [ 'example/create-checksum.js', 438, 420 ]
130 silly gunzTarPerm extractEntry example/htonl.js
131 silly gunzTarPerm modified mode [ 'example/htonl.js', 438, 420 ]
132 silly gunzTarPerm extractEntry example/htons.js
133 silly gunzTarPerm modified mode [ 'example/htons.js', 438, 420 ]
134 silly gunzTarPerm extractEntry example/ntohl.js
135 silly gunzTarPerm modified mode [ 'example/ntohl.js', 438, 420 ]
136 silly gunzTarPerm extractEntry example/get-option.js
137 silly gunzTarPerm modified mode [ 'example/get-option.js', 438, 420 ]
138 silly gunzTarPerm extractEntry example/ping-no-ip-header.js
139 silly gunzTarPerm modified mode [ 'example/ping-no-ip-header.js', 438, 420 ]
140 silly gunzTarPerm extractEntry example/ping-set-option-ip-ttl.js
141 silly gunzTarPerm modified mode [ 'example/ping-set-option-ip-ttl.js', 438, 420 ]
142 silly gunzTarPerm extractEntry example/ping.js
143 silly gunzTarPerm modified mode [ 'example/ping.js', 438, 420 ]
144 silly gunzTarPerm extractEntry example/ping6-no-ip-header.js
145 silly gunzTarPerm modified mode [ 'example/ping6-no-ip-header.js', 438, 420 ]
146 silly gunzTarPerm extractEntry example/ping6.js
147 silly gunzTarPerm modified mode [ 'example/ping6.js', 438, 420 ]
148 silly gunzTarPerm extractEntry example/ntohs.js
149 silly gunzTarPerm modified mode [ 'example/ntohs.js', 438, 420 ]
150 silly gunzTarPerm extractEntry src/raw.cc
151 silly gunzTarPerm modified mode [ 'src/raw.cc', 438, 420 ]
152 silly gunzTarPerm extractEntry src/raw.h
153 silly gunzTarPerm modified mode [ 'src/raw.h', 438, 420 ]
154 info preinstall raw-socket@1.2.2
155 silly install resolved []
156 verbose about to build /srv/uptime/node_modules/net-ping/node_modules/raw-socket
157 info build /srv/uptime/node_modules/net-ping/node_modules/raw-socket
158 verbose linkStuff [ false,
158 verbose linkStuff   false,
158 verbose linkStuff   false,
158 verbose linkStuff   '/srv/uptime/node_modules/net-ping/node_modules' ]
159 info linkStuff raw-socket@1.2.2
160 verbose linkBins raw-socket@1.2.2
161 verbose linkMans raw-socket@1.2.2
162 verbose rebuildBundles raw-socket@1.2.2
163 info install raw-socket@1.2.2
164 verbose unsafe-perm in lifecycle false
165 info raw-socket@1.2.2 Failed to exec install script
166 verbose unlock done using /root/.npm/_locks/raw-socket-4a9883a1f94321ab.lock for /srv/uptime/node_modules/net-ping/node_modules/raw-socket
167 verbose about to build /srv/uptime/node_modules/net-ping
168 verbose unlock done using /root/.npm/_locks/net-ping-3d2b0c572a49c75f.lock for /srv/uptime/node_modules/net-ping
169 verbose stack Error: raw-socket@1.2.2 install: `node-gyp rebuild`
169 verbose stack Exit status 1
169 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
169 verbose stack     at EventEmitter.emit (events.js:110:17)
169 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:14:12)
169 verbose stack     at ChildProcess.emit (events.js:110:17)
169 verbose stack     at maybeClose (child_process.js:1008:16)
169 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
170 verbose pkgid raw-socket@1.2.2
171 verbose cwd /srv/uptime
172 error Linux 2.6.32-431.el6.x86_64
173 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
174 error node v0.12.0
175 error npm  v2.5.1
176 error code ELIFECYCLE
177 error raw-socket@1.2.2 install: `node-gyp rebuild`
177 error Exit status 1
178 error Failed at the raw-socket@1.2.2 install script 'node-gyp rebuild'.
178 error This is most likely a problem with the raw-socket package,
178 error not with npm itself.
178 error Tell the author that this fails on your system:
178 error     node-gyp rebuild
178 error You can get their info via:
178 error     npm owner ls raw-socket
178 error There is likely additional logging output above.
179 verbose exit [ 1, true ]
180 verbose unbuild node_modules/net-ping/node_modules/raw-socket
181 info preuninstall raw-socket@1.2.2
182 info uninstall raw-socket@1.2.2
183 verbose unbuild rmStuff raw-socket@1.2.2 from /srv/uptime/node_modules
184 verbose unbuild rmStuff in /srv/uptime/node_modules/net-ping/node_modules
185 info postuninstall raw-socket@1.2.2
186 verbose gentlyRm vacuuming /srv/uptime/node_modules/net-ping/node_modules/raw-socket
187 silly gentlyRm purging /srv/uptime/node_modules/net-ping/node_modules/raw-socket
188 silly gentlyRm removing /srv/uptime/node_modules/net-ping/node_modules
189 silly gentlyRm quitting because other entries in /srv/uptime/node_modules/net-ping
190 verbose unbuild node_modules/net-ping
191 info preuninstall net-ping@1.1.7
192 info uninstall net-ping@1.1.7
193 verbose unbuild rmStuff net-ping@1.1.7 from /srv/uptime/node_modules
194 info postuninstall net-ping@1.1.7
195 verbose gentlyRm vacuuming /srv/uptime/node_modules/net-ping
196 silly gentlyRm purging /srv/uptime/node_modules/net-ping
197 silly gentlyRm quitting because other entries in /srv/uptime/node_modules
i-sam commented 9 years ago

Oh, sorry it's already described in https://github.com/fzaninotto/uptime/issues/238