Process starts but does not work - asp.net

My ASP.NET program executes an external program (that is supposed to print one-page report) using the Process call as follows:
Process.Start( "PrintOrder.exe", nOrderNumber.ToString());
This works on my computer and on one customer's server.
But on another customer server the process PrintOrder.exe starts (I see it in the Task Manager) but never does what it is supposed to do (print). If I run the PrintOrder.exe from the Command Prompt, not from ASP.NET, it works.

Related

New process type not starting executable

I am attempting to add a Bash shell process type to one of my environments. This bash script updates the process tables and then executes whatever is passed into it.
The Operating system and DB type match my system. Type set to "Other." The command line and parameter fields are set.
I have added the type to "Process Types run on this Server" for my server entry with the same priority as all the other, and max occurance = 1 (no other processes are running in this dev env)
I have added a process, API aware, added a component and appended additional parameters "echo test"
"Process Output Type Settings" has web set for "other"
I start the process, it appears in the process monitor as "queued" but never progresses. But if I copy the command line in "Process Request Parameters" and run it manually on the app server, it works and shows success in the process monitor. However it doesn't post the Log/Trace. Additionally there is no change if I try to make the process not Api aware. As I understand it should at least change to successful after it starts the command line process.
Why would the actual command line process not start? What causes the process to post a Log/Trace? How can I debug this? What else can I troubleshoot?

When is a bash script passes to 'openstack server create --user-data ...' exactly executed?

I have a bash script that I want to be executed before a user can login to the server. I cannot find any information on when this script is exactly executed for different images. Can I assume that this is before a user is able to login using ssh? I'm using cirros.
openstack server create --user-data before_login.sh ...
As soon as your instance boots up this user-data script "before_login.sh" executes on it before any user login into the instance.
User-scripts run at final stage, this stage runs as late in boot as possible. Any scripts that a user is accustomed to running after logging into a system should run correctly here.
You can check below link for cloud-int behaviors for more information
https://cloudinit.readthedocs.io/en/latest/topics/boot.html

Control-m batch job is spanning mutliple versions of a singleton ActiveEx server

as part of a batch job I create 4 command lines through control-m which invoke a legacy console application written in VB6. The console application invokes an ActiveEx server which performs a set of analytic jobs calculating outputs. The ActiveEx server was coded as a singleton but when invoked through control-m I get 4 instances running. the ActiveEx server does not tear down once the job has completed and the command line has closed it self.
I created 4 .bat files which once launced manually on the server, simulate the calls made through control-m and the ActiveEx server behaves as expected, i.e. there is only 1 instance ever running and once complete it closes down gracefully.
What am I doing wrong?
Control-M jobs are run under a service account and it same as we login as a user and execute a job. How did you test this? Did you manually executed each batch job one after another or you have executed all the batch job at the same time from different terminals? You can do one thing. Run the control-M jobs with a time interval like first one at 09.00 second one at 09.05, third one at 09.10 and forth one at 09.15 and see if that fix your issue.
Maybe your job cannot use the Desktop environment.
Check your agent service settings:
Log on As:
User account under which Control‑M Agent service will run.
Valid values:
Local System Account – Service logs on as the system account.
Allow Service to Interact with Desktop – This option is valid only if the service is running as a local system account.
Selected – the service provides a user interface on a desktop that can
be used by whoever is logged in when the service is started. Default.
Unselected – the service does not provide a user interface.
This Account – User account under which Control‑M Agent service will run.
NOTE: If the owner of any Control-M/Server jobs has a "roaming profile" or if job output (OUTPUT) will be copied to or from other computers, the Log in mode must be set to This Account.
Default: Local System Account

Logging terminal output after running script

I've just executed a script on a server and forgot to enable the logging of the output.
is it possible to record everything since i started the session after the script has finised executing? (baring in mind this script takes several hours to run)

How to get the logs from a continuesly running child process in powershell?

I am calling child process from a process in Powershell.
The child process will not end, it will be running continuously in the background.
I need the logs entered by the child process continuously.
process.standardoutput.rradtoend() will enter the logs into file when the child process ends.
But i need the logs continuously.
Please help me in this regard.
You can redirect the log to files as below:
start-process your_executable -ArgumentList "your arguments" -RedirectStandardOutput the_path_you_want_to_put_your_log -RedirectStandardError the_path_to_put_error_log
the logs of the child process will be written to the log files continuously, you can open the files to check them from time to time.
Edit
And I think Unix tail equivalent command in windows Powershell will do you more help, which tell you how to monitor the log file in real time, like use the Get-FileTail Cmdlet from PowerShell Community Extensions

Resources