CouchDB {“error”:”insecure_rewrite_rule”,”reason”:”too many ../.. segments”}

CouchDB {“error”:”insecure_rewrite_rule”,”reason”:”too many ../.. segments”}

couchdb

Whilst working an AMAZING NPM repository mirror yesterday (which totally works, despite not really offering the performance benefit I’d hoped, because NPM is rubbish) I came across this error whilst doing things

 
 
 
 
 
 
 
 
 
 

<br /> 16 http GET https://localhost:5984/registry/_design/app/_rewrite/-/all/since?stale=update_after&startkey=1371737164294<br /> 17 http 500 https://localhost:5984/registry/_design/app/_rewrite/-/all/since?stale=update_after&startkey=1371737164294<br /> 18 error Error: insecure_rewrite_rule too many ../.. segments: registry/_design/app/_rewrite/-/all/since<br /> 18 error at RegClient.<anonymous> (/root/.nvm/v0.8.15/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:259:14)<br /> 18 error at Request.init.self.callback (/root/.nvm/v0.8.15/lib/node_modules/npm/node_modules/request/main.js:120:22)<br /> 18 error at Request.EventEmitter.emit (events.js:99:17)<br /> 18 error at Request.<anonymous> (/root/.nvm/v0.8.15/lib/node_modules/npm/node_modules/request/main.js:648:16)<br /> 18 error at Request.EventEmitter.emit (events.js:126:20)<br /> 18 error at IncomingMessage.Request.start.self.req.self.httpModule.request.buffer (/root/.nvm/v0.8.15/lib/node_modules/npm/node_modules/request/main.js:610:14)<br /> 18 error at IncomingMessage.EventEmitter.emit (events.js:126:20)<br /> 18 error at IncomingMessage._emitEnd (http.js:366:10)<br /> 18 error at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)<br /> 18 error at Socket.socketOnData [as ondata] (http.js:1367:20)<br /> 19 error If you need help, you may report this log at:<br /> 19 error <https://github.com/isaacs/npm/issues><br /> 19 error or email it to:<br /> 19 error <npm-@googlegroups.com><br />

Read more →

How To Create An NPM Repository Mirror

How To Create An NPM Repository Mirror

npmWe use Node.js a LOT, which means we do npm install a LOT. And npm is pretty terrible, with horrible dependency handling so we can end up requesting hundreds of dependent modules with it’s recursive patten e.g. for just one of our projects we can end up with paths like

`
./node_modules/bcrypt/node_modules/nodeunit/node_modules/should/node_modules/mocha/node_modules/glob/node_modules/minimatch/node_modules/sigmund/node_modules/tap/node_modules

[root@hmon workspace]# find . -name node_modules | wc -l
2103
`

That’s 2103 node_modules directories, for an application we’ve written that has only 22 dependencies configured for it!

Read more →

Volusion Review

Volusion Review
Whether you are looking to open your first e-commerce store, or a better deal on your existing one, the e-commerce arena is a minefield that needs to be navigated carefully. Businesses usually always end up paying much more for hosted e-commerce solutions than they originally expected because most e-commerce platforms are not completely upfront about their pricing model. Problems can range from fixed, long term contracts, hidden transaction fees and tiered pricing, as well as frequent network issues and unpleasant customer support. If you accidentally choose the wrong shopping cart it can end up being an expensive mistake, so you need to take the time to make sure you make the right choice.

Read more →

collectd illegal attempt to update using time when last update time is (minimum one second step)

collectd illegal attempt to update using time when last update time is (minimum one second step)

collectd Whilst debugging our CollectD and Graphite setup, I found that CollectD was generating hundreds of repeated errors.

<br /> Jun 13 17:11:14 hmon collectd[15336]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/hmon/processes/ps_state-running.rrd) failed: /var/lib/collectd/rrd/hmon/processes/ps_state-running.rrd: illegal attempt to update using time 1371136272 when last update time is 1371136272 (minimum one second step)<br /> Jun 13 17:11:14 hmon collectd[15336]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/hmon/processes/ps_state-sleeping.rrd) failed: /var/lib/collectd/rrd/hmon/processes/ps_state-sleeping.rrd: illegal attempt to update using time 1371136272 when last update time is 1371136272 (minimum one second step)<br /> Jun 13 17:11:14 hmon collectd[15336]: rrdtool plugin: rrd_update_r (/var/lib/collectd/rrd/hmon/processes/ps_state-zombies.rrd) failed: /var/lib/collectd/rrd/hmon/processes/ps_state-zombies.rrd: illegal attempt to update using time 1371136272 when last update time is 1371136272 (minimum one second step)<br />

Read more →

Think Carefully About Your Clever Project Names

Think Carefully About Your Clever Project Names

Idiot We’re building a new exciting cluster at work using Linux HA and stuff to make it work magically.

In the olden days of yore RedHat and co were using Pacemaker with the old crm (Cluster Resource Manager / Cluster Relationship Manager, pick one..) tool for cluster management, which was nice. Now it looks like RedHat have removed the crm command from their repositories and have switched to PCS which stands for either Pacemaker/Corosync Configuration System or is the plural of PC (Personal Computers).

Read more →

Income Report March 2013

Income Report March 2013

GoogleAdsense Following on from last month’s report March was quite an interesting month. Changing perspective from using this site as a simple memory dump to one that people, other than myself, would find useful lead to some interesting usage patterns, from both myself and my visitors as well as some changes to the blog!

Due to my change of attitude I actually watched my traffic stats, where I noticed some odd things in my logs, I thought I fixed the problem… It turns out having an URL or page with the phrase ‘apache access logs’ in it is a really bad thing as now that page is plagued with bot hits using Russian domains as a referrer, trying to get a back link for their domain in my web stats. It’s receiving about 1500 unique hits a day at the moment which is skewing my stats quite heavily.

Read more →

Installing Magento

Installing Magento

Installing Magento One of my clients wanted an E-Commerce solution for his website and after a little bit of analysis we opted for the community edition of Magento.

We wanted something based on the usual LAMP stack, that was OpenSource so it could be extended, was free as in beer, had great international support, was fully featured and enterprise ready, could pass PCI DSS compliance, allowed reasonable payment gateway options, could scale and was easy to extend as well as backup. Also we wanted complete control of the deployment, rather than integrating with a 3rd party cloud service provider such as Shopify to keep costs down and retain flexibility.

Read more →