puppet-mongodb module doesn't show Mongo shell errors in puppet-agent run - ruby

We use the voxpupuli/puppet-mongodb module to create and manage Mongo data bases and users.
As usual we add necessary data to manifests and Hiera and after that the module form a command which it runs on the client side during a puppet-agent run.
We can see the executing command from the puppet-agent debug logs for instance this command create a new DB with the name unixtest_db:
Executing: '/usr/bin/mongo unixtest_db2 --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})'
The problem is the module never report any errors occurred during the commands execution.
For example consider the next hiera code:
tele2_mongodb::mongodb_db:
'unixtest_db': # DB name
user : unixtest
password : >
ENC[PKCS7,....]
auth_mechanism : scram_sha_1
roles :
- dbOwner
As result we have the next command executing and results:
Executing: '/usr/bin/mongo unixtest_db2 --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})'
Notice: /Stage[main]/Tele2_mongodb/Mongodb::Db[unixtest_db]/Mongodb_database[unixtest_db]/ensure: created
Now we can connect to the DB with the user credential mentioned in hiera:
# mongo -u unixtest -p password unixtest_db
MongoDB shell version v5.0.9 connecting to: mongodb://127.0.0.1:27017/unixtest_db?
...
unixtesttst:PRIMARY>
Next we change the DB name in Hiera to all capital letters:
tele2_mongodb::mongodb_db:
'UNIXTEST_DB': # DB name
In puppet agent output we see identical:
Executing: '/usr/bin/mongo UNIXTEST_DB --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})'
Notice: /Stage[main]/Tele2_mongodb/Mongodb::Db[UNIXTEST_DB]/Mongodb_database[UNIXTEST_DB]/ensure: created
But the database is not created, it's not in the db.adminCommand('listDatabases') output (the 1st one with all small letters still exist).
And if we run the command manually on the OS console, we see the error message:
# /usr/bin/mongo UNIXTEST_DB --host 127.0.0.1:27017 --eval " load('/root/.mongorc.js'); db.dummyData.insert({"created_by_puppet": 1})"
MongoDB shell version v5.0.9
...
WriteResult({
"nInserted" : 0,
"writeError" : {
"code" : 13297,
"errmsg" : "db already exists with different case already have: [unixtest_db] trying to create [UNIXTEST_DB]"
}
})
So my question is how to make the puppet also report errors if command execution failed instead of fake notification everything went smoothly.
I have the same problem for DB changes, users and passwords. If something went wrong we never know that from the puppet output.
Any ideas how to fix it?

Related

Why updateNodeList Failed when installing oracle grid infrastructure 12c?

when installing oracle 12c grid infrastructure I received error and must run the following command :
/u01/app/12.1.0/grid/oui/bin/runInstaller -updateNodeList -setCustomNodelist -noClusterEnabled ORACLE_HOME=/u01/app/12.1.0/grid CLUSTER_NODES=kaash-his-1,kaash-his-2 "NODES_TO_SET={kaash-his-1,kaash-his-2}" CRS=false "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=kaash-his-2
when I run the command the result failed .
-bash-4.2$ /u01/app/12.1.0/grid/oui/bin/runInstaller -updateNodeList -setCustomNodelist -noClusterEnabled ORACLE_HOME=/u01/app/12.1.0/grid CLUSTER_NODES=kaash-his-1,kaash-his-2 "NODES_TO_SET={kaash-his-1,kaash-his-2}" CRS=false "INVENTORY_LOCATION=/u01/app/oraInventory" LOCAL_NODE=kaash-his-2ACLE_HOME=/u01/app/12.1.0/grid CLUSTER_NODES=kaash-his-1,kaash-his-2 "NODES_TStarting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 28607 MB Passed
Exception oracle.sysman.oii.oiil.OiilNativeException: S_OWNER_SYSTEM_EPERM occurred..
oracle.sysman.oii.oiil.OiilNativeException: S_OWNER_SYSTEM_EPERM
at oracle.sysman.oii.oiip.osd.unix.OiipuUnixOps.chgrp(Native Method)
at oracle.sysman.oii.oiip.oiipg.OiipgBootstrap.changeGroup(OiipgBootstrap.java:1468)
at oracle.sysman.oii.oiip.oiipg.OiipgBootstrap.writeInvLoc(OiipgBootstrap.java:1113)
at oracle.sysman.oii.oiip.oiipg.OiipgBootstrap.updateInventoryLoc(OiipgBootstrap.java:463)
at oracle.sysman.oii.oiii.OiiiInstallAreaControl.createInventory(OiiiInstallAreaControl.java:5394)
at oracle.sysman.oii.oiii.OiiiInstallAreaControl.initAreaControlWithAccessCheck(OiiiInstallAreaControl.java:1826)
at oracle.sysman.oii.oiic.OiicStandardInventorySession.initAreaControl(OiicStandardInventorySession.java:316)
at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:276)
at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:238)
at oracle.sysman.oii.oiic.OiicStandardInventorySession.initSession(OiicStandardInventorySession.java:187)
at oracle.sysman.oii.oiic.OiicBaseInventoryApp.getInstallAreaControl(OiicBaseInventoryApp.java:993)
at oracle.sysman.oii.oiic.OiicBaseInventoryApp.main_helper(OiicBaseInventoryApp.java:756)
at oracle.sysman.oii.oiic.OiicUpdateNodeList.main(OiicUpdateNodeList.java:492)
'UpdateNodeList' failed.
'UpdateNodeList' failed.
This is the log file :
[grid#KAASH-HIS-2 logs]$ cat UpdateNodeList2023-02-12_12-11-10AM.log
The file oraparam.ini could not be found at /u01/app/12.1.0/grid/oui/bin/oraparam.ini
Using paramFile: /u01/app/12.1.0/grid/oui/oraparam.ini
Checking swap space: must be greater than 500 MB. Actual 28607 MB Passed
Execvp of the child jre : the cmdline is ../../jdk/jre/bin/java, and the argv is
../../jdk/jre/bin/java
-Doracle.installer.library_loc=../lib/linux64
-Doracle.installer.oui_loc=/u01/app/12.1.0/grid/oui/bin/..
-Doracle.installer.bootstrap=FALSE
-Doracle.installer.startup_location=/u01/app/12.1.0/grid/oui/bin
-Doracle.installer.jre_loc=../../jdk/jre
-Doracle.installer.custom_inventory=/u01/app/oraInventory
-Doracle.installer.nlsEnabled="TRUE"
-Doracle.installer.prereqConfigLoc=
-Doracle.installer.unixVersion=5.4.17-2136.315.5.el7uek.x86_64
-Xms150m
-Xmx256m
-XX:MaxPermSize=128M
-cp
/tmp/OraInstall2023-02-12_12-11-10AM::/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/wsclient_extended.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/emCoreConsole.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/jsch.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/remoteinterfaces.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/OraPrereq.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/orai18n-utility.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/OraPrereqChecks.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/adf-share-ca.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/jmxspi.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/instcommon.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/installcommons_1.0.0b.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/ojdbc6.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/instcrs.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/cvu.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/entityManager_proxy.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/javax.security.jacc_1.0.0.0_1-1.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/prov_fixup.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/orai18n-mapping.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/emca.jar:/u01/app/12.1.0/grid/oui/bin//../../inventory/Scripts/ext/jlib/ssh.jar:../jlib/OraInstaller.jar:../jlib/oneclick.jar:../jlib/xmlparserv2.jar:../jlib/share.jar:../jlib/OraInstallerNet.jar:../jlib/emCfg.jar:../jlib/emocmutl.jar:../jlib/OraPrereq.jar:../jlib/jsch.jar:../jlib/ssh.jar:../jlib/remoteinterfaces.jar:../jlib/http_client.jar:../jlib/OraSuiteInstaller.jar:../jlib/opatch.jar:../jlib/opatchactions.jar:../jlib/opatchprereq.jar:../jlib/opatchutil.jar:../jlib/OraCheckPoint.jar:../jlib/InstImages.jar:../jlib/InstHelp.jar:../jlib/InstHelp_de.jar:../jlib/InstHelp_es.jar:../jlib/InstHelp_fr.jar:../jlib/InstHelp_it.jar:../jlib/InstHelp_ja.jar:../jlib/InstHelp_ko.jar:../jlib/InstHelp_pt_BR.jar:../jlib/InstHelp_zh_CN.jar:../jlib/InstHelp_zh_TW.jar:../jlib/oracle_ice.jar:../jlib/help-share.jar:../jlib/ohj.jar:../jlib/ewt3.jar:../jlib/ewt3-swingaccess.jar:../jlib/swingaccess.jar::../jlib/jewt4.jar:../jlib/orai18n-collation.jar:../jlib/orai18n-mapping.jar:../jlib/ojmisc.jar:../jlib/xml.jar:../jlib/srvm.jar:../jlib/srvmasm.jar
oracle.sysman.oii.oiic.OiicUpdateNodeList
-scratchPath
/tmp/OraInstall2023-02-12_12-11-10AM
-sourceType
network
-timestamp
2023-02-12_12-11-10AM
-updateNodeList
-setCustomNodelist
-noClusterEnabled
ORACLE_HOME=/u01/app/12.1.0/grid
CLUSTER_NODES=kaash-his-1,kaash-his-2
NODES_TO_SET={kaash-his-1,kaash-his-2}
CRS=false
INVENTORY_LOCATION=/u01/app/oraInventory
LOCAL_NODE=kaash-his-2
this is id commnad :
[grid#KAASH-HIS-2 logs]$ id
uid=54323(grid) gid=1002(oinstall) groups=1002(oinstall),1004(dba),54323,54324 context=system_u:system_r:unconfined_service_t:s0
this is the command I need to run before continue the setup
/u01/app/12.1.0/grid/oui/bin/runInstaller -jreLoc /u01/app/12.1.0/grid/jdk/jre -paramFile /u01/app/12.1.0/grid/oui/clusterparam.ini -silent
-ignoreSysPrereqs -updateNodeList -bigCluster ORACLE_HOME=/u01/app/12.1.0/grid CLUSTER_NODES=kaash-his-2 "NODES_TO_SET={kaash-his-1,kaash-his-2}"
-invPtrLoc "/u01/app/12.1.0/grid/oraInst.loc" -local
when I execute the command I got this error
The operation failed as it was called without path of Oracle Home being attached
how can I attach oracle home and execute the command please ?

Error starting hyperledger-composer network after Fabric and Composer version upgrade

I've come across an error starting the hyperledger-composer network that isn't answered in the composer-wiki.
✖ Starting business network definition. This may take a minute...
Error: Error trying to start business network. Error: No valid responses from any peers.
Response from attempted peer comms was an error: Error: transaction returned with failure: can't find PEM header: undefined
Command failed
Checking pre-requisites,
Fabric 1.2
Composer 0.20.4
Node 8.12.0
Docker 18.01.1
"composer network install" was successful, with file appearing in the docker peer at /var/hyperleder/production/chaincodes
After running the "composer network start" command, a "docker ps" shows new docker instance with name:
dev-peer0.org1.example.com-<<business-network-name>>-0.0.7
But any attempt to ping this results in a failure like this:
Error: Error trying to ping. Error: make sure the chaincode <<business-network-name>> has been successfully instantiated and try again: getccdata composerchannel/<<business-network-name>> responded with error: could not find chaincode with name '<<business-network-name>>'
Checking the log of the dev-peer0, it ends with the following:
2018-11-05T05:03:18.227Z [4264161f] ERROR :Composer :Init() can't find PEM header: undefined
2018-11-05T05:03:18.227Z [4264161f] VERBOSE :Composer :#PERF Init() Total (ms) duration for txnID [4264161fc30a61c70884d4c7efb460fea6a755d07bc4852875c393346795227a]: 929.00
2018-11-05T05:03:18.228Z ERROR [lib/handler.js] [composerchannel-4264161f]Calling chaincode Init() returned error response [can't find PEM header: undefined]. Sending ERROR message back to peer
The corresponding error in the peer0 log is a big larger:
2018-11-05 05:03:18.229 UTC [endorser] SimulateProposal -> ERRO 439d [composerchannel][4264161f] failed to invoke chaincode name:"lscc" , error: transaction returned with failure: can't find PEM header: undefined
github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:202
github.com/hyperledger/fabric/core/endorser.(*SupportImpl).Execute
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131
github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:173
github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:287
github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:501
github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61
github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal
/opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:31
github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler
/opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:112
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:923
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1148
github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1
/opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:637
runtime.goexit
/opt/go/src/runtime/asm_amd64.s:2361
2018-11-05 05:03:18.229 UTC [endorser] SimulateProposal -> DEBU 439e [composerchannel][4264161f] Exit
Since this last worked I have updated composer from 0.19 to 0.20.4, and taken Fabric from 1.1 to 1.2.
Googling suggests that this kind of error "can't find PEM header: undefined" is associated with a change in key signing. After tearing down Fabric I re-ran ./createPeerAdminCard.sh - is there another card or similar that needs to be re-created to accomodate the latest versions?
Thanks to #R Thatcher for putting me onto the right direction. This was all down to mismatching cards, and was resolved by clearing out everything and starting again.
Specifically, in /fabric-dev-servers:
./stopFabric.sh
./teardownFabric.sh
composer card list
composer card delete -c admin#<business-network-name>
composer card delete -c PeerAdmin#hlfv1
./startFabric.sh
./createPeerAdminCard.sh
Then changing into the composer/business-network-name directory:
composer network install --card PeerAdmin#hlfv1 --archiveFile business-network-name\#0.0.7.bna
composer network start -c PeerAdmin#hlfv1 -n business-network-name -V 0.0.7 -A admin -S adminpw --file networkadmin.card
composer card import --file networkadmin.card --card admin#business-network-name
composer network ping -c admin#business-network-name
So yes, it was about mismatching cards and not cleaning these up as part of a new deployment.
Although not part of the original problem, it's also worth noting that the -A and -S parameters of the composer network start command HAD to be set to admin and adminpw respectively. See composer issue #3781.
Answering the the last remark from #Capn Sparrow
"the -A and -S parameters of the composer network start command HAD to be set to admin and adminpw respectively."
This is the correct and expected behaviour :-)
with the composer network start command the -A and -S are specifying an existing user in the CA that we want a new set of Credentials (certificate and keys) for which is then bound to a Composer System participant.
When you use the 'standard development fabric' this has a CA configured with a user called 'admin' with a secret of 'adminpw'. If you had build your own Fabric from scratch you could choose the name and secret of your first default user. Alternatively you could work with the fabric-ca client software to create additional users in the CA.

How to connect to Bigtable Emulator from a GoLang application? How to use it?

I am trying to use BigTable Emulator. I have never used it before. I followed the documentation but not able to understand,
How to connect an application to Emulator.
How to set BIGTABLE_EMULATOR_HOST environment variable.
Please help by explaining it or pointing me to any examples or links.
Thank you.
The BIGTABLE_EMULATOR_HOST environment variable overrides the normal connection logic. Having it set causes a client to connect to the emulator without any special changes needed in the code (i.e. the project/instance values passed to NewAdminClient()/NewClient() are ignored).
The command provided in step 2 of the Using the emulator instructions sets the environment variable for you.
See the implementation of GoogleCloudPlatform/golang-samples/bigtable/helloworld/main.go for a simple, concrete example of interacting with a BigTable instance.
Walkthrough
To demonstrate using the Bigtable Emulator from go, I'm using a free tier, f1-micro Compute Engine instance. It's an instance where I hadn't used go before, so it's basically a clean slate.
First things first, I setup my go environment:
$ sudo apt install golang
<... SNIP apt output ...>
$ mkdir ~/go
$ export GOPATH=$HOME/go
Then I updated the google-cloud-sdk package and installed the google-cloud-sdk-bigtable-emulator package:
$ sudo apt install google-cloud-sdk
<... SNIP apt output ...>
$ sudo apt install google-cloud-sdk-bigtable-emulator
<... SNIP apt output ...>
At this point the emulator is ready to run, so I started it using the documented command:
$ gcloud beta emulators bigtable start
Executing: /usr/lib/google-cloud-sdk/platform/bigtable-emulator/cbtemulator --host=localhost --port=8086
[bigtable] Cloud Bigtable emulator running on 127.0.0.1:8086
After starting it, it runs in the foreground, so I left that terminal alone and started a new one.
In the new terminal, the first thing is setting the BIGTABLE_EMULATOR_HOST environment variable. This step is documented in the emulator instructions. The following command generates the shell command for setting the variable. To see the command it generates it, run it directly:
$ gcloud beta emulators bigtable env-init
export BIGTABLE_EMULATOR_HOST=localhost:8086
Running the command enclosed in $(...) as documented tells the shell to execute the output of the command, thereby setting the variable:
$ $(gcloud beta emulators bigtable env-init)
Now that the emulator is running and the environment is ready, I need a client application to to connect to it. I chose to use the helloworld application from the GoogleCloudPlatform/golang-samples repository.
$ git clone https://github.com/GoogleCloudPlatform/golang-samples.git
$ cd golang-samples/bigtable/helloworld
In the main.go file in the above directory, the cloud.google.com/go/bigtable and golang.org/x/net/context packages are imported, so I ran go get to fetch both of them.
$ go get cloud.google.com/go/bigtable
$ go get golang.org/x/net/context
Then I ran the example application, using dummy values for the -project and -instance flags, since it's going to be connecting to the locally running emulator.
$ go run main.go -project foo -instance bar
2018/06/18 00:39:27 Creating table Hello-Bigtable
2018/06/18 00:39:27 Writing greeting rows to table
2018/06/18 00:39:27 Getting a single greeting by row key:
2018/06/18 00:39:27 greeting0 = Hello World!
2018/06/18 00:39:27 Reading all greeting rows:
2018/06/18 00:39:27 greeting0 = Hello World!
2018/06/18 00:39:27 greeting1 = Hello Cloud Bigtable!
2018/06/18 00:39:27 greeting2 = Hello golang!
2018/06/18 00:39:27 Deleting the table
Nothing really happens in the emulator terminal to indicate it's being used. So, to demonstrate that it's actually interacting with the emulator, I stopped the emulator process (by pressing Ctrl-C in it's terminal) and tried executing the client application again:
$ go run main.go -project foo -instance bar
2018/06/18 00:40:03 Retryable error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:8086: getsockopt: connection refused", retrying in 47.77941ms
2018/06/18 00:40:03 Retryable error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:8086: getsockopt: connection refused", retrying in 2.153551ms
2018/06/18 00:40:03 Retryable error: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: Error while dialing dial tcp [::1]:8086: getsockopt: connection refused", retrying in 114.145821ms
<... SNIP repeated errors ...>
^Csignal: interrupt
$
So, using an unmodified client application interacts with the emulator just by having the proper environment variable set.

Logstash install error: can't get unique system GID (no more available GIDs)

I am trying to install logstash with yum on a red hat vm, I already have the logstash.repo file setup according to the guide and i ran
yum install logstash
but I get the following error after it downloads everything
...
logstash-2.3.2-1.noarch.rpm | 72 MB 00:52
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
groupadd: Can't get unique system GID (no more available GIDs)
useradd: group 'logstash' does not exist
error: %pre(logstash-1:2.3.2-1.noarch) scriptlet failed, exit status 6
Error in PREIN scriptlet in rpm package 1:logstash-2.3.2-1.noarch
error: install: %pre scriptlet failed (2), skipping logstash-1:2.3.2-1
Verifying : 1:logstash-2.3.2-1.noarch 1/1
Failed:
logstash.noarch 1:2.3.2-1
Complete!
I can't find much information about this. Any suggestions?
groupadd determines gids for the creation of regular groups from the /etc/login.defs file.
In my centos 6 box. /etc/login.defs contains following two lines:
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 500
GID_MAX 60000
For system accounts add these two lines to your /etc/login.defs
# System accounts
SYS_GID_MIN 100
SYS_GID_MAX 499
I updated the SYS_GID_MAX Value and it worked for me.

"mean init" fails during admin user creation

I follow the basic installation tutorial on for the mean stack on OS X.
MongoDB is running and all dependencies are believed to be installed.
During init of my first app, the script fails when asking for the admin user password (it fails before I am allowed to input anything as my admin password):
$ mean init myApp
? What would you name your mean app? myApp
? The Mean project is currently in developer preview. To help improve the -
quality of this product, we collect anonymized data on how the mean-cli is used -
You may choose to opt out of this collection now (by choosing 'N' at the below prompt)
or at any time in the future by running the following command:
mean disable user-reporting
Do you want to help us improve the mean network (Y/n)? Y
? Please provide your email so we can create your first admin user: joe#doe.com
? Please provide your username so we can create your first admin user: admin
Cloning branch: master into destination folder: myApp
git clone --depth 1 -bmaster https://github.com/linnovate/mean.git "myApp"
Cloning into 'myApp'...
##############################################################
#
# !!! MONGOOSE WARNING !!!
#
# This is an UNSTABLE release of Mongoose.
# Unstable releases are available for preview/testing only.
# DO NOT run this in production.
#
##############################################################
DB connection successful!
Please provide password so we can create your first admin user
prompt: password: /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:246
throw message;
^
TypeError: Cannot read property 'length' of undefined
at processResults (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1581:31)
at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1619:20
at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1157:7
at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/db.js:1890:9
at Server.Base._callHandler (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/base.js:448:41)
at /usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:481:18
at MongoReply.parseBody (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at null.<anonymous> (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:439:20)
at emit (events.js:107:17)
at null.<anonymous> (/usr/local/lib/node_modules/mean-cli/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:201:13)
I am able to create users manually in the resulting app folder.
But the resulting application seems to be incomplete and I cannot start it.
$ mean user joe#doe.com --addRole admin;
Adding role `admin` to user `joe#doe.com`
##############################################################
#
# !!! MONGOOSE WARNING !!!
#
# This is an UNSTABLE release of Mongoose.
# Unstable releases are available for preview/testing only.
# DO NOT run this in production.
#
##############################################################
DB connection successful!
successfully updated
You need to install mongo database.
http://www.liquidweb.com/kb/how-to-install-mongodb-on-ubuntu-14-04/

Resources