I am trying to start the GlassFish Server from the command line:
I typed in the following command:
asadmin start-domain -verbose
or
asadmin start-domain domain1
or
asadmin start-domain
I'm looking over the error output. I see this first:
java.io.FileNotFoundException: C:\Program Files\Sun\
SDK\domains\domain\config\domain-registry (Access is denied)
Thanks.
Sally
basically try running GF in superuser mode or change permission of the files in domain directory appropriately
In windows:
open command prompt as administrator
run command
asadmin start-domain doman1
In linux:
execute command with root permission. i.e
sudo asadmin start-domain doman1
Try running as administrator
asadmin start-domain doman1
Related
I am trying to connect to my server via SSH in VS Code for Ubuntu WSL2. However, whenever I make a connection, it is using the windows SSH instead of my Ubuntu WSL2. Is there anyway to start the remote SSH terminal in Ubuntu instead of the default Windows command prompt?
[10:14:37.201] Log Level: 2
[10:14:37.205] remote-ssh#0.62.0
[10:14:37.205] win32 x64
[10:14:37.208] "remote.SSH.sshPath": /usr/bin/ssh
[10:14:37.208] "remote.SSH.sshConfigurationFile": ~/.ssh/config
[10:14:37.245] Checking ssh with "/usr/bin/ssh -V"
[10:14:37.251] Got error from ssh: spawn /usr/bin/ssh ENOENT
[10:14:37.251] The specified path /usr/bin/ssh is not a valid SSH binary
[10:14:37.252] Checking ssh with "ssh -V"
[10:14:37.296] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[10:14:37.300] Using SSH config file "~/.ssh/config"
[10:14:37.300] Running script with connection command: ssh -T -D 60054 -F "~/.ssh/config" "test-wsl" bash
[10:14:37.303] Terminal shell path: C:\WINDOWS\System32\cmd.exe
If anyone else ran into the same problem as me, it seems that remote server in VS Code is picking up cmd as the default terminal, so I had to copy my private keys over to /mnt/c/Users/{user}/.ssh directory in order to get ssh key based authentication to work. It would be better if I could change the default shell to C:\WINDOWS\System32\bash.exe.
so I have this problem where whenever I try to run any variation of dpd command such as "dpd -d" "dpd -d --mongod "C:\Program Files\MongoDB\Server\4.2\bin\mongod.exe" or "dpd -p 5500 app.dpd" I constantly get the error: (I am using Windows 10)
deployd CLI version 2.0.2
starting deployd
Failed to start MongoDB (Make sure 'mongod' are in your $PATH or use dpd --mongod option. Ref: http://docs.deployd.com/docs/basics/cli.html)
Yes, I do have mongod directory in my PATH.
I have checked and my PATH variables for user and global are set to the /bin direction of mongod.
I have tried running it while mongod.exe is running and when it's closed, setting the PATH by the %PATH% command etc. I have ran out of options at this point. I did manage to run the dashboard once but there was 404 [Object object] only written there and then I couldn't reopen it again. Any ideas? None of the solutions from SO worked for me so far.
ss.exe command -I- won't run using local service
If I run the below command as a network user it works.
"C:\Program Files\SourceSafe\win32\SS.EXE" GET $/JavaSource -R -W -GL "d:\Release\com\fitltd" -GF- -O- -I- Set d:\Release\com\fitltd as the default folder for project $/JavaSource?(Y/N)N
However if this command is called using a local service user (Jenkins service) the command stops waiting for input (you can't see the question it is waiting (see above) for unless you run the same thing using a network user).
so the output looks like: "C:\Program Files\SourceSafe\win32\SS.EXE" GET $/JavaSource -R -W -GL "d:\Release\com\fitltd" -GF- -O- -I-
I am running Windows 2008 R2.
I am using chef to automate deployment. In that Starting of jboss is needed so I used this code to start it.
bash "jboss_checking" do
code <<-EOL
JBOSS_DIR='/home/Documents/jboss-as-7.1.1.Final'
cd $JBOSS_DIR
nohup ./bin/standalone.sh -b 0.0.0.0 --server-config=standalone-full.xml -bmanagement 0.0.0.0 &
EOL
end
when I run this script jboss not going to start.When i put the same commands in .sh file and run it, jboss started. Can anybody suggest me where I need to change?
I find out new way.If I remove '&' from this line
"nohup ./bin/standalone.sh -b 0.0.0.0 --server-config=standalone-full.xml -bmanagement 0.0.0.0 &"
JBOSS is running but it paused chef script to continue.
I would probably do it this way:
bash 'jboss_checking' do
code <<-EOL
nohup ./bin/standalone.sh -b 0.0.0.0 --server-config=standalone-full.xml -bmanagement 0.0.0.0 &
EOL
user '...username...'
cwd '/home/Documents/jboss-as-7.1.1.Final'
environment(
'JAVA_HOME' => '...'
)
end
which
specifies working directoy explicitly
defines the user under which the command is executed
as Tensibai already said: You'll need to specify at least JAVA_HOME and probably other environment variables, too.
An even better solution would be to deploy an sysv-init/upstart/systemd/launchd script…
I am having a virtual machine which i am using it as a server. I have my local machine as a client.
I have a windows batch file in the virtual machine, a.k.a the server which has a series of command.
I try to run the batch file from the client through psexec. I can access the file and execute the file. But not all the commands are executed. They need administrative privileges.
The command that i use is
psexec \virtualmachinename -s -u domainname\username -p PASSWORD c:\foldername\batchfile.bat
NOTE 1: I cannot select the option of "Run as Administrator" in the properties of the batch file. The check box is grayed, that means i cannot select/deselect anything.
NOTE 2: I have given the user of my virtual machine full administrative privileges.
Any insight or possible solutions will be of great help.
If the account you are logging into with is an Administrator then your code should be working.
However the first thing I would try would be to add runas /user:administrator ie:
psexec \\virtualmachinename -u domainname\username -p PASSWORD cmd && runas /user:administrator && c:\foldername\batchfile.bat