Not defined error for validate commands

Can I install or reinstall the add-ons for validation detection?
Can I install what I need from cygwin execution file?_

I think I’m missing a seed in my mongo machine to detect validation scripts. I’ve reinstalled several times and I’m running vagrant on cygwin now. But didn’t execute mingw-get-setup.exe the last time. I’m receiving this error for replica set lab validation:
[thread1] ReferenceError: validate_lab_initialize_local_replica_set is not defined :
my output for rs.isMaster() shows
rs.isMaster() rs.isMaster()
{
“hosts” : [
“192.168.103.100:27001”,
“192.168.103.100:27002”,
“192.168.103.100:27003”
],
etc.

And similarly errors for
validate_lab_remove_readd_node

Hi Brian_18814,

Please run download_validators from inside the vagrant.

If that also shows undefined, then, provision your vagrant again by:

vagrant up --provision

If nothing works, then download validation files, and import to vagrant and use, find them here.

Kanika

Thanks Kanik. Will try that.

No joy as yet Kanik. the download_validators produced a list and seemed to be the go. But didn’t fly. I ran vagrant up --provision and tried again but still not defined. THat link to download the files? Can you give that to me again. Can’t seem to find on the hyperlink you supplied.

Here is the link for the post.

Kanika

Thanks Kanic. My next problem is to extract a tgz file.

I found this command

tar -xvzf /path/to/yourfile.tgz

I’ll try that

As I wrote in another of your thread with the same issue: validate_lab_initialize_local_replica_set is a command you run on the vagrant shell not in the mongo shell.

The error message [thread1] ReferenceError: validate_lab_initialize_local_replica_set is not defined : comes from the mongo shell.

1 Like

I’ve put all the files in the vagrant machine directory where I have my config files. And I’ve tried to run the validate command from there with a “command not found” error.
Which directory should I have the files in?

Try:

1.cd DirectoryWhereYouHaveYourConfigFiles
2. ls -l ./
3. ./validate_lab_initialize_local_replica_set

If that does not work, please send the output of ls -l ./

1 Like

vagrant@m103:~$ ls -1 ./

Config2.conf
configRepl.conf
configReplNode2.conf
configReplNode3.conf
data
first_mongod
m103_validation.tgz
mongod-repl-1.conf
mongod-repl-2.conf
mongod-repl-3.conf
mongodAdmin.conf
note2.log
tarValidateFiles
testVagrantPath
tmp
validate_lab_change_dbpath
validate_lab_configuration_file
validate_lab_different_logpath
validate_lab_document_chunks
validate_lab_first_application_user
validate_lab_first_sharded_cluster
validate_lab_import_dataset
validate_lab_initialize_local_replica_set
validate_lab_launch_mongod
validate_lab_remove_readd_node
validate_lab_shard_collection
vagrant@m103:~$ ./validate_lab_initalize_local_replica_set
-bash: ./validate_lab_initalize_local_replica_set: No such file or directory

vagrant@m103:~ validate_lab_initalize_local_replica_set validate_lab_initalize_local_replica_set: command not found vagrant@m103:~

The command is validate_lab_initialize_local_replica_set rather than validate_lab_initalize_local_replica_set

2 Likes

OMG! Thank you so much @steevej-1495 . I guess that was the issue.

@Brian_18814 please try the correct command and let us know.

Kanika

I have the code. I copied and pasted the filename. I’m staring at this and I still can’t see the difference!

code string accepted! :slight_smile: Still can’t see my typo. Will just copy and paste now.

I never get a chance to explain this to anyone. Let me try.

Its in the word initialize and initalize. in i t i alize and in i t alize, you are missing an important i here.

[Ctrl + F] always do the trick.

Kanika

Thanks Kanik. :=~ …

You, my dear @steevej-1495, have the patience of a saint.

@Brian_18814, I believe I may have suggested this before, but I would heartily recommend an online course in Linux basics. It really can’t hurt to understand what you’re doing on the Linux-side, since you’re here to learn about software that often runs on Linux.

1 Like