Talend Job in Cloud gets Illegal Character Error, but not in studio - talend

Description of Problem
I run a job on my local Talend Studio and it works.When I publish it to Cloud and run it on a remote engine; I get an illegal character error.
Note: The Windows Remote server is running on the same machine the Remote Engine is running. They resolve to the same resource.
What I tried
One other job runs on the remote engine being used (STG)
The remote engine and Talend Studio are the same machines for STG
I tried moving the concatenation to a tSetGlobal var and that did not work - same error
I also tried using java.net.URLEncoder.encode() but got a different error that the URL was not absolute
Error produced in the cloud
"Illegal character in scheme name"
Configuration of Componenet in Error
Console from Talend Studio with Job working

I found the problem.
My challenge was that everything worked in my local Talend Studio.
But not when executed via Cloud on the RemoteEngine.
AND the remote engine was configured on the same machine as my Talend Studio.
The problem was...
I had quoted my context variable values.
Thinking they were the same as when setting variables in tSetGlobalVar and the likes.
THIS IS INCORRECT.
Context variables must not be quoted in local Talend Studio or in Cloud.
Removing the double quotes resolved my problem.
Again though, it was odd it even worked at all in the first place.

Related

Build Visual Studio project fails - The cloud operation was unsuccessful

I'm using two laptops and stored my C# code in OneDrive.
I am aware that sharing code via OneDrive is not be the best approach, but that's what I'm dealing with now.
I noticed that on laptop 1 I have to define the following path to the data file (mdf):
C:\Users\ Diet\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
On laptop 2, the path is different because the user I'm logged in with has a different name (or at least that's what I believe is the cause)
C:\Users\ Dieter\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
Updating this in the Web.config fixed the connection to the database, BUT building the solution still returns an error, also related to a cloud operation, hence why I think it is caused by the path in OneDrive...
The error message:
CSC : error CS0041: Unexpected error writing debug information -- 'The cloud operation was unsuccessful.
I welcome your insights. Thank you for helping me out.
I have my projects stored in OneDrive and had this same issue. The fix was to set the entire Project folder contents to "Always keep on this device".
Seems that building the solution in VS was attempting to write to files that were not cached locally from OneDrive. As soon as I changed the setting, the build worked!
I was also storing my project on OneDrive, got the same error after installing a new ssd.
Rebuilding the solution was enough for me.

Angular Live Development Server api requests not found

really confused about this and don't know where to start.
Basically i have generated a new angular project with the "dotnet new angular" command.
Im using a fresh machine, node, npm etc etc are all up to date.
My issue is this template just does not work out of the box. When i run the application, all of the frontend will load however, any requests to the api's etc will 404 stating that it cannot find the url.
Message in Chrome console: "Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment..."
My application runs on a different port everytime I execute the "dotnet run" command. Is this supposed to be the case ? Whichever port is generated, this will be the problematic one.
I have to manually change to port 5001 for anything to function correctly (although this comes with annoying security prompts.)
I am using visual studio code for this project. The funny thing is, if i run this project via visual studio (not code) i get a consistent static port number that will function as intended (this also comes with annoying security prompts) so i have to assume its this random port number that vscode is generating ?
Im honestly not to familiar with this so I could be way off admittedly. Any help or advice would be appreaciated. I'd post code snippets if I knew where to start.
PS, I know that I can of course just not run it with VSCode and just stick to Visual Studio. I'd rather understand the issue than ignore it though.
Thanks, in advance.

Visual Studio Online / Azure stopping and starting web applications using Powershell

I'm using Visual Studio Online's build tools to deploy web applications from a single solution. I've occasionally been running into file locking issues.
Error: Web Deploy cannot modify the file 'Microsoft.CodeAnalysis.CSharp.dll' on the destination because it is locked by an external process.
After some Googling, I believe the "fix" is to stop the web applications before deployment on Azure and start it back up after. Sounds legit.
However, there does not seem to be a straight forward way to do this directly on VSO's build definitions. I've created an "Azure Powershell" build task, but it wants a PS1 file from the repository. It doesn't seem to let me just run Azure Powershell commands (e.g. Stop-AzureWebsite) from here. My team has created a work-around where we have a "run.ps1" that just executes the command you pass as a parameter, but none of us are satisfied by that.
What are we missing? There has got to be an easier way to do this without having a PS1 script checked into source control.
I solved this by installing Azure App Services - Start and Stop extension from Visual Studio Marketplace.
When installed, it will allow you to wrap the Deploy Website to Azure task in your Release definition with Azure AppServices Stop and Azure AppServices Start tasks, effectively eliminating the lock issues.
Check if you are using "/" on the "Web Deploy Package" path for folder separators instead of "\".
i.e. change
$(System.DefaultWorkingDirectory)/My Project/drop/MyFolder/MyFile.zip
for
$(System.DefaultWorkingDirectory)\My Project\drop\MyFolder\MyFile.zip
I noticed that was the only difference between the one I was getting the error and the others (the Restart step I added was not helping). Once I modified the path, I got it working.
Sounds crappy, but fixed my issue.
Did you use the Build Deployment Template that sets the correct msbuild parameters for you for your package? You can see how here. I would create a build using that template and see if you have the same issues. If so ping me on Twitter #DonovanBrown and I will see if I can figure what is going on.
As a rule it is good practice to have any scripts or commands required to deploy your software to be checked into source control as part of your build. They can then be easily run repeatedly with little configuration at the build level. This provides consistency and transparency.
Even better is to have deployment scripts output as part of the build and use a Release Management tool to control the actual deployment.
Regardless having configuration as code is a mantra that all Dev and Ops teams should live by.

Script error while using deploy.ps1 to deploy virtocommerce project

I'm using the official virtocommerce azure deploy script under folder "virtocommerce\src\Extensions\Setup\VirtoCommerce.PowerShell" to deploy virtocommerce(with azure tool v2.4), i encounted some problems while running "deploy.ps1" script in windows azure powershell
In "azure-db.ps1", there's lot of syntax like "Get-Date –f" , the dash character is wrong ,"–" must be "-", otherwise you will get error.
In "azure-deploy.ps1", there's a function "build-search" which use cspack.exe to create "ElasticSearch.cspkg",that's correct, but for other packages such as "CommerceSite.cspkg" and "AzureScheduler.cspkg", i did not found any functions to create those packages, this will lead to an error says "CommerceSite.cspkg" can not be found.
Does anybody has the same problems?
Turn out that there's some problem inside code:
"deploy.ps1" script is using deploy-tfs.ps1 , and use parameter "$build".
parameter "$build" has been reset to 'False' in "deploy-tfs.ps1"
"azure-deploy.ps1" using "$build" to decide if it's need to build the azure package, and this parameter is always 'False', so the azure package will never be creat.
The script is designed to run on azure sdk 2.4, not 2.5. The script is used to deploy daily both demo and testing environments and were completed succesfully today. You can see the status here: https://virtocommerce.codeplex.com.
As for cspkg, it is generated during actual build, by msbuild. The elastic search ccspkg has to be created differently, as it has to include javaruntime in addition to elasticsearch runtime and packaged into a single setup.
The new, 1.13 version of Virto Commerce by default deploys azure website instead of azure cloud service for website and scheduler (deployed as a web job). Only elastic search is deployed as a cloud service. The setting can be changed in deploy.ps1.
Also make sure to check the complete instructions on how to deploy source code to azure at http://docs.virtocommerce.com/display/vc1devguide/Source+Code+Azure+Deployment.

VSDBCMD Won't Start - Sql100DatabaseSchemaProvider can not be instantiated

I've followed the instructions over at http://msdn.microsoft.com/en-us/library/dd193258(v=vs.100).aspx
I've copied the deploy folder and the other dll's over to the remote machine and installed SQL Server 2008 Management Objects. However, when I attempt to run my command (real credentials stripped)
vsdbcmd /a:Import /cs:"Data Source=mydb;Integrated Security=false;Pooling=False;Initial Catalog=dbname;User ID=sa;Password=password;" /model:today.dbschema
I always get the error
The extension type Microsoft.Data.Schema.Sql.Sql100DatabaseSchemaProvider could not be instantiated.
I've searched around, but don't see anything that points to this. Any help please?
I found the issue - the server had .NET 4.0 Client Profile installed. Once I installed the full runtime, this issue went away.