Jenkins Cannot import the following key file - jenkins

I am able to build my application on Visual Studio without any problem. I am trying Jenkins out on the same machine. When I try to build my application from my git remote repository (It contains the .pfx file in the SVC) I get the error
error MSB3325: Cannot import the following key file: Key.pfx. The key
file may be password protected. To correct this, try to import the
certificate again or manually install the certificate to the Strong
Name CSP with the following key container name: VS_KEY...
error MSB3321: Importing key file "Key.pfx" was canceled.
I had already run the command shown on the answer of this question Cannot import the keyfile 'blah.pfx' - error 'The keyfile may be password protected' and that is the reason my application runs in Visual Studio (I've done it through the command prompt as administrator fyi), which means when I try running it again the object already exists and if I uninstall and reinstall the same problem happens again.
Anyone has any ideas of how I can solve this problem?

Its the IIDentity (the windows account/identity) that is running Jenkins, most likely.
As a quick test, edit the Jenkins service and put in your credentials.
..
If that works, either keep it that way, or do your manual import voodoo using the identity that you want Jenkins to run under.

Related

plasticSCM upgrade - Client.conf root element is missing

I updated PlasticSCM to the latest version (8.0.16). Now when I start plastic I get that error: the client configuration file "client.conf" contains error: Root element is missing.
Everything worked correctly before updating. I tried reinstalling PlasticSCM and remove client.conf file but it did not help the client still does not start.
The Plastic SCM client.conf file is used by both the GUI and the CLI to store the main user preferences.
I tried reinstalling PlasticSCM and remove client.conf file but it did
not help the client still does not start.
It's ok to remove it, but additionally, you need to reconfigure the Plastic SCM Client. Please run the following command to do it.
plastic --configure
or run the "Client configuration wizard".
If you keep facing the problem I recommend you to open a support ticket -> https://www.plasticscm.com/support. The team will help you to fix the problem.

How to install WebLogic AdminServer and NodeManager as windows service?

I am trying to install Weblogic adminserver as windows service but getting "Input too long" error while executing the install script.
I have struggled a lot in this issue and finally got the way to register AdminServer and Nodemanager as windows service for Weblogic. Below are the steps and issues faced with the progress:
To register weblogic AdminServer as windows server first need to create a script which will contain values like oracle home, java home etc. Below is the script I have used to install the service:
`
echo off
SETLOCAL
set MW_HOME=C:\Oracle\Middleware\Oracle_Home
set DOMAIN_NAME=osb_domain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain
set SERVER_NAME=AdminServer
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver
set PRODUCTION_MODE=true
set JAVA_OPTIONS=-Dweblogic.Stdout="%USERDOMAIN_HOME%\stdout.txt" -Dweblogic.Stderr="%USERDOMAIN_HOME%\stderr.txt"
set WLS_USER=weblogic
set WLS_PW=Password123
set MEM_ARGS=-Xms1024m -Xmx1024m
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain\bin\setDomainEnv.cmd"
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL
`
By running this script I was not even able to install the windows service as it was throwing " Input is too long" error and the reason is windows char limitations. You might get confused by classpath and will try to resolve classpath but
the issue is with JAVA_OPTIONS values which is set by SetDomainEnv.txt is creating this issue.
I have modified the script like below and shorten the JAVA_OPTIONS values by calling SetDomainEnv.txt command just before setting JAVA_OPTIONS in the script.
This has overridden the lengthy value of JAVA_OPTIONS. Now I have succesfully installed the AdminServer as windows service.
`
echo off
SETLOCAL
set MW_HOME=C:\Oracle\Middleware\Oracle_Home
set DOMAIN_NAME=osb_domain
set USERDOMAIN_HOME=C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain
set SERVER_NAME=AdminServer
set WL_HOME=C:\Oracle\Middleware\Oracle_Home\wlserver
set PRODUCTION_MODE=true
call "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\osb_domain\bin\setDomainEnv.cmd"
set JAVA_OPTIONS=-Dweblogic.Stdout="%USERDOMAIN_HOME%\stdout.txt" -Dweblogic.Stderr="%USERDOMAIN_HOME%\stderr.txt"
set WLS_USER=weblogic
set WLS_PW=Password123
set MEM_ARGS=-Xms1024m -Xmx1024m
call "C:\Oracle\Middleware\Oracle_Home\wlserver\server\bin\installSvc.cmd"
ENDLOCAL `
Even the service is successfully installed, when I was starting it the service is stopped immediately and wasn't printing any logs as it was not connecting to AdminServer.
After a bit analysis I found that JAVA_OPTIONS values which I have overridden in my script is very much needed to invoke AdminServer.
I have run SetDomainEnv.txt in cmd prompt and copied thre JAVA_OPTIONS values.
As the service is already installed, I just copied the correct JAVA_OPTIONS values CMDLINE param in the windows service registry manually.
Server subsystem failed. Reason: A MultiException has 6 exceptions.
Server installed as Windows NT service with incorrect password for user weblogic. The password may have been changed since the server was installed as a Windows NT Service. Contact the Windows NT system administrator.
Note: No extra spaces or character is inserted in CMDLINE param.
Now everything is in place which is actually required to start the admin server. But when I start the service it is throwing some authentication error along with others in the adminserver.log file.
after a lot of analysis I found that is is not authentoication issue, the problem was with boot.properties file. boot. properties file was not read properly.
This answer is continuation of below one:
after a lot of analysis I found that is is not authentoication issue, the problem was with boot.properties file. boot. properties file was not read properly.
Now I would give some background- If the fusion middleware is installed as development mode the boot.properties files is created automatically inside Oracle_HOME\user_projects\domains\domainname\servers\AdminServer\security and if you look at this prop file you will find the password and username in encrypted mode.
If the fusion Middleware is installed as production Mode then everytime it will ask for password and username. to avoid this perform below steps:
manually create file under Oracle_HOME\user_projects\domains\domainname\servers\AdminServer\security\boot.properties like mention below:
username=weblogic
password=Password
Note: No spaces should be added and take care of file extension.
Now start weblogic from domain\bin\startWeblogic.cmd. This will encrypt you boot.properties file. check boot.proprties file if encrypted you are good to go.
Finally start the windows service whic is installed following above process. It should work fine.
=======================
About Node manager use installNodeMgrSvc from domain\bin. Again if you get input is too long error, you must shorten JAVA_OPTIONS and then carefully edit CMDLINE param in the windows registry.

What to do after installing Update 1 to TFS 2015 fails

I've installed update 1 to our TFS 2015 and I'm forced to run the configuration wizard again, but I don't know which option is correct. I tried all of them but neither seems to work. Is there a tfsconfig command which allows me to do it via powershell?
Update: When trying to run the configuration wizard I receive the following error message
TF254043: The readiness checks could not start. For more information, see the following log file
Invalid URI: The hostname could not be parsed
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at Microsoft.TeamFoundation.Admin.WebBindingInfo.AsUri()
at Microsoft.TeamFoundation.Admin.ApplicationTierPlan.GenerateConfigurationPlan(TargetEnvironment env, ActivityInputs inputs, ActivityContext context)
at Microsoft.TeamFoundation.Admin.Engine.AdminActivity.GeneratePlans()
at Microsoft.TeamFoundation.Admin.Console.Models.BaseWizardViewModel.StartVerification()
I've created a case with the microsoft support and they're working on it.
If I remember right, there should be an upgrade option in the config wizard which you should be choosing.
I've got the following answer from microsoft which can be found here
In TFS 2015 you had an SSL binding with host name set to *. This is a valid binding, but unfortunately TFS does not handle this value correctly.
To workaround the issue, you can replace
<_x003C_Host_x003E_k__BackingField>*
with
<_x003C_Host_x003E_k__BackingField>
In the C:\ProgramData\Microsoft\Team Foundation\Configuration\SavedSettings\ApplicationTier\ApplicationTierSettings.xml.
After changing the given config value the upgrade wizard ran through without any issues and I could manually set the SSL binding to *.

MSBuild cant find resgen.exe

I have a VM machine where I copied over the SDK files and path, went to the registry and added the keys to the registry, but I keep getting the error that resgen.exe cannot be found:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1835,9):
error MSB3091: Task failed because "resgen.exe" was not found, or the correct
Microsoft Windows SDK is not installed. The task is looking for "resgen.exe"
in the"bin" subdirectory beneath the location specified in the Installation Folder
value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\
Windows\v7.0A. You may be able to solve the problem by doing one of the following:
1) Install the Microsoft Windows SDK.
2) Install Visual Studio 2010.
3) Manually set the above registry key to the correct location.
4) Pass the correct location into the "ToolPath" parameter of the task.
I looked in the folder Microsoft\Microsoft SDKs\Windows\v7.0A and copied over the resgen.exe in practically every single net folder including the bin, but it keeps telling me that resgen.exe cannot be found. I have no clue what to do.
Make sure your environment variable path includes the folder in which ResGen.exe resides
Run Regedit to edit your registry. Look for the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows. If there is not already a Setting called "CurrentVersion", create a new registry setting "CurrentVersion" of type REG_SZ. Make sure it has the same value as the setting ProductionVersion in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A.
Make sure, you have the keys HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools-x86 and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFX40Tools-x64 present in your registry and the value InstallationFolder set in each of them.
I added the following SdkToolPath parameter to the project and that helped. Of course it is not a full solution as it will not work on the buildserver, but for now it works and I just don't check it in from my machine and it means I can do what I need to:
<GenerateResource SdkToolsPath="C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools" Sources="#(TextResource)" OutputResources="#(TextResource->'$(OutDir)CommandStrings.resources')" />

MS Deploy & IIS6 - 401 Unauthorised Error

I'm trying to get TFS to automatically publish (not package at the moment) my web app on a build to a Win2k3 server with IIS6. The remote agent service is started.
The build fails giving me a 401. I'm now trying to manually run a cmd line from the build server itself (just incase the MSBUILD was doing something strange with the params set on the build definition) and it's giving me the same thing. Here is the command I'm trying to run:
msdeploy.exe
-source:contentPath='C:\Builds\1\Test\DummyTFSWebApp Submission Build\Binaries\_PublishedWebsites\DummyTFSWebApp'
-dest:contentPath='Default Web Site',
computerName='http://ipm-vm-dev/MSDEPLOYAGENTSERVICE',
userName='Domain\AdminUser',
password='Password',
authType='basic',
includeAcls='False'
-verb:sync -allowuntrusted
But like the build report, it's giving me:
I can't understand why! The username & password provided is an Administrator on the destination machine. I've even made the build server machine and admin (clutching at straws), and I've made the destination folder a share for everyone with write permission.
Help appreciated as this is really frustrating me!
I changed the authType='NTLM' and it now works!
/p:AuthType=NTLM

Resources