Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Metrics isn't working (fails when starting geddy) #205

Open
MiguelMadero opened this Issue Oct 3, 2012 · 6 comments

Comments

Projects
None yet
3 participants
Contributor

MiguelMadero commented Oct 3, 2012

I might be doing something wrong. I followed the steps from the original tutorial:

Set up metrics by running npm install metrics, and uncomment the metrics entry (metrics: { port: 4001 }) in your config/environment.js file

After doing that and running $ geddy it fails with

/usr/local/lib/node_modules/geddy/node_modules/utilities/lib/core.js:40
          targ[p] = src[p];
                  ^
TypeError: Cannot set property 'port' of null
    at _mix (/usr/local/lib/node_modules/geddy/node_modules/utilities/lib/core.js:40:19)
    at _mix (/usr/local/lib/node_modules/geddy/node_modules/utilities/lib/core.js:36:11)
    at Object.mixin (/usr/local/lib/node_modules/geddy/node_modules/utilities/lib/core.js:81:9)
    at config.readConfig (/usr/local/lib/node_modules/geddy/lib/config.js:51:11)
    at _readConfig (/usr/local/lib/node_modules/geddy/lib/cluster/master.js:36:30)
    at async.AsyncBase.runItem (/usr/local/lib/node_modules/geddy/node_modules/utilities/lib/async.js:108:10)
    at async.AsyncBase.next (/usr/local/lib/node_modules/geddy/node_modules/utilities/lib/async.js:113:12)
    at Master.start (/usr/local/lib/node_modules/geddy/lib/cluster/master.js:251:11)
    at Object.utils.mixin.start (/usr/local/lib/node_modules/geddy/lib/geddy.js:36:9)
    at start (/usr/local/lib/node_modules/geddy/bin/cli.js:111:9)
Contributor

larzconwell commented Oct 3, 2012

It's because the default defined in lib/base_config.js was null so when it tried to merge in the application config it couldn't assign to the default null.

Contributor

larzconwell commented Oct 3, 2012

Actually just changing the default option to an empty object causes problems else where, where we are checking for geddy.config.metrics which will return true if it's an empty object. So I think instead, I'll replace the null default and instead edit utilities/lib/core.js and make it so when mixing in items if the target is null it'll skip it instead of attempting to assign values.

Contributor

larzconwell commented Oct 3, 2012

Ugh that's not working either.

@larzconwell larzconwell reopened this Oct 3, 2012

Contributor

Techwraith commented Oct 7, 2012

Do we have any idea when this started happening? Not a whole lot has changed with how the metrics stuff is handled, so it's probably something somewhere else.

@mde or @mikejihbe Any ideas here?

Contributor

larzconwell commented Oct 13, 2012

@Techwraith Nah I think this is something to do with the mixin function in utilities or it's something in lib/config.js because this is before we try to require metrics, it's trying to mix the config.

Contributor

Techwraith commented Oct 13, 2012

@mde could your fix for the production stuff fix this?

Sent from my iPhone

On Oct 13, 2012, at 11:42 AM, Larz Conwell notifications@github.com wrote:

@Techwraith Nah I think this is something to do with the mixin function in mde/utilities or it's something in lib/config.js


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment