I am new to Azure Worker Role ,I have created a new Azure Cloud Service project and added a worker role.In which I have a thread that makes function call to sampledll where I am creating EventHub listener.
I found error like below.
Severity Code Description Project File Line Suppression State
Error The process cannot access the file 'D:\Azure\roles\simpleWorkerRole\approot\sampledll.dll' because it is being used by another process. simpleWorkerRole.WorkerRole C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.9\Microsoft.WindowsAzure.targets 1057
The process cannot access the file 'D:\Azure\roles\simpleWorkerRole\approot\sampledll.dll' because it is being used by another process.
The error message indicates the sampledll.dll is being used by another process, you could try to use Process Monitor tool to find which process is using (or locking) sampledll.dll and then you could manually end the process and rebuild the solution.
Related
I have created 2 pipeline in Azure Datafactory. We have a custom activity created to run a python script inside the pipeline.When the pipeline is executed manually it successfully run for n number of time.But i have created a scheduled trigger of an interval of 15 minutes in order to run the 2 pipelines.The first execution successfully runs but in the next interval i am getting the error "Operation on target PyScript failed: Hit unexpected exception and execution failed." we are blocked wiht this.any input on this would be really helpful.
from ADF troubleshooting guide, it states...
Custom Activity :
The following table applies to Azure Batch.
Error code: 2500
Message: Hit unexpected exception and execution failed.
Cause: Can't launch command, or the program returned an error code.
Recommendation: Ensure that the executable file exists. If the program started, make sure stdout.txt and stderr.txt were uploaded to the storage account. It's a good practice to emit copious logs in your code for debugging.
Related helpful doc: Tutorial: Run Python scripts through Azure Data Factory using Azure Batch
Hope this helps.
If you are still blocked, please share failed pipeline run ID & failed activity run ID, for further analysis.
I am trying to create custom scheduler in sugarcrm using its documentation in
http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.9/Architecture/Job_Queue/Schedulers/Creating_Custom_Schedulers/.
I have created job label in path ./custom/Extension/modules/Schedulers/Ext/Language/en_us.final_test.php
with code
$mod_strings['LBL_FINAL_TEST'] = 'Final Test Of Scheduler';
and created job function in path
./custom/Extension/modules/Schedulers/Ext/ScheduledTasks/final_test.php
with code
<?php
array_push($job_strings, 'final_test');
$GLOBALS['log']->fatal('my fatal message inside function');//this works
function final_test(){
$GLOBALS['log']->fatal('my fatal message inside function');//this don't
return true;
}
?>
Here if i put
$GLOBALS['log']->fatal('my fatal message outside function');
outside the function then it runs I get message in log file. But
when i put
$GLOBALS['log']->fatal('my fatal message inside function');
inside the function then this doesn't work and i don't get any log.
Which part am I doing wrong? where can I get proper tutorial to develop custom scheduler for sugarcrm?
NOTE: I have set the scheduler to run at every minute
I'd guess that your Schedulers are not running at all.
(Your "outside" message probably only makes it into the log whenever the file is loaded in general)
Make sure your cron jobs are configured correctly, as they are required to call Sugar's Scheduler Engine every minute: https://support.sugarcrm.com/Knowledge_Base/Schedulers/Introduction_to_Cron_Jobs/
If you don't feel like setting them up, you could also manually trigger Schedulers with php -f cron.php (on web service account e.g. sudo -u www-data php -f cron.php if on Debian linux) in your Sugar directory.
If your function's output still doesn't appear in the logs:
Check if your current function is in custom/modules/Schedulers/Ext/ScheduledTasks/scheduledtasks.ext.php. If not, run a Quick Repair & Rebuild.
Check file permissions on the log file
Check your PHP log/output for errors. E.g. in case you defined a function called "final_test" somewhere else already, PHP would terminate with a fatal error due to a function name collision.
I am trying to run a Console Application in Azure Batch. I have created the Client Application having responsibility of creating and running Job & Tasks in the Azure Batch so far. My ClientApplication successfully creates a Job, a Task within the Job but when the application code uploaded on the AzureStorage get executed in Azure the Pool, the Task fails and exits with an Exit code -532462766. I could not find any information for this exit code. Please help me to fix this.
Here is my code for creating the task and it's configuration
private static async Task<List<CloudTask>> AddTasksAsync(BatchClient batchClient, string jobId)
{
Console.WriteLine("Adding {0} tasks to job [{1}]...", 1, jobId);
List<CloudTask> tasks = new List<CloudTask>();
string taskId = "topNtask";
string taskCommandLine = String.Format("cmd /c %AZ_BATCH_NODE_SHARED_DIR%\\SelfHostedWebAPI.exe {0} {1} {2}", 11109, "MSS_F_MST_______", "Normal");
//string taskCommandLine = String.Format("cmd /c %AZ_BATCH_NODE_SHARED_DIR%\\SelfHostedWebAPI.exe");
CloudTask task = new CloudTask(taskId, taskCommandLine);
tasks.Add(task);
await batchClient.JobOperations.AddTaskAsync(jobId, tasks);
return tasks;
}
And the task failure report from my Azure Portal
Corresponding hex value for -532462766 is 0xE0434352; more information about this error code/exception can be found on this SO post. Common culprits are missing assemblies (see the Assembly Binding Log Viewer). Additionally, the Windows Event Viewer might be able to provide you with more information prior to having to resort to WinDbg and SOS.
Finally I got the solution of this problem and to save one's precious time here is the solution.
We need to upload each and every .dll files and dependencies of our code that run in Azure Pool to the linked AzureStorage account. In addition, when the pool is being created and it's StartTask is initialized, a ResourceFile with SAS(Shared Access Signature, for the target .dll that it points) for every .dll file or any other type, should be given to it as a parameter.
After creating a runbook in Azure automation, I get the following error when I try to publish it:
An error occured while publishing the runbook 'TidyNotifications'. Error details: InternalServerError: Error 1205, Level 13, State 52, Procedure Core.PublishRunbook2, Line 95, Message: Transaction (Process ID 789) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction..
As the error says, there's some other process involved. I tried closing the browser to the portal and re-connecting to make sure I didn't have the runbook open anywhere else but still get the same error.
Anyone come across this or can suggest the way forward?
Thanks.
So in this case the answer was to try again later. Cloud ;)
I am getting the following error when using the following command to upload my function app:
func azure functionapp publish FuncAppName
I ran this from both the parent directory of the function app and the function app directory itself, and got the same error. It looks like some task in the upload times out after a minute or so:
Publish C:\Users\username\Documents\visual studio 2017\Projects\AzureFuncApp contents to an Azure Function App. Locally deleted files are not removed from destination.
Getting site publishing info...
Creating archive for current directory...
Uploading archive...
A task was canceled.
Any idea how to solve this/get more debugging info?
The function in question already exists on Portal and is running. I was previously able to upload it successfully.
Please refer to this GitHub issue:
https://github.com/Azure/azure-functions-cli/issues/147
A change has been made to address this issue and will be included in the next CLI release.