TeamCity: 2019.1.1 (build 66192)
Nuget Installer: 5.1.0
As my first build step, I have the nuget installer. I have three (3) package sources listed in my build step. Nuget, DevExpress, and our internal source manifested by teamcity itself.
When I run the build, it passes every other time.
.
When it fails it is because of the TC feed is returning a 401. The full stack trace is as follow:
[15:02:22] [restore] C:\windows\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config
[15:02:22] [restore]
[15:02:22] [restore] Feeds used:
[15:02:22] [restore] https://www.nuget.org/api/v2
[15:02:22] [restore] https://nuget.devexpress.com/ID/api
[15:02:22] [restore] https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json
[15:02:22] [restore] Errors in packages.config projects
[15:02:22] [restore] Unable to find version '2019.7.10.4' of package 'AdvancedMetrics.Core'.
[15:02:22] [restore] https://nuget.devexpress.com/ID/api: Package 'AdvancedMetrics.Core.2019.7.10.4' is not found on source 'https://nuget.devexpress.com/id/api'.
[15:02:22] [restore] https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json: Unable to load the service index for source https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json.
[15:02:22] [restore] Response status code does not indicate success: 401 ().
[15:02:22] [restore] https://www.nuget.org/api/v2: Package 'AdvancedMetrics.Core.2019.7.10.4' is not found on source 'https://www.nuget.org/api/v2'.
[15:02:22] [restore] Unable to find version '2019.7.10.4' of package 'AdvancedMetrics.Core.DAL'.
[15:02:22] [restore] https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json: Unable to load the service index for source https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json.
[15:02:22] [restore] Response status code does not indicate success: 401 ().
[15:02:22] [restore] https://nuget.devexpress.com/ID/api: Package 'AdvancedMetrics.Core.DAL.2019.7.10.4' is not found on source 'https://nuget.devexpress.com/id/api'.
[15:02:22] [restore] https://www.nuget.org/api/v2: Package 'AdvancedMetrics.Core.DAL.2019.7.10.4' is not found on source 'https://www.nuget.org/api/v2'.
[15:02:22] [restore] Unable to find version '2019.7.10.4' of package 'AdvancedMetrics.Core.BLL'.
[15:02:22] [restore] https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json: Unable to load the service index for source https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json.
[15:02:22] [restore] Response status code does not indicate success: 401 ().
[15:02:22] [restore] https://nuget.devexpress.com/ID/api: Package 'AdvancedMetrics.Core.BLL.2019.7.10.4' is not found on source 'https://nuget.devexpress.com/id/api'.
[15:02:22] [restore] https://www.nuget.org/api/v2: Package 'AdvancedMetrics.Core.BLL.2019.7.10.4' is not found on source 'https://www.nuget.org/api/v2'.
[15:02:22] [restore] Unable to find version '2019.7.10.4' of package 'AdvancedMetrics.Core.MailGun'.
[15:02:22] [restore] https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json: Unable to load the service index for source https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json.
[15:02:22] [restore] Response status code does not indicate success: 401 ().
[15:02:22] [restore] https://nuget.devexpress.com/ID/api: Package 'AdvancedMetrics.Core.MailGun.2019.7.10.4' is not found on source 'https://nuget.devexpress.com/id/api'.
[15:02:22] [restore] https://www.nuget.org/api/v2: Package 'AdvancedMetrics.Core.MailGun.2019.7.10.4' is not found on source 'https://www.nuget.org/api/v2'.
[15:02:22] [restore] Unable to find version '2019.7.10.4' of package 'AdvancedMetrics.Core.Web'.
[15:02:22] [restore] https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json: Unable to load the service index for source https://teamcity.mydomain.com/httpAuth/app/nuget/feed/ASPNet_Apps/ASP_NET_Apps/v3/index.json.
[15:02:22] [restore] Response status code does not indicate success: 401 ().
[15:02:22] [restore] https://nuget.devexpress.com/id/api: Package 'AdvancedMetrics.Core.Web.2019.7.10.4' is not found on source 'https://nuget.devexpress.com/id/api'.
[15:02:22] [restore] https://www.nuget.org/api/v2: Package 'AdvancedMetrics.Core.Web.2019.7.10.4' is not found on source 'https://www.nuget.org/api/v2'.
[15:02:22] [restore]
[15:02:22] [restore] Installed:
[15:02:22] [restore] 76 package(s) to packages.config projects
[15:02:22] [restore] Process exited with code 1
[15:02:22] [restore] Process exited with code 1 (Step: NuGet Installer)
[15:02:22] [Step 1/5] Step NuGet Installer failed
The issue here was because I had the variable added to the template. Apparently, you can't do that in TC.
I removed the variable from the template, and added it to the build step manually. It worked!
Related
I am trying to install curl via stack using stack install curl-1.3.8 -v, and I am stuck with the following error:
2019-10-06 19:01:22.673216: [info] curl> Configuring curl-1.3.8...
2019-10-06 19:01:22.910469: [warn] curl> setup: Missing dependency on a foreign library:
2019-10-06 19:01:22.910594: [warn] curl> * Missing (or bad) C library: curl
2019-10-06 19:01:22.910679: [warn] curl> This problem can usually be solved by installing the system package that
2019-10-06 19:01:22.910776: [warn] curl> provides this library (you may need the "-dev" version). If the library is
2019-10-06 19:01:22.910892: [warn] curl> already installed but in a non-standard location then you can use the flags
2019-10-06 19:01:22.910970: [warn] curl> --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
2019-10-06 19:01:22.911056: [warn] curl> library file does exist, it may contain errors that are caught by the C
2019-10-06 19:01:22.911192: [warn] curl> compiler at the preprocessing stage. In this case you can re-run configure
2019-10-06 19:01:22.911261: [warn] curl> with the verbosity flag -v3 to see the error messages.
2019-10-06 19:01:22.911335: [warn] curl>
2019-10-06 19:01:22.918187: [error]
-- While building package curl-1.3.8 using:
/tmp/stack13678/curl-1.3.8/.stack-work/dist/x86_64-linux/Cabal-
2.2.0.1/setup/setup --builddir=.stack-work/dist/x86_64-linux/Cabal-2.2.0.1
configure --user --package-db=clear --package-db=global --package-db=/home
/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b /8.4.3
/pkgdb --libdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/lib --bindir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/bin --datadir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b /8.4.3
/share --libexecdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/libexec --sysconfdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b
/8.4.3/etc --docdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b /8.4.3
/doc/curl-1.3.8 --htmldir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/doc/curl-1.3.8 --haddockdir=/home/mkultra/.stack/snapshots/x86_64-
linux/275af25936ba6904cf7ea80d2b338c41bfce558acfce69b4ef46c0a85fc0b78b/8.4.3
/doc/curl-1.3.8 --dependency=base=base-4.11.1.0
--dependency=bytestring=bytestring-0.10.8.2
--dependency=containers=containers-0.5.11.0 -fnew-base --exact-configuration
--ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Any idea how can I fix it?
Stack version: 2.1.3
Description: Ubuntu 19.04
As the error message you got says, "This problem can usually be solved by installing the system package that provides this library (you may need the "-dev" version)". In your case, you need a libcurl-dev package. Depending on your preferred TLS library, run one of sudo apt-get install libcurl4-openssl-dev, sudo apt-get install libcurl4-nss-dev, or sudo apt-get install libcurl4-gnutls-dev.
We are using SonarQube for code analysis. Our projects are developed using C# and gitlab CI build pipeline.
Command used to scan the code:
dotnet sonarscanner begin /k:xxxxxx
/d:sonar.host.url=https://sonar.xxxxx.com/ /d:sonar.login=<<login id>> /d:sonar.verbose=true /d:sonar.cs.opencover.reportsPaths="tmp/xx/testresults/coverage.opencover.xml" /d:sonar.coverage.exclusions="*Tests.cs,*Integration.cs" - .
Now job failing with below error:
10:46:41.660 ERROR: Error during SonarQube Scanner execution
10:46:41.660 ERROR: Unable to load component class org.sonar.scanner.report.ActiveRulesPublisher
10:46:41.660 ERROR: Caused by: Unable to load component interface org.sonar.api.batch.rule.ActiveRules
10:46:41.660 ERROR: Caused by: Failed to load quality profiles
10:46:41.661 ERROR: Caused by: timeout
10:46:41.661 ERROR:
Any Idea what can be wrong?
We are using Jmeter-maven-plugin and created a maven project in eclipse. My test file (MainTest.jmx) is in src/test/jmeter folder, in this test we used "include controller" to reuse test fragments. These fragments are stored in src/test/jmeter/fragments. We tried following relative path in include controller
../fragments/FragmentA.jmx
src/test/jmeter/fragments/FragmentA.jmx
Tried propertiesUser option in pom.xml
<propertiesUser>
<fragments.directory>src/test/jmeter/fragments</fragments.directory>
</propertiesUser>
Include controller failing to load .jmx file. Getting following
ERROR
o.a.j.c.IncludeController: Include Controller 'Include Controller'
can't load '${__P(fragments.directory)}/fragmentA.jmx' - see log for
details.
java.io.IOException: loadIncludedElements -failed for:
E:\Luna\ADXJmeter\target\jmeter\bin\${__P(fragments.directory)}\FragmentA.jmx and E:\Luna\ADXJmeter\target\jmeter\testFiles\${__P(fragments.directory)}\FragmentA.jmx
Complete Log
> 2017-05-24 12:14:39,442 INFO o.a.j.c.IncludeController: loadIncludedElements -- try to load included module: E:\Luna\ADXJmeter\target\jmeter\bin\FragmentA.jmx
> 2017-05-24 12:14:39,442 INFO o.a.j.c.IncludeController: loadIncludedElements -failed for: E:\Luna\ADXJmeter\target\jmeter\bin\FragmentA.jmx
> 2017-05-24 12:14:39,442 INFO o.a.j.c.IncludeController: loadIncludedElements -Attempting to read it from: E:\Luna\ADXJmeter\target\jmeter\testFiles\FragmentA.jmx
> 2017-05-24 12:14:39,442 ERROR o.a.j.c.IncludeController: Include Controller 'Include Controller' can't load 'FragmentA.jmx' - see log for details
> 2017-05-24 12:14:39,443 ERROR o.a.j.u.JMeterUtils: Including file "FragmentA.jmx" failed for Include Controller "Include Controller", unexpected error - see log for details
> 2017-05-24 12:14:39,443 WARN o.a.j.c.IncludeController: Including file "FragmentA.jmx" failed for Include Controller "Include Controller", unexpected error
> java.io.IOException: loadIncludedElements -failed for: E:\Luna\ADXJmeter\target\jmeter\bin\FragmentA.jmx and E:\Luna\ADXJmeter\target\jmeter\testFiles\FragmentA.jmx
> at org.apache.jmeter.control.IncludeController.loadIncludedElements(IncludeController.java:139) [ApacheJMeter_components-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.control.IncludeController.resolveReplacementSubTree(IncludeController.java:111) [ApacheJMeter_components-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.JMeter.runNonGui(JMeter.java:936) [ApacheJMeter_core-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.JMeter.startNonGui(JMeter.java:910) [ApacheJMeter_core-3.2.jar:3.2 r1790748]
> at org.apache.jmeter.JMeter.start(JMeter.java:538) [ApacheJMeter_core-3.2.jar:3.2 r1790748]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_121]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_121]
Have you read the documentation prior to attempting to use Include Controller this way?
This element does not support variables/functions in the filename field.
However, if the property includecontroller.prefix is defined, the contents are used to prefix the pathname.
The same chapter provides the clue: you have includecontroller.prefix property and JMeter will attempt to find the file under the path of includecontroller.prefix + Filename
So you should amend your configuration as follows:
<propertiesUser>
<includecontroller.prefix>src/test/jmeter/fragments</includecontroller.prefix>
</propertiesUser>
And use just FragmentA.jmx in the Include Controller.
Check out How to Manage Large JMeter Scripts With JMeter Test Fragments for more information on working with modular JMeter tests.
I want to download the oracle database drivers via SBT. As outlined here https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides they are password protected. In the SBT manual (http://www.scala-sbt.org/0.13/docs/Publishing.html) it is mentioned that credentials can be specified for an resolver. When applying it like:
resolvers += "oracle" at "https://maven.oracle.com"
credentials += Credentials("oracle download", "maven.oracle.com", "myEmail#gmail.com", "password")
libraryDependencies ++= Seq(
"com.oracle.jdbc" % "ojdbc8" % "12.2.0.1"
)
I still get an
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.oracle.jdbc#ojdbc8;12.2.0.1: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
What is missing in the configuration?
edit
When changing the credentials to
credentials += Credentials("maven.oracle.com", "maven.oracle.com", "E-Mail", "password")
The result is
[error] Unable to find credentials for [OAM 11g # login.oracle.com].
[warn] module not found: com.oracle.jdbc#ojdbc8;11.2.0.4
[warn] ==== local: tried
[warn] /Users/geoheil/.ivy2/local/com.oracle.jdbc/ojdbc8/11.2.0.4/ivys/ivy.xml
[warn] ==== oracle: tried
[warn] https://maven.oracle.com/com/oracle/jdbc/ojdbc8/11.2.0.4/ojdbc8-11.2.0.4.pom
[info] Resolving org.apache#apache;14 ...
[error] Unable to find credentials for [OAM 11g # login.oracle.com].
[info] Resolving jline#jline;2.12.1 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.oracle.jdbc#ojdbc8;11.2.0.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
How can I find the correct oracle realm?
Unable to find credentials for [OAM 11g # login.oracle.com]
would suggest that OAM 11g is the realm, but that still results in the same problem. Also the https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides suggested OAM 11g does not work.
For gradle, there seems to be a workaround: https://groups.google.com/forum/#!topic/gradle-dev/G8X_41lOIlU
maven {
url 'https://www.oracle.com/content/secure/maven/content'
credentials {
username 'user'
password 'password'
}
but so far I could not get any option (correct realm via SSO, workaround) to work with SBT.
edit2
The best workaround so far is Find Oracle JDBC driver in Maven repository
edit3
find a reproducible example here:
https://github.com/geoHeil/oracleJBCMavenSBT
1) I checkout your project on github
2) I run this command for find the path of my Maven installation:
mvn -version
3) I edit the ....\apache-maven-3.5.0\conf\settings.xml file with your setting
4) I run this command:
mvn clean install
5) I have the same error
6) I valid my account on Oracle official Web site
7) I edit the ....\apache-maven-3.5.0\conf\settings.xml file with my valid login/password
8) I run this command and I have a Maven BUILD SUCCESS:
mvn clean install
You need valid your Oracle account for resolve your problem.
Note:
If you use travic-ci, run this command:
mvn clean install --settings settings.xml
In your settings.xml file:
<server>
<id>maven.oracle.com</id>
<username>${OTN_USERNAME}</username>
<password>${OTN_PASSWORD}</password>
<configuration>
<basicAuthScope>
<host>ANY</host>
<port>ANY</port>
<realm>OAM 11g</realm>
</basicAuthScope>
<httpConfiguration>
<all>
<params>
<property>
<name>http.protocol.allow-circular-redirects</name>
<value>%b,true</value>
</property>
</params>
</all>
</httpConfiguration>
</configuration>
</server>
in travic-ci, add 2 environment variables (https://travis-ci.org/YOUTORGANIZATION/YOURREPOSITORY/settings) :
...
resolvers += "OAM 11g" at "https://maven.oracle.com",
credentials += Credentials("OAM 11g", "login.oracle.com", "mail", "pass"),
libraryDependencies += "com.oracle.jdbc" % "ojdbc8" % "18.3.0.0" exclude("com.oracle.jdbc", "ucp"),
...
It works.
I am trying to analyse my solution (C# .NET) using sonar. Unfortunately after plugins loading it is failing with following stacktrace:
14:53:19.646 DEBUG - Release semaphore on project : org.sonar.api.resources.Project#7f9b2bab[id=3169,key=com.exigenservices:cm,qualifier=TRK], with key batch-com.exigenservices:cm
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 2:12.629s
Final Memory: 13M/405M
ERROR: Error during Sonar runner execution
INFO: ------------------------------------------------------------------------
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: java.util.NoSuchElementException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:929)
at java.util.HashMap$ValueIterator.next(HashMap.java:954)
at org.sonar.dotnet.tools.commons.visualstudio.VisualStudioProject.getArtifactDirectory(VisualStudioProject.java:178)
at org.sonar.dotnet.tools.commons.visualstudio.VisualStudioProject.getArtifact(VisualStudioProject.java:195)
at org.sonar.dotnet.tools.commons.visualstudio.VisualStudioProject.getGeneratedAssemblies(VisualStudioProject.java:209)
at org.sonar.plugins.csharp.api.sensor.AbstractRegularCSharpSensor.assembliesFound(AbstractRegularCSharpSensor.java:101)
at org.sonar.plugins.csharp.api.sensor.AbstractRegularCSharpSensor.shouldExecuteOnProject(AbstractRegularCSharpSensor.java:81)
at org.sonar.plugins.csharp.api.sensor.AbstractRuleBasedCSharpSensor.shouldExecuteOnProject(AbstractRuleBasedCSharpSensor.java:48)
at org.sonar.batch.bootstrap.BatchExtensionDictionnary.shouldKeep(BatchExtensionDictionnary.java:62)
at org.sonar.batch.bootstrap.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:52)
at org.sonar.batch.bootstrap.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:42)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:63)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:114)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
Actually in sonar cache (.sonar) directory presented following plugins:
checkstyle
core
cpd
csharp
csharpfxcop
csharpgallio
csharpgendarme
csharpndeps
csharpsquid
csharpstylecop
dbcleaner
design
emailnotifications
findbugs
jacoco
java
l10nen
mavenbatch
pmd
squidjava
surefire
Unfortunately I have not any idea hot to fix it and where is an issue due poorness of sonar debug messages.
The Visual Studio project parser in SonarQube's .Net plugins expect to find the output files using this xpath:
"/vst:Project/vst:PropertyGroup[contains(#Condition,'" + config + "')]/vst:OutputPath"
where config is the build configuration it has determined it should use.
From what I can tell looking at the current source code and the exception stack trace you provided (which don't line up exactly), the exception is getting thrown on this line:
if (artifactDirectory == null) {
// just take the first one found...
artifactDirectory = buildConfOutputDirMap.values().iterator().next();
which implies that it couldn't find any build output for your project.
If you find that your csproj file has a different location for the OutputPath, please submit a bug report to the SonarQube user mailing list so that it can be fixed in the future.
This means that the CSPROJ file of your project is not correct and is missing some information about the artifact directory where the assembly is generated.