Identify which server instance is represented by a particular java.exe on task manager - websphere-6.1

From my RAD workspace, I start a Websphere portal server and a Websphere App Server. Now when I go to Task Manager--> Processes, I see two java.exes running that represent the two server instances.
How can I tell which java.exe is for the portal and which java.exe is the App Server?

PROFILE_HOME/logs/SERVER_NAME/SERVER_NAME.pid contains the server PID. In task manager, ensure View > Select Columns > PID (Process Identifier) is checked.

Use Sysinternals Process Explorer instead of Task Manager. It can show you the full command line and the loaded libraries for every running process; also which process started it. Usually it is easy to distinguish different Java services that way. Some services might store their PID into some file, too, but that depends on the service.

Related

Duplicated port of child tasks in Spring Cloud Data Flow

When I launch new task (Spring Batch Job) using Spring Cloud Data Flow, I see that SCDF auto initialize Tomcat with some "random" ports but I do not know if there ports are created randomly or following any rule of the framework?
Therefore, I sometime have a trouble that "Web server failed to start. Port 123456 was already in use".
In conclusion, my questions are:
1) How does the framework choose ports for initializing? (randomly or by principle)?
2) Are there anyway to launch task effectively without duplicated ports(fixed configuration or method for choosing unused port at particular time)?
I don't think SCDF has anything to do with the port assignment etc.,
It is your task application that gets launched. You need to decide whether you really need the web dependency that brings in the tomcat to your application.
Assuming you use Spring Boot, you can either exclude the web starter dependency in your dependencies or pass the command line arg server.port=<?> to a specific port when launching the task (if you really need this task app to be a web app).

MobileFirst Server 7.0.0 as service on Windows Server 2012 not recognizing runtime environments

We are encountering a problem running the MobileFirst Enterprise Server on Windows Server 2012 R2. When we start using a batch file as Administrator, as long as we stay remote connected the server is working OK, we see the Runtime Environments. But when we log out, server is unreachable. We created a Windows Service that starts the server with same command:
*sc create WASLibertyV85 binPath= "C:\Program Files\IBM\WebSphere\Liberty\bin\server.bat start worklight" DisplayName="IBM WebSphere Liberty V8.5 Worklight" start=auto*
But the Runtime is not displayed, we only see:
No runtime environment deployed in this server.
Is there a way to enable MobileFirst Server seeing the Runtime Environments when was started as service?
Here's our complete solution:
1. Start CMD as administrator and run this:
sc create WASLibertyV85 binPath= "C:\Program Files\IBM\WebSphere\Liberty\bin\server.bat start worklight" DisplayName="IBM WebSphere Liberty V8.5 Worklight" start=delayed-auto
2. under Services.msc open the properties of the „IBM WebSphere Liberty V8.5 Worklight“ service and set this (if not already):
Tab GENERAL -> Startup type: Automatic (Delayed Start)
Tab LOG ON -> Log on as: Local System account + Allow service to interact with desktop
++ When the server restarts, it can take up to 2 minutes, until the runtimes are displayed in the Worklight Console!++
MFP is not being run as a service. MFP is simply a web app (a .war file, a .jar file and some artifacts) running on-top of WebSphere Liberty, in your case. So all of this is related only to Liberty and not to MFP.
As long as the Liberty instance is launched correctly, it should handle everything on its own, including the web apps that are deployed to it, MFP being one of them.
You could perhaps follow the instructions provided in this forum topic explaining how to use Apache Commons Daemon to run Liberty as a Windows service. There are other tools that can do this as well.
The problem was cause by starting the service with a log on account set as current windows user. When we've chaged to Local System Account and enabled Allow system to interact with desktop, the Runtime became visible on MobileFirst Server.

Windows Service Install Ends in Rollback

When I try to install a Windows service:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil
I get, what looks to be, some success messages and some failure messages. Part way down:
An exception occurred during the Install phase.
System.ComponentModel.Win32Exception: The specified service has been marked for deletion
At the end:
The Rollback phase completed successfully.
The transacted install has completed.
The installation failed, and the rollback has been performed.
The service is given an entry in the Services applet, but it is marked as "Disabled". When I attempt to change it to another state, I get a "marked for deletion" error message.
There are no messages in the Event Log. There is nothing useful in the log file created by installutil.exe (I believe it's written to the current working directory).
I have no direction to go with this. What do I do?
It turns out that the install might, or probably will, fail if that service is highlighted in the Services applet. It's safest to just close the Services applet, install the service, and then re-open the Services applet. It's really stupid.
Also, make sure to run the console as admin.
I experienced the same and the issue for me was that a service with the same name was already installed. So in order to install the new service I had to uninstall the older services. I am learning how to create and setup windows services and thus the naming conflicting. Tried uninstalling the service first through:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\installutil -u servicename.exe
Once this statement executes successfully, install your service and it should succeed without any rollbacks.
Right Click on Command Prompt and choose RUN AS ADMINISTRATOR
Then copy and paste in: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil.exe C:\TestService\bin\Debug\TestService.exe
Result in TestService.InstallLog is:
Installing service TestService...
Service TestService has been successfully installed.
Some times this happens due to permission issues.
Run the "Developer Command Prompt for VS 2012" as Administrator.
Then it will work.
Adding few more check's and points to solve this above issue.
Build service in release mode and take release folder files and kept in different path
Copy that path and go to visual studio command prompt window and run this bellow sample command to install the service.
Please close services.msc window if its opened , then run C:Program Files (x86)\Microsoft Visual Studio 11.0>InstallUtil.exe C:\RunLocationServices\TestService.exe
Go services.msc and select that service and click on start ,if it changed to "started" then your service running fine.
Still if issue exists then
Another Checkpoint & SOLUTION
When a service starts, the service communicates to the Service Control Manager how long the service must have to start (the time-out period for the service).
If the Service Control Manager does not receive a "service started" notice from the service within this time-out period,
the Service Control Manager terminates the process that hosts the service.
This time-out period is typically less than 30 seconds.
If you do not adjust this time-out period, the Service Control Manager ends the process.
To adjust this time-out period, follow these steps:
1.Go to Start > Run > and type regedit
2.Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
With the control folder selected, right click in the pane on the right and select new DWORD Value
3.Name the new DWORD: ServicesPipeTimeout
4.Right-click ServicesPipeTimeout, and then click Modify
Click Decimal, type '180000', and then click OK
5.Restart the computer
Still if issue exists then problem in your service code ,infinate loop may occur due to your methods/classes of service calling. Do code review of each line.
This problem is due to security, you'd better open developer command prompt for VS 2012:
RUN AS ADMINISTRATOR
and install your service. It will surely fix your problem.
I tried and the issue was resolved.

HTTP The service is starting or stopping. Please try again later error on windows 7

I used following command to stop the HTTP service
net stop http /y
And I got following error message:
The service is starting or stopping. Please try again later.
Now the HTTP service is in a in-between state. Its neither stopped nor starting. What should i do?
I read some similar issues but they are not helping.
Can't stop IIS in windows 7
You should be able to kill it via the Task Manager.
Right-click on taskbar -> Start Task Manager Go to Process tab
If you can find the service under the Processes tab:
Right click and select "End Process"
If you don't see it under Processes (or don't know which is the process for the service you want to kill),
While on the Processes tab
Check "Show processes from all users" in the lower left
Then "View" menu and choose "Select Columns"
Check "PID" and hit OK
Go to the services tab to find the PID of the service you want to kill
Go back to Processes tab and Right-click -> End Processstrong text
Copied the answer from the https://superuser.com/questions/489949/force-windows-7-service-to-stop
and it worked for me.
There are probably some processes that have open handles to \Device\Http\*.
You need close these handles or processes (e.g. in Process Explorer) to let the HTTP service stop.
I did this (on Windows 10) and can be done on Windows 7 (see below):
Turn on the windows feature the IIS Management Console.
Windows search for "IIS Manager"
From the Manage Server Menu on the right, select "Stop"
it worked. (e.g. free up the port 80 )
I checked that the same can be done on Windows 7 : https://learn.microsoft.com/en-us/iis/install/installing-iis-7/installing-iis-on-windows-vista-and-windows-7
What worked for me (I am using Windows 10):
Restarted the PC - It reset the "starting and stopping state" and started Http service - Irrespective of OS worth trying
Opened command prompt in the administrator mode
Http Service is running by default, can check using command -> Net Start HTTP
Run command -> Net Stop HTTP
Following message is displayed
The following services depend on the HTTP Service service.
Stopping the HTTP Service service also stops these services.
WWW Publishing Service
W3C Logging Service
SSDP search
Feature Search Resource Release
Function Search Provider Host
Upon entering 'Y', HTTP Service stops

Websphere App Server administration

How can I see all my webserver process running in Websphere application server administration?
by saying webserver, I will assume you're talking about the IBM IHS server, not the java application server.
Whether your webserver process runs on a managed node (with node agent) or unmanaged node (without node agent), you should be able to see its status (running/not running) if you have setup the webserver properties (port number it runs on, IHS binary directories, etc...)

Resources