Installing JBOSS EAP 7.4 on Windows Server – Account and Shutdown problems - windows

I´m trying to install JBOSS EAP 7.4 on Windows Server as a service and I´m having trouble with two issues. All batch files where executed from the command line (cmd.exe) in admin mode.
Installation of Service with local system account
I´m using the service.bat to install it as a service. When checking in the properties of the service for the user context, it says it was installed under a Local Service user.This leads to numerous errors in the startup log, as the service is not allowed to access the file system in R/W mode. Manually setting this to “Local System Account” solves the problem, it runs just fine.
So, how do I configure the installation script that the service will use “Local System Account” or, how can I grant R/W access to this “Local Service”?
Shutdown
The manual states, that you must use the parameter /jbossuser (and password) for the installation. If I don´t, it is not possible to shut down the service via the Windows Services Tool, timeout…
If I add a user to the installation, it can be shutdown. As long as it runs in the “Local Service” context. If I change it to Local System Account, it doesn´t shutdown anymore, timeout…
Beside, this is a productive installation on a virtual server. It will not be possible to have a permanent, dedicated user on such a machine.
How do I configure this correctly?
Current installation params, generated by the service.bat:
"D:\jboss-eap-7.4.6\jboss-eap-7.4\bin\prunsrv.exe" install MyApp
--DisplayName=MyApp
--Description="JBoss Enterprise Application Platform 7"
--LogLevel=INFO
--LogPath="D:\jboss-eap-7.4.6\jboss-eap-7.4\standalone\log"
--LogPrefix=service
--StdOutput=auto
--StdError=auto
--StartMode=exe
--Startup=manual
--StartImage=cmd.exe
--StartPath="D:\jboss-eap-7.4.6\jboss-eap-7.4\bin" ++StartParams="/c#set#NOPAUSE=Y#&&#standalone.bat#-Djboss.server.base.dir=D:\jboss-eap-7.4.6\jboss-eap-7.4\standalone#--server-config=standalone.xml"
--StopMode=exe
--StopImage=cmd.exe
--StopPath="D:\jboss-eap-7.4.6\jboss-eap-7.4\bin"
++StopParams="/c jboss-cli.bat --controller=localhost:9990 --connect --user=ABC --password='12345' --command=:shutdown"
Any help is appreciated!

Related

stop and start IIS server for TFS build Access denied

I need to stop and start IIS server for TFS build. When do this using .bat file iisreset /stop, similarly for start.
When I do this I get
Access denied, you must be an administrator of the remote computer to use this command. Either have your account added to the administrator local group of the remote computer or to the domain administrator global group.
Please note: This is Windows server 2019
I am already admin of this machine.
I have given read/write access to everyone in this folder.
I have unset EnableLUA to '0' in the registry as told in link for site
Above all these, I restarted machine.
I still get error in TFS build.
When you start a build in TFS the execution of that build is effectively done by a build agent. A build agent is just a service running on any particular machine. So, your batch file that shall start/stop the IIS service will be executed by whatever build agent is running your particular build.
This in terms means that your batch file is executed by the user that is used to run the build service. If that user does not have the necessary admin rights you face this particular error message.
What you need to do is make sure that all accounts that you use to run your build agents have administrative permissions on whatever machine you want to start/stop IIS.
You are trying to do IISRESET in your batch script. You need to be an Administrator as basic right to execute IISRESET command. So the account which the build is running needs to be part of the Admin group on the box.
Other approach is to stop and start w3svc using sc config commands or NET STOP WAS /Y and NET START W3SVC
Both of your answers are correct, I added the 'Network Service' of TFS to admin group of machine. Then build was success. Administrative tools>Computer Management> Local Users and Groups>Groups>
Inside Administrators and Users add 'Network Services'. If you don't find 'Network Service' then change location to your computer node and add them.

Vagrant/Chef Windows Bootstrapping Issue

I'm fairly new to doing DevOps stuff in Windows so I think the issue here is a gap in my own knowledge that so far I've been unable to plug despite trawling the web for hours and hours.
I'm using Vagrant to spin up a VM then the Chef Client provisioner to actually provision that VM.
I've configured Vagrant to log in via WinRM using an Administrator account, which then installs and runs chef under that user.
One of the executables I'm installing with Chef installs it's own dependencies (Microsoft SQL Local Database) as the 'SYSTEM' user, and then the program as the Admin user. For some reason, the installation of the exe fails because it can't access the LocalDB server because it's installed as 'SYSTEM'.
In my Chef recipe there is a task to set up the chef client to run as a Windows scheduled task under the 'SYSTEM' user. Is there anyway to get Vagrant to provision the chef client, instruct it what role/recipes I want to use, but only run it under the 'system' user as a scheduled task?
Thanks for any help in advance.

How to find WebSphere 8.5 Admin console URL in Linux

I installed WebSphere 8.5 on Redhat Linux using the below steps.
1. Unzip the installation kit (WAS_V8.5_1_OF_3.zip, WAS_V8.5_2_OF_3.zip & WAS_V8.5_3_OF_3.zip)
2. Login as normal user
3. Navigate to the folder WLP/wlp-8500.jar
4. Install thru Running: 'java -jar wlp-8500.jar'
5. Follow the steps and complete installation (all comand line)
6. Move to wlp folder
7. Create server instance thru Moving to bin folder and Run 'server create <serverName>'
7. Start server thru Running 'server start <serverName>'
8. Check the server status thru Running 'server status <serverName>'
After this setup I created and started the server. It is up and running.
I dont know how to login to Admin console. I tried different URLs and ports nothing is working.
http://localhost:9060/ibm/console
http://localhost:9080/ibm/console
How to find the Admin Console URL or Port no?
You have installed WebSphere Liberty Profile (wlp) not the full (aka classic) WebSphere Application Server. WebSphere Liberty doesn't have full administrative console like classic one. You have only simplified adminCenter feature, which must be installed separately.
The Admin Center is a web user interface that runs on Liberty profile V8.5.5.2 and later servers, since you have 8.5.0.0 version looking at your log, you will have to install later version to see it.
See also:
AdminCenter feature
Settig up AdminCenter in Liberty
AdminCenter on youtube - Overview, New features (03/2015)
If you want full administrative console, you have to use Installation Manager and install WebSphere Application Server, not the Liberty profile.
I can only tell you the default ports you may have changed them:
http : 9060
https: 9043
To find the exact port:
Open WC_profiledir/logs/AboutThisProfile.txt
Look for lines similar to the following:
Administrative console port: 9102
Administrative console secure port: 9104

Allowiing Jenkins restart from webapp when started from command line

I have a windows installation of Jenkins, and I run it as regular logged in user on the desktop via java -jar jenkins.war.
Restarting it remotely via the web interface (going to http://jenkins/safeRestart) gives me the following exception:
javax.servlet.ServletException: hudson.lifecycle.RestartNotSupportedException: Default Windows lifecycle does not support restart.
Is it possible to allow remote restart even when not running as a service?

How to change the IIS 7 application pool on a remote server?

I am looking to create new virtual directories on a remote server and set the app pool to a configuration other than the default. I am using NAnt but open to any other commands that can accompolish this.
Here is what I have tried:
<mkiisdir iisserver="${remote.server}" dirpath="${install.path}" vdirname="${vir.dir.name}" />
The above works fine in creating the VD to a remote server but the nant task does not have a parameter for specificing the application pool. Strange as to why not !!
I looked into using powershell to update the application pool since I already have the Virtual Directory created but due to my Windows OS restrictions I am unable to install the WebAdministration module which is required to update the IIS app pool.
Is there any existing method to accompolish this that I have not considered?
Thanks.
You can use AppCmd.exe which is located in the System32 folder.
appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"
If you need to Update the web applications directories on other servers remotely, then you can use PSExec \\RemoteServerHostname appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"

Resources