Got "Access is denied" when I tried to install 64-bit mongodb in Windows server 2008 - mongodb

All I did is to run below script:
D:\Tools\MongoDb\bin\mongod.exe --dbpath D:\MongoDb\data\
Then I got exception:
Error connecting to the service Control Manager: Access is denied. (5)
I was using administrator account to operate this, I already created folders related to the script.
And I didn't experience issue like this when I installed 32-bit mongodb in 32-bit Windows Server 2003.
I appreciate any help about this!

You need to install it from the command prompt that you have opened with the Run as Administrator option

From Admin command prompt execute:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd C:\Program Files\MongoDB\Server\3.6\bin
C:\Program Files\MongoDB\Server\3.6\bin>mongod.exe -config "c:\data\mongod.cfg" -install
2018-03-20T08:55:00.541+0530 I CONTROL [main] log file "c:\data\log\mongod.log"
exists; moved to "c:\data\log\mongod.log.2018-03-20T03-25-00".
C:\Program Files\MongoDB\Server\3.6\bin>net start MongoDB
The MongoDB service is starting..
The MongoDB service was started successfully.

Related

Could not establish connection to "hostname": The VS Code Server failed to start

I looked at the similar questions to mine, and none of them seemed to fix my problem.
It returns a prompt that says Could not establish connection to "hostname": The VS Code Server failed to start. When I use the command ssh pi#raspberrypi and type in my password everything seems to work.
My Computer: Windows 11
Remote Computer: Raspbian OS
The server.sh file seems to be broken, but I don't know what the file should look like:
#!/usr/bin/env sh
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
case "$1" in
--inspect*) INSPECT="$1"; shift;;
esac
ROOT="$(dirname "$0")"
"$ROOT/node" ${INSPECT:-} "$ROOT/out/server-main.js" --compatibility=1.63 "$#"
and this is the log file on the remote computer:
/home/pi/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/bin/code-server: 12: /home/pi/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/bin/code-server: /home/pi/.vscode-server/bin/c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5/node: not found
solution :Kill VS code Server on host and reconnect maybe work
show Command Palette : ctrl + shift +p
input keyword : Remote-SSH
select target : Remote-SSH: Kill VS Code Server on Host...
reconnect target serer will work
Another solution: Remote-SSH: Uninstall VS Code Server from Host work
You can find Remote-SSH: Uninstall VS Code Server from Host... via the command palette (ctrl/cmd + shift + p).
And if you select or enter the host IP, the vscode installed on that server will be uninstalled.
Then, if you connect to the server again through vscode-ssh, vscode will work well.
After several attempts, I also succeeded in connecting this way.

MongoDB (ServerService) not installing on windows10

I am trying to install mongodb on my windows10 computer, but keep getting error that I don't have the privileges, even though I am the admin user.
I tried running the msi installer getting the error. So I tried the commands shown in the docs https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/#procedure using the terminal running as admin, but getting the same error as seen below.
I am trying to install it on my D:/ Drive. But I also tried installing it in the default C:/Program Files/MongoDB/Server/4.4/ but it didn't work as well.
cmd: msiexec.exe /l*v mdbinstall.log /qb /i mongodb-windows-x86_64-4.4.3-signed.msi INSTALLLOCATION="D:\Program_Files\MongoDB\Server\4.4\" ADDLOCAL="ServerService,Client,Router,MiscellaneousTools" SHOULD_INSTALL_COMPASS="0"
The log on as a service user right allows accounts to start or run services on a Windows machine. By default, and due to security reasons, services can only be configured to run under the Local System, Local Service or Network Service accounts which have a built-in right to log on as a service. Any other user account that requires to run a service must be assigned this right.
Run gpedit.msc.
Navigate to Computer Configuration > Windows Settings > Security Settings > Local Policies >User Rights Assignment.
In the details pane, double-click Log on as a service.
Click Add User or Group and add the account to the list of accounts that have the Log on as a service right. Once you have selected the user, click OK.
Click OK and close the policy editor.
References :
https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/log-on-as-a-service
No matter what I tried, I just couldn't get the Server Service to install on my system through the msi, using either the gui or command line.
So finally I installed it without checking the "Install MongoD as a Service" option.
It successfully installed the mongodb including the mongod.exe in the bin (finally).
Then ->
Set the environment variables PATH to my bin folder
Create the /data/db and /log/mongo.log in the directory you want
Type the command mongod --directoryperdb --dbpath <your_dir_path>\data\db --logpath <your_dir_path>\log\mongo.log --install
Type the command net start MongoDB
And you will have the mongodb service running as I did.

sqlplus not responding after enter password

SQLPLUS is not responding after entering the user name and password.
[root#ns3369978 ~]# su oracle
bash-4.1$ sqlplus
SQL*Plus: Release 12.2.0.1.0 Production on Fri Dec 27 07:52:53 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Enter user-name: xxxx
Enter password:
After entering the password, it is neither connecting nor showing any error. Even I am not able to come out of this. OS is CentOS release 6.9 (Final) on my server. How to find and resolve the issue?
I have searched and found one solution. By using the below command I am able to connect oracle.
sqlplus -prelim "system/123lkls as sysdba"

error occured installing mongo db

D:\mongodb-win32-x86_64-2008plus-2.4.9\bin>m
ongod.exe --dbpath=D:\mongodb --logpath=D:\mongodb\log.txt --install
Mon Feb 24 13:08:02.680 Trying to install Windows service 'MongoDB'
Mon Feb 24 13:08:02.681 Error connecting to the Service Control Manager: Access
is denied. (5)
The access denied does indicate that you lack the permissions to install a windows service. Try to run as administrator (right mouse-> run as administrator).
If you are running from a shell, start an admin shell by clicking right on the shell in the startmenu and then start as administrator

install mongodb on window 8

I try to install mongodb on window 8 .
problem is when i want to install mongodb service
C:\mongodb\bin\mongod.exe --auth --config C:\mongodb\mongod.cfg --install
below error accord
Wed Mar 13 19:13:23 Trying to install Windows service 'MongoDB'
Wed Mar 13 19:13:23 Error connecting to the Service Control Manager: Access is denied. (5)
how Can I Install Mongodb Service?
Open Command with "Run as Administrator",that solved my problem
For anyone that happens to try to create a mongodb service on Windows 8 and follows the instructions on MongoDB's website AND still is unable to create the service successfully - I've written this post that explains how I got it to work after experiencing problems trying to set the mongo service on my Windows 8 laptop. Hope it helps!
Here are the steps that you really need to follow to create a Windows service for MongoDB in Windows 8:
Installing MongoDB on Windows 8
Download and install MongoDB. You can download the 32 or 64-bit version from here.
Make sure you install MongoDB in a folder that you can easily remember, for example: c:\mongodb\
Add directories c:\mongodb\log and c:\mongodb\data
Add log file c:\mongodb\log\mongo.log
Creating a Windows service for MongoDB
Open your command window and type the following:
cd c:\mongodb\bin\mongod.exe --install --rest -master -logpath=c:\mongodb\log\mongo.log
Open the registry settings, press the Windows key and R at the same time and then type regedit in the Run command window.
Go to HKEY_LOCAL_MACHINE >> SYSTEM >> CurrentControlSet >> services
Find out MongoDB directory & edit ImagePath key
Set key value as:
C:\mongodb\bin\mongod --service --rest --master --logpath=C:\mongodb\logs\mongo.log --dbpath=C:\mongodb\data
Save and exit registry editor.
Open Services by pressing the Windows key and R at the same time and then type services.msc in the Run command window and click OK.
Find the MongoDB service and right-click on it, select Properties
Make sure the service is set to start automatically and start the service as shown below.
Open your browser and go to http://localhost:28017/ to see if MongoDB is running correctly, you should see a page full of MongoDB details.
Link to this blog post:
http://ricardodsanchez.com/2014/09/03/install-mongodb-service-on-windows-8/
error message suggest you don't have admin privileges.
"Run all of the following commands in Command Prompt with “Administrative Privileges:”"
Ref: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/#install-and-run-the-mongodb-service
Regards,
Moacy
thanks for answer Moacy Barros but problem was not for this because i run all commands in Command Prompt with “Administrative Privileges:”" problem was for mongod.cfg if mongod.cfg config by manual in editor this problem solve that we didn't need to do this in window 7 or server 2008
Edit::
in older windows when installing MongoDB < 2.2 that i was tested. in Configure directories and files step
echo logpath="C:\Program Files\MongoDB\log\mongo.log" > "C:\Program Files\MongoDB\mongod.cfg"
it make mongod.cfg for your mongodb but it wasn't make for me in window 8 for that i make it by manual like
logpath=C:\mongodb\log\mongo.log
logappend=true
dbpath = E:\data