deployR cannot open the connection - azure

I have set up deployR on an Azure VM, and have logged in as the testuser which comes as default with the installation.
Upon running the ccFraudScore.R model, I get the following error:
> if(!exists('fraudModel')){load('fraudModel.rData')}
Console Error cannot open the connection
API Error cannot open the connection
I also get the same error on my own scripts when trying to load or read.csv data, either from the same folder as the script, or using the deployrExternal() function, with a file to read in the appropriate folder in here: C:\Program Files\Microsoft\DeployR-<version>\deployr\external.
I have set all the inbound Windows Firewall rules to "public" and enabled them, as described in the install documentation.
Please could anyone point me in the direction of where to look next?
Update
Thanks to #warmoverflow, I looked at the diagnostics and the app logs, and it appears everything is configured correctly, and the updated Microsoft installation guide.
If I log in to <IP Address>:<Port>/deployr/landing as administrator, then go to Administration Console > The Grid, I can edit the External directory configuration Storage Context, which by default is /deployr/external/data, as expected from the installation guide.
However, the problem persists.
Temporary Fix
As a temporary fix, I use a full file path to reference any other scripts or data files I need to use, and this works, as follows:
> if(!exists('fraudModel')){load('C:\\Program Files\\Microsoft\\DeployR-8.0.5\\deployr\\external\\repository\\testuser\\example-fraud-score\\fraudModel.rData')}
Note that I have not edited the above file path from installation.

Related

CrafterCMS has no site configured after initial setup

I downloaded the tar.gz for authoring with profile and social and also without profile and social.
With startup.sh http://localhost:8080/studio shows no site configured. Please configure the site you want to show or select a site on the authoring environment.
A quick look of the deployer logs show No config files found under /crafter/data/deployer/targets. No good documentation is available on this. I tried creating a yaml file after reading https://docs.craftercms.org/en/3.0/system-administrators/deployer/admin-guide.html still it doesn't change the situation.
I haven't tinkered with any configurations I only followed the quick start guide. No login page is also being displayed.
I am using version 3.1.10 and I have 8 gb of ram.
The tomcat log file has quite a lot of characters. I have attached it in gdrive
https://drive.google.com/file/d/1-t37ETNWG94qcMnrXdIfwkHRa1khhtKp/view?usp=sharing
I have also attached the deployer logs
https://drive.google.com/file/d/1A1hNvIdQeMPOVTfTDv_PtU2Xa10r-mwK/view?usp=sharing
From your logs, it seems that you're missing ncurses5:
[ERROR] 2020-11-25T12:05:36,874 [Exec Stream Pumper] [exec.ManagedProcess] | mysql_secure_installation: /home/aditya/Desktop/crafter/bin/dbms/bin/mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
That breaks the authoring database. To fix this, see the instructions for your Linux distro here:
https://docs.craftercms.org/en/3.1/system-administrators/activities/installing-and-verifying-prerequisites.html#linux-prerequisite

Azure functions not executing. Access Denied everytime

Can anyone help as I am unable to execute the azure functions and getting this error message everytime.
Indeed, this is an antivirus policy issue. One can confirm this by going to your antivirus logs. I was using Symantec.
Steps to view logs in Symantec -
Open Symantec>View Logs>Client Management>View Logs.
The logs will contain an entry with keyword "BLOCK" with the path of blocked exe (as in snapshot attached in question).
1/27/2020 4:04:05 PM User Event 10 Block [AC1-1.1] List all applications you want to block below, by clicking the Add button. - Target MD5=d028f52957a8759ccbe6845e79090898 - Target Arguments="host start --port 7071 --pause-on-error" Create Process 0 1/27/2020 4:03:04 PM 1/27/2020 4:03:04 PM Block applications from running | [AC1-1.1] Block these applications 10.202.100.23 16776 C:\Users\<username>\AppData\Local\AzureFunctionsTools\Releases\2.43.0\cli_x64\func.exe 200704 Bytes Alert
Once my security team updated the policy, the azure function ran perfectly!
Finally after two days of struggle I got the answer. The Azure core Tools emulator "func.exe" is located in AzureFunctionstools folder which is located in appdata.
Appdata folder is the place for all the applications to install their configrations and helping component like .dlls or so. And, thus Appdata is an important folder which is hidden by default.
In many case changing the visibility of appdata folder from hidden to visible resolves the problem.
I tried to execute a sample exe from inside and outside of appdata folder and the sample exe was not accessible when it was inside appdata. Same scenario happens with "func.exe", it was executing outside of appdata folder. It was a clear indication that something is restricting access. and only an antivirus would do that.
I make changes in the antivirus policy (added the path in Exception) and it started working.
Here are the screenshots for reference:
As a solution: you can perform the following:
Make the appdata visibility from hidden to visible. or,
Right click on the folder, PRoperties > Security and provide the full access rights to the user. or,
Disable the antivirus and retry, it should work. If it is then add the folder path or the application name "func.exe" as an Exception.
One more solution that I figured out today especially when the antivirus is in client mode and linked with its server for policy.
4. You need to whitelist the path in the server policy and after 5 minutes say, Update the Antivirus, restart the Visual Studio and its done.
Same error I also faced due to anti-virus but can't modify anti-virus since it can be changed by IT Security/networking team and process is time-taking & long process. Another workaround is :
Install azure-functions-core-tools via npm
npm install -g azure-functions-core-tools#3
Change Executable & Working Directory in Debug settings for azure Project settings
Working Directory : C:\<Project path>\bin\Debug\netcoreapp3.1
Executable : C:\Users\<username>\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\func.exe

Troubleshooting azure website internal error

I am getting an error message on my website:
The page cannot be displayed because an internal server error has occurred.
How do I troubleshoot this. I can't find the log file. Please help.
Some information on debugging youe node.js site on Azure websites can be found here:
http://azure.microsoft.com/en-us/documentation/articles/web-sites-nodejs-debug/
and here: http://www.hanselman.com/blog/StreamingDiagnosticsTraceLoggingFromTheAzureCommandLinePlusGlimpse.aspx
To enable application logging instead of updating the iisnode.yml file, you can also use the portal and from the Website/CONFIGURE tab you can enable application logging to file system.
Also look into: http://blog.azure.com/2014/03/28/windows-azure-websites-online-tools-you-should-know-about-2/ for an easy way to see the log files without installing any tools.

What is this vague error with 'redirection.config' while building a Web Deploy package?

I'm trying to build a Web Deploy package via msbuild on a new machine and it's not working. It builds fine on other machines, but here I get the following vague error:
...\Microsoft.Web.Publishing.targets(2767,5): error : Filename: redirection.config
...\Microsoft.Web.Publishing.targets(2767,5): error : Error: Cannot read configuration file
...\Microsoft.Web.Publishing.targets(2767,5): error :
...\Microsoft.Web.Publishing.targets(2767,5): error : Unknown error (0x80005000)
I'm not sure what 'redirection.config' is, and the line reference to the .targets file doesn't help at all.
How can I fix this?
redirection.config is a file that lives in the IIS configuration directory, typically %SystemRoot%\System32\inetsrv\config. Here are two possibilities:
The account building your project doesn't have access to the IIS config dir. This might happen if you have an automated build identity with special permissions, or you if you need to start Visual Studio as an administrator.
You don't have IIS installed at all on the new machine. Check to be sure the IIS config directory, and redirection.config in particular, even exist. If not, you'll need to install IIS.
If you receive this error when deploying with Release Managment (via IISConfig.exe) be sure that the deployment agent service account is in the local Administrators group. You may need to restart the deployment agent service.
Similar Issue resolved below - Might help
Insufficient Permissions Problems with MSDeploy and TFS Build 2010
For me, simply running visual studio as admin gave it the elevated permissions it needed to operate against this folder.
May work for others.
I got this error when I tried to use a relative path for the contentPath setting. I fixed it by settings the contentPath to the full path of the folder. Without the full path, the contentPath provider thinks it is a site path or application path and looks for it in in the IIS configuration.
This error just appeared to me when my C# project was referencing the Microsoft.Web.Administration, Version=7.9.0.0 assembly. It looks like this assembly only works with IIS Express. For IIS, we must use Microsoft.Web.Administration, Version=7.0.0.0.
After hours of testing and troubleshooting this problem turned out to be an issue with the users profile.
This was found by logging in as myself and I didn't receive the same issue.
To fix this issue:
Log into the machine as an administrator and delete the contents of the corrupt profile from C:\Users (or rename the folder to username.OLD)
Open up the registry and navigate here – HKLM\SOFTWARE\Microsoft\Windows NT\ CurrentVersion\ProfileList
Find the corrupt profile and rename this to .OLD or remove it.
You can read more about it at this article.
As this is high in search engines when looking for this error, I'll post my solution.
I used Azure Pipelines to release the app to IIS and had this error. My issue was that I mistakenly used Build Agent job instead of Deployment Group job when configuring the release pipeline.
On server 2012 this error can be caused by UAC which needs to be disabled via the registry.
This article explains why...
https://social.technet.microsoft.com/wiki/contents/articles/13953.windows-server-2012-deactivating-uac.aspx
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system
change DWORD "EnableLUA" from 1 to 0

CruiseControl.Net switch from console to service

I have set up a cruisecontrol.net build server. When running it in console mode it works fine, but when trying to run it as a windows service it doesn't work. The log file shows the following message:
ThoughtWorks.CruiseControl.Core.CruiseControlException:
Source control operation failed: No VSS database (srcsafe.ini) found.
Use the SSDIR environment variable or run netsetup.
The ssdir is set in ccnet.config, so what am I missing here?
Not sure if it's applicable but when I had problems switching between the Console version and the Service version it was down to access rights for the user I was starting the service as.
Perhaps the Service does not have access rights to the srcsafe.ini file and your account does(assuming that's what your using to run the console).
Apologies if I'm way off the mark, just trying to help!
I ran into similar issues when setting up our CI environment at work. If you can get log-in permissions for the service account you are using, you can log in as that account and run CC.NET via the console and debug your issues.

Resources