AWS - Managing EC2 user sessions - amazon-web-services

I have an EC2 (Windoes Server R2 2012) that is running a NodeJS process. Now, the detail is that once I get Disconnected from server (Disconnection it is supposed to keep everything on server, hence my NodeJS process) after a few minutes, the session is killed, so also the process.
I connect again and it is like I have signed out. How can I solve this? I really need to the process still running without stay ALWAYS connected to the server.

Normally Windows installation will not logoff disconnected sessions.
Your installation is probably customized for it to be logging off disconnected RDP sessions.
Load the Group Policy Object Editor and go to Computer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> Session Time Limits.
Check that the setting "Set time limit for disconnected sessions" is either Not Configured, or Enabled, but with a setting of Never.

Related

GCP windows VM does not work when logged off

I am running a Windows Server VM on GCP.
When logging in via Remote Desktop, I am starting certain applications which should actively run for a couple of hours.
But when closing my Remote Desktop Connection, all applications stop working.
How can I prevent this from happening?
In order to keep the session ongoing, you'll have to configure the RD Session Host time limits.
Open the group policy editor with: Windows+R, then type gpedit.msc, confirm with Enter.
Then in the management console, navigate to:
Computer Configuration
Administrative Templates
Windows Components
Remote Desktop Services
Remote Desktop Session Host
Session Time Limits
There one can adjust the settings:
Set time limit for disconnected sessions
Terminate session when time limits are reached

Automate an RDP connection right after Windows instance turns on in GCP

I am performing some UI Automation on GCP using a Windows Server.
The process is as follows:
=> Machine Switches on at a defined time
=> RDP Connection to Machine
=> UI Interaction Script Runs on Startup
=> Process Ends
=> Machine Switches off at a defined time
All the components have been fulfilled except for automating the RDP connection in some way or other. I referred to this link but didn't find much insights or documentations.
Does anyone know a way to Automate an RDP connection right after instance turns on in GCP?
There is a windows application called IAP Desktop, using that you can manage multiple remote Desktop connection to Windows VM. While connecting to the VM you can save the credentials which will allow you to access the Windows VM using RDP just after boot on.
Also to automate the Windows password generation here is the documentation related to 1, inside of that document there are both options available automate or manually.
How are you deploying your startup script?
During the boot sequence, a script will either run before, after or during the boot process. By declaring Windows-specific metadata keys, you can run startup scripts after the instance turns on.
If that doesn't work, there is a paid Cloud Automation service that sounds like it will meet your requirements.
Tried using startup-scripts but no luck IAP Desktop didn't work due to scheduling as well. Finally Managed to solve it via using Windows 10 Auto login settings. This skips login screen and the best part was that out of all the users, it allows you to login via user of your choice. After I Login to the system, I added a startup a bat file by running shell:startup and it worked great.

Remote debug WebLogic cluster

I need to remotely debug a Java EE application running on a WebLogic 10.3.5 cluster. It is important that I debug it whilst clustered, not running on a single box.
I have read docs that state you can either modify the Java Options in the start script or the debug flag in the domain config, however what I do not understand is how you know which server to connect to when clustered.
My cluster is configured for round robin load balancing so I have no way of knowing which server to connect my debugger to.
Is it possible to connect the remote debugger to the cluster rather than a single server?
It would seem there's no domain or cluster level connection available. One must open a new debugger connection to each server.
It just wasn't obvious in my IDE that clicking debug more than once would open multiple debugger connections.
You could try something like this,
Create Debug configuration with Host and Port number of the Admin Server which manages the cluster servers.
Try debug on admin server.

Port 8080 required by VMware vFabric tc Server Developer

I'm using STS (SpringSource Tool Suite) which comes with VMware vFabric tc Server Developer Edition v2.6. The problem is, every time I start it, it shows the following error:
Port 8080 required by VMware vFabric tc Server Developer Edition v2.6
is already in use. The server may already be running in another
process, or a system process may be using the port. To start this
server you will need to stop the other process or change the port
number(s).
I don't have anything using that port that I know of. It has always worked fine until today.
I've also tried to change the port number but it doesn't accept the changes. If I change it to 8081, for example, and then restart STS it overwrites the port and sets it back to 8080.
Can anyone offer some ideas to fix this?
FYI I'm running STS in VirtualBox.
Thanks!
This applies to the latest STS version - 3.0.0
When you open STS, in the Package Explorer view (on the left), you should see a project folder called Servers.
Open Servers > VMware vFabric tc Server Developer Edition v2.7-config > catalina.properties
At the bottom of the file, you will see 2 properties defined:
bio.http.port
bio.https.port
Change bio.http.port to some other port than 8080 (e.g. 8081)
Change bio.https.port to some other port than 8443 (e.g. 8444)
Click 'Save'.
Now, when you do your right-click deploys to the built-in tc Server and start it up, it should run on the new port(s). Good luck!
In the Servers view, double click the server you wish to change the ports on. This brings up the Overview page.
Expand the Ports tab and enter your desired port settings.
The reason STS uses this configuration page is it allows you to configure a workspace server without altering the configuration in your server installation directory.
Or you might want to directly kill the zombie process still bound to that port with an oneliner:
sudo kill -9 `lsof -ti:8080`
In conjunction with Gareth's suggestion, this is what workerd for me:
In the Servers view, right click your server and click Monitoring -> Properties
Stop the monitor listening on port 8080.
Save changes and start the server.

Web Server in IIS stops time after time

I have developed a web service in c# (ASP.NET), and published it in IIS 6.1 (Windows Server 2008). Web application takes data from this web service, but time after time it does not return anything. After I restart web service it works again normally. I don't understand why web service stops returning result time after time. What can cause this? Any help please?
Hard to say without knowing any details. But an approach would be checking the event logs.
Set the Idle timeOut for an Application Pool to 0 instead of default value of 20 minutes for having no timeout when your service is idle.
using inetmgr
Open IIS Manager. For information about opening IIS Manager, see Open
IIS Manager (IIS 7).
In the Connections pane, expand the server node and click Application
Pools.
On the Application Pools page, select the application pool for
which you want to specify idle time-out settings, and then click
Advanced Settings in the Actions pane.
In the Idle Time-out (minutes) box, type a number of minutes, and then click OK.
uisng cmd
appcmd set config /section:applicationPools /[name=' string
'].processModel.idleTimeout: timeSpan
appcmd set config /section:applicationPools /[name=' Marketing '].processModel.idleTimeout:0.00:30:00