Skip to content

Instantly share code, notes, and snippets.

@RobTranquillo
Created January 29, 2016 06:17
Show Gist options
  • Save RobTranquillo/cd08d85438f9ef03ce21 to your computer and use it in GitHub Desktop.
Save RobTranquillo/cd08d85438f9ef03ce21 to your computer and use it in GitHub Desktop.
Meteor mongod not starting on Debian+Docker, problem solution history
$ meteor
=> Started proxy.
Unexpected mongo exit code 1. Restarting.
Unexpected mongo exit code 1. Restarting.
Unexpected mongo exit code 1. Restarting.
Can't start Mongo server.
MongoDB failed global initialization
--
$ export LC_ALL=en_US.UTF-8
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
--
$ cat /etc/default/locale
$ File generated by update-locale
$ sudo sh -c "echo -e 'LANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale"
$ bash
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
--
$ perl -e exit
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "de_DE.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
--
$ dpkg-reconfigure locale
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "de_DE.utf8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg-query: package 'locale' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: locale is not installed
--
$ locale-gen en_US.UTF-8
Generating locales (this might take a while)...
en_GB.utf8...character map file `utf8' not found: No such file or directory
circular dependencies between locale definitions
done
Generation complete.
--
localedef -i de_DE -f UTF-8 en_US.UTF-8
worked the problem out on a Docker container on a
3.19.0-trunk-amd64 #1 SMP Debian 3.19.3-1~exp1 (2015-03-29)
@SalahAdDin
Copy link

I haven't understood, these coman, localedef put en_US as the new locale for the system?

@bush
Copy link

bush commented Sep 3, 2016

I'm currently seeing this issue in a docker container created from a ubuntu:16.04 image. I resolved it like this in my Dockerfile:

FROM ubuntu:16.04
ENV OS_LOCALE="en_US.UTF-8"
RUN locale-gen ${OS_LOCALE}
ENV LANG=${OS_LOCALE}
LANGUAGE=en_US:en
LC_ALL=${OS_LOCALE}
RUN apt-get update && apt-get -y install curl locales && curl https://install.meteor.com/ | sh

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