Azure SQL Server firewall configuration using PowerShell not working - azure-powershell

When executing New-AzSqlServerFirewallRule -ResourceGroupName $ResourceGroupName -ServerName $SqlServerName -AllowAllAzureIPs
I get this error: New-AzSqlServerFirewallRule : Could not load type 'Microsoft.Azure.CertificateCloudCredentials' from assembly 'Microsoft.Azure.Common, Version=2.0.0.0 ...
The user I'm using has Owner rights on the Subscription. I can successfully execute e.g. New-AzSqlServer. However, Get-AzSqlServerFirewallRule is also not working. Installed the latest Az.Sql 2.12.0.
When configuring via the Portal I get below error, but the configuration is accepted never the less:
Failed to overwrite firewall rules for server: weu-te-sdb-patrntest-01 and refresh the blade.
ErrorCode: undefined
ErrorMessage: Cannot read property 'toString' of undefined

Upgrading to the following PowerShell modules did the trick:
Az 5.1.0
Az.Accounts 2.2.2
Az.Sql 2.12.0
Couldn't determine why I had that error in the Portal. However the deployment of a new Azure SQL instance and using above module versions worked.

Related

Jenkins plugin Klocwork : Error occurred during build: Authentication failed

I'm running Klocwork analysis with Jenkins on a windows server 2019.
Jenkins : 2.235.1
Klocwork Analysis Plug-in : 2020.3.
when the job is executing klockwork command (kwbuildproject, kwdeploy), there is authentication error :
Authentication failed. Please run the "C:\Klocwork\Server 18.2\bin\kwauth.exe --url https://<my-URL>/" command to login.
Of course, I ran kwauth.exe, and the klockwork commands run fine from command line on server.
The problem is that when run by the plugin, the authentication fails (or no credential provided - it's not visible in log)
I tried to use explicit ltoken configuration, and it's detected by the plugin
Detected ltoken file. Setting KLOCWORK_LTOKEN to "C:\Users\<my-USER>\.klocwork\ltoken"
But still, same authentication error.
On an older Jenkins (Plugin Klocwork Analysis 1.18), the authentication works using same ltoken file.
Do I miss something in the configuration of Klocwork plugin ?
Are you running the Klocwork analysis from the command line as X user and trying to run the Jenkins Job as Y user? if yes, you should authenticate the Y user as well through kwauth. Y user should have access to perform Klocwork analysis (Roles).
Please Make sure the ltoken file can be accessed by Jenkins.

Unable create tc server instance on sts 4

Creating server from server window in sts gives me this error. I am choosing base template to create server. I also tried using cmd with admin rights, still same error.
Error Details:create command failed. String runtimes not valid version format. Expected ,,[.patch][.release]
Reason: Error creating server instance with command:
D:\Users\pivotal location..\tcserver.bat create server -v runtimes -t base --property base.runtime.user=null --java-home C:\Java\jdk1.8.0_191. Check access permission for the directory D:\Users\pivotal location.. and its files and subdirectories.
Can't share the picture didn't have reputation.
It looks like the Pivotal tc Server installation sits in a read-only location on your disc or with limited write permissions. I would recommend to install tc-Server into a directory where you have full permissions, configure that install in STS, and try again. That should help.
You will get ahead if you provide a proper tc runtime version at the -v option. E.g. if you have the tc runtime tomcat-9.0.12.A.RELEASE installed, take "9.0.12.A.RELEASE" as runtime version.
Unfortunately you will not be out of the woods by doing so. Although a server instance will be created, there will be another error message: "The specified server is not valid. The .tc-runtime-instance file is missing.". There will be a .tc-runtime-instance-file in your instance-dir, but without any content. That's the point where I am currently sticking.

VSTS Nuget restore credentials

We are using a nuget package that requires authentication and are having issues when we try to build our project via VSTS builds. We can pull up the external nuget package feed from our authenticated browser and also via Visual Studio. The project builds locally and has no issues. However, when running through VSTS builds, we receive a 401 unauthorized messed even though we believe we have set things up properly.
Setup
Image of nuget task
Image of authentication for nuget feed
Image of personal access token that is used
Build log
Part of the log that shows that the authentication is picked up and being applied:
2018-03-30T19:38:43.2917713Z Saving NuGet.config to a temporary config file.
2018-03-30T19:38:43.3113980Z Using authentication information for the following URI: https://microsoft.pkgs.visualstudio.com/_packaging/MEE.Privacy/nuget/v3/index.json
2018-03-30T19:38:43.3123672Z [command]D:\a\_tool\NuGet\4.1.0\x64\nuget.exe sources Remove -NonInteractive -Name Privacy -ConfigFile D:\a\4\Nuget\tempNuGet_5609.config
2018-03-30T19:38:45.5301476Z Package source with Name: Privacy removed successfully.
2018-03-30T19:38:45.5348241Z [command]D:\a\_tool\NuGet\4.1.0\x64\nuget.exe sources Add -NonInteractive -Name Privacy -Source https://microsoft.pkgs.visualstudio.com/_packaging/MEE.Privacy/nuget/v3/index.json -ConfigFile D:\a\4\Nuget\tempNuGet_5609.config -Username ******** -Password ********
2018-03-30T19:38:46.0254022Z Package Source with Name: Privacy added successfully.
2018-03-30T19:38:46.0295574Z [command]D:\a\_tool\NuGet\4.1.0\x64\nuget.exe restore D:\a\4\s\msc\dev\Msc.Privacy\Msc.Privacy.sln -Verbosity Detailed -NonInteractive -ConfigFile D:\a\4\Nuget\tempNuGet_5609.config
Error that we receive when trying to find nuget package:
The nuget command failed with exit code(1) and error(Errors in packages.config projects
Unable to find version '1.1.18087.3' of package 'Microsoft.PrivacyServices.CommandFeed.Client'.
C:\Users\VssAdministrator\.nuget\packages\: Package 'Microsoft.PrivacyServices.CommandFeed.Client.1.1.18087.3' is not found on source 'C:\Users\VssAdministrator\.nuget\packages\'.
D:\a\4\Nuget\..\..\_Packages: Package 'Microsoft.PrivacyServices.CommandFeed.Client.1.1.18087.3' is not found on source 'D:\a\4\Nuget\..\..\_Packages'.
https://api.nuget.org/v3/index.json: Package 'Microsoft.PrivacyServices.CommandFeed.Client.1.1.18087.3' is not found on source 'https://api.nuget.org/v3/index.json'.
https://microsoft.pkgs.visualstudio.com/_packaging/MEE.Privacy/nuget/v3/index.json: Unable to load the service index for source https://microsoft.pkgs.visualstudio.com/_packaging/MEE.Privacy/nuget/v3/index.json.
Response status code does not indicate success: 401 (Unauthorized).
Questions
Any ideas on what we could be missing?
It turns out our personal access token was not setup properly. When creating the token, we weren't choosing the correct account. To fix our issues, we created a new token using 'All accessible [Microsoft] accounts' instead of 'myuser1'.
Image of personal access token creation

Jitterbit local file import failing

I am trying setup a local json file as a source in Jitterbit. I am getting an error saying:
EnableLocalFileLocation=true
is required in the jitterbit.conf file to test the source.
This is setup however and the server has been restarted and I'm still getting the error.
The full error is :
Using local files as source/target, trigger file or success/error folders are disabled by default.
Set EnableLocalFileLocation=true in the [Settings] section of 'C:\Program Files (x86)\Jitterbit Agent\jitterbit.conf' and restart the Jitterbit Apache service to enable it.
Studio version: 8.26.1.3
Studio platform: Windows 10 - Java 1.8.0_121
Any ideas?
Thanks Martin
Sounds like the cloud agent: Just to be sure, when you are working with local files, you are working with files that are on your same server as the local agent? You are not trying to use JitterBit's cloud agent?

IBM Mobilefirst CLI 7.1.0 error with mfp start and mfp push

When I type "mfp start" in the terminal, this is what I get:
Initializing MobileFirst Console. objc[64598]: Class JavaLaunchHelper
is implemented in both
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java
(0x1075964c0) and
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib
(0x1076904e0). One of the two will be used. Which one is undefined.
Starting server worklight. Server worklight start failed. Check server
logs for details.
Error: The server failed to start. The port may be in use by another instance of a running server, or the server may not exist.
when I type "mfp push" into the terminal, this is what I get:
Preparing for push... Verifying Server Configuration...
Runtime 'DoorbellIOSNative' will be used to push the project into.
Error: JAVA_HOME environment variable must be set and pointing to a Java Development Kit (JDK). See 'mobilefirst help build'. Error: error
code: 304 Error: There was an error building the application. Error:
undefined Error: Push has failed
How do I fix these issues and errors? I have tried uninstalling and reinstalling the CLI and I also have updated my java version to the latest version. I have also typed "mfp stop" in the terminal and typed in "mfp start" again but still got the same error.
Verify you do not have an already running server or something else is listening to the same port. Another thing you might want to check is the /etc/hosts file contains the right IP address for the localhost.
Double check to make sure your JAVA_HOME is set to the JDK, not JRE. Based on your first error, it should be:
/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home