Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
MiguelMadero opened this issue Oct 3, 2012 · 6 comments
Closed

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

MiguelMadero opened this issue Oct 3, 2012 · 6 comments
Labels

Comments

@MiguelMadero
Copy link
Contributor

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)
@larzconwell
Copy link
Contributor

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.

@larzconwell
Copy link
Contributor

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.

@larzconwell
Copy link
Contributor

Ugh that's not working either.

@larzconwell larzconwell reopened this Oct 3, 2012
@techwraith
Copy link
Contributor

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?

@larzconwell
Copy link
Contributor

@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.

@techwraith
Copy link
Contributor

@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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants