Websphere admin console restart - websphere

Recently I ecountered situation where my WebSphere's admin console stop responding (tired to open it and got timeout). It happened after I've made some changes and saved them.
All the WebSphere application server and nodeAgent was working (checked in serverStatus.sh -all). I could still access my Web Application.
Is there a way to restart just admin console with a script or do I have to restart everything?
In my case the WebSphere works on linux.

I found a solution if someone will be interested. My dmgr process couldn't stop so I have to kill it manualy. Then I had to run startManager.sh script in IBM websphere dmgr location. It's done without restart the whole server.

Related

Websphere nodeagent and server1 stops everyday

I have a IBM WebSphere 8.5.5.13 ND on Windows 2016 standard edition with JDK 1.7 enabled. I see that, node agent and server1 (application server) are getting stopped everyday but the deployment manager is still up and running (i.e. admin console can be accessed). So, I have to start nodeagent and the associated server manually everyday. Investigation done so far
Checked if the windows servers are getting restarted everyday? No they are not
Checked nodeagent start and stop server logs but there are no entries to see, some command was issued for stopping
Checked application server profile (server1) logs but nothing is there.
FYI, I don't have clustering done on WAS but it is planned for the future.
I don't no where else I can look for the reason the node agent and server1 is getting stopped everyday.
okay, this is what I found out. In my case I have
Dmgr01 - registered under windows service
Node agent - not registered under windows service
application server - no need or never register application server if you have deployment manager
Since my node agent was not registered under windows service, whenever I log-off or my session is killed due to in-activity, the default behavior is that, all running processes (jave.exe) associated with WebSphere will be crashed and there will not be any trace of it. This is why, I was unable to find the any logs.
I registered my node agent as windows service and everything worked.

How to Run WAS Liberty Core server as a Background Service in Windows

We have installed WAS Liberty Core 8.5.5 to run Maximo anywhere mobile applications.
If we start the server from CMD then we are able to access worklight console and maximo anywhere apps.
Command we are using to start the server.
server start server1
But once we closed the CMD window the server stops automatically.
Any workaround to run the server as a background Service ?
Also we need info on how to add WAS Liberty server to Windows startup service so that it will start automatically on system restart.
Thanks,
Ajay
You can run Liberty as a Windows service:
https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/twlp_setup_new_server_winserv.html
bin\server registerWinService serverName
bin\server startWinService serverName
bin\server stopWinService serverName
Of course "net stop/net start" or services.msc can be used instead of startWinService/stopWinService
The feature to setup a proper windows service is not available in Websphere Liberty 8.5.5.x.
You can use sc.exe to create a service linked to the server executable, but it won't behave correctly i.e. it won't respond correctly to the commands from the services application. As an example, you will be able to start the service and the server will run, but then you will see an error saying the service did not respond in a timely fashion.
According to this question the proper functionality, as described in the other answer, only became available around version 17.0.0.1.
Hope that helps,
John

Glassfish 4.1.1, domain installed as a service does not restart as a service

I got a Glassfish 4.1.1 copy with two domains on Win2012R2 (no clusters, no instances). I've set a windows service for each of those.
Both services run regularly up until the moment when I restart either or both of them thru their admin web console (server (Admin Server) -> Restart). The following happens:
The domain-related service stops, but does not start again,
The allegedly stopped domain is perfectly functional (deployed apps and admin console are there) (!!!),
When I try to start the win service manually, I get Error 1067 (GF reports "something" is already listening on required ports and that's the domain itself that is now, somehow, NOT run as a service!),
I can start the service again only after I've stopped the domain thru server (Admin Server) -> Stop.
Why did I mention two domains? Because this does not happen when I have just one domain with its' service.
Domains do not share ports, only things in common are the JDK/JRE and general GF files.
Is this a bug in Glassfish or did I set something wrong?
This is a limitation, rather than a bug. The problem is that GlassFish has no way to tell whether or not it is running as a service (and, if it is, what the name of that service would be).
The restart command means that GlassFish is restarting itself, so Windows detects that the process it started has been terminated and shows the service as stopped, but GlassFish spawns a new JVM itself. It has no capability to tell Windows to start the service again.
Essentially, the behaviour you are seeing is expected.
After some more testing, I realized what was going on:
Glassfish is definitively capable of restarting its' own Windows service,
The thing that was happening is it takes GF a few seconds do this on its' own,
But, before GF domain could restart as a service, I clicked the URL to return to admin console, every time. That forced it to run as an ordinary executable.
It does seem like the restart happens faster with just one win service, but I won't claim that as an absolute truth without more testing, for which I have no time now.

why run WAS as service

What are the business reasons (advantages/disadvantages) of running a websphere 6.1 App server as a windows service? I mean what are the factors governing this decision?
The other thing I notice is that when I restart the service...and I click something on the admin console, it does n't give me the login page. What is happening here?
You should give this article a read:
http://www.ibm.com/developerworks/websphere/techjournal/1010_supauth/1010_supauth.html
Can you elaborate on the restarting the service and not receiving the login page issue. I am not sure i understand your query here.
What happens when you click on the console after restarting?
HTH
Manglu
To my knowledge - the main reason for choosing to run WebSphere as a Windows Service is that whenever the server goes down for whatever reason, and then is restarted, if not running WebSphere as a service you will need to actually log on to the server and manually start WebSphere. (startServer.bat, startManager.bat, startNode.bat etc).
So for any environment where uptime is an issue on the Windows platform, choose windows service. If you are just installing a development/test environment...not needed.

Restarting windows service from website

I've a website that puts info into a mySQL database and a windows service (written in VB.Net) that polls the db and actions what's in there.
However, occasionally it stalls and rather than having to RDP into the server, I want superusers to click on a button to restart the service.
I can get the button to say, do a directory listing of c:\ output to a test file so the whole 'getting a command to execute on a remote server' issue works. However, I can't restart services.
I assume this is a security thing (although it has full rights to c:\ I thought I'd sussed that already).
The website runs under the normal IUSR_user so am I doing something really stupid or can someone explain how to get the service to be restarted ?
Many thanks
Adrian
I think a significantly bigger problem is that you have a service that's stalling. Do you have any logs or errors that the service outputs to that you could use to diagnose why it's stalling?
I'd write a service that restarts selected services and call that from my website, just for fun!
It seems that you need to give the user permissions on the specific service. The simplest way to do this (in my view) is to use subinacl.exe from the Windows Resource Kit.
subinacl.exe /service MySQL /Grant=IUSR_user
I'm would be very careful when doing this on a public-facing web server. Have both authentication and rate limiting on the restarting code.
Use the ServiceController class:
http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicecontroller.aspx
This should allow you to connect to the named service and stop/start it.
EDIT:
In addition, you probably need to have your web app impersonate a user with rights to restart the service. This can be accomplished via an identity impersonate in the web.config, or running the web app in a configured application pool in IIS. Keep in mind that the web app will have to run on the same box as the service is running on.

Resources