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

"meteor mongo" command does not work with non-English folder path #3999

Closed
hatsevich opened this Issue Mar 22, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@hatsevich

hatsevich commented Mar 22, 2015

the same problem as https://github.com/meteor/windows-preview/issues/40#issue-55247356 but on Mac:

following the tutorial https://www.meteor.com/try/3 on step 3
opened a new terminal tab and typed "meteor mongo" in the project folder
got "mongo: Meteor isn't running a local MongoDB server."
although I have the Meteor sample app running in the other tab

I figured out that the problem was because the path to the app folder contained a folder named with Russian letters. After I moved the app to a folder with only-English-letters path, the error disappeared.

@ekatek ekatek added the Project:Tool label Mar 24, 2015

@glasser

This comment has been minimized.

Member

glasser commented Mar 26, 2015

@hatsevich Thanks, that does seem like it could be a bug. Can you show an example of a path name that has this issue? I bet we have an encoding error in our findMongoPids function.

@hatsevich

This comment has been minimized.

hatsevich commented Mar 27, 2015

@glasser
Any Russian-lettered name, e.g. "метеор"

~/d> cd метеор
~/d/метеор> meteor
[[[[[ ~/D/метеор ]]]]]

=> Started proxy.
=> Started MongoDB.
=> Started your app.

=> App running at: http://localhost:3000/

In another tab:

~/d> cd метеор
~/d/метеор> meteor mongo
mongo: Meteor isn't running a local MongoDB server.

This command only works while Meteor is running your application locally. Start
your application first. (This error will also occur if you asked Meteor to use
a different MongoDB server with $MONGO_URL when you ran your application.)

If you're trying to connect to the database of an app you deployed with
'meteor deploy', specify your site's name with this command.

@hatsevich

This comment has been minimized.

hatsevich commented Mar 27, 2015

By the way: why is Preview option absent when I edit a comment here? Is it a github bug?

@glasser

This comment has been minimized.

Member

glasser commented Mar 27, 2015

Thanks, the problem seems to be that ps on some platforms corrupts characters such as т.

(Doesn't look like GitHub has preview for comment editing for some reason.)

glasser added a commit that referenced this issue Mar 27, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.

glasser added a commit that referenced this issue Mar 27, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.

glasser added a commit that referenced this issue Mar 28, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.

glasser added a commit that referenced this issue Mar 28, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.

glasser added a commit that referenced this issue Mar 28, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.

glasser added a commit that referenced this issue Mar 28, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.

glasser added a commit that referenced this issue Mar 28, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.
@glasser

This comment has been minimized.

Member

glasser commented Mar 28, 2015

OK, this fix took me a little longer than I thought it would, and also unearthed some possible Windows issues. Under review at https://rbcommons.com/s/meteor/r/32/

@glasser glasser closed this in f14464b Mar 31, 2015

glasser added a commit that referenced this issue Mar 31, 2015

glasser added a commit that referenced this issue Mar 31, 2015

findMongoPids: use pgrep where available
ps corrupts some non-ASCII characters on OS X.  pgrep doesn't, but isn't
available everywhere.

Fixes #3999.

glasser added a commit that referenced this issue Apr 3, 2015

run-mongo: Only use pgrep on OS X
The fix to #3999 didn't work on newer Linux systems whose pgrep contains
the backwards-incompatible change
https://gitorious.org/procps/procps/commit/f12277c74d591245767d77badb6bb6af91335656
to not include arguments.

Since the inspiration to use pgrep instead of 'ps ax' was to work around
an OS X bug, just avoid pgrep on Linux in the first place.

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