Git Product home page Git Product logo

Comments (15)

serenaponta avatar serenaponta commented on July 16, 2024

This failure should be fixed by PR #50 now merged.

Please try again and close the issue if solved.

from steady.

Sab0tag3d avatar Sab0tag3d commented on July 16, 2024

I still have an errors but now another test failed:

Results :

Failed tests: 
  BugControllerTest.testGetBug:117 Status expected:<200> but was:<500>
  BugControllerTest.testPost:155 Status expected:<200> but was:<500>
  BugControllerTest.testPostCVE20140050:187 Status expected:<200> but was:<500>
  LibraryControllerTest.testPostCommonsFileUpload:117 JSON path "$.wellknownDigest"
Expected: is <true>
     but: was null
  LibraryControllerTest.testPostJinja2:93 JSON path "$.wellknownDigest"
Expected: is <true>
     but: was null
Tests in error: 
  CveControllerTest.testPostCommonsFileUpload:71 ยป NumberFormat For input string...

Tests run: 33, Failures: 5, Errors: 1, Skipped: 0
[INFO] REST service to manage scan results and bugs ....... FAILURE [ 29.318 s]
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:34 min
[INFO] Finished at: 2018-11-15T10:38:24Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project rest-backend: There are test failures.
[ERROR] 
[ERROR] Please refer to /vulas/rest-backend/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project rest-backend: There are test failures.

Please refer to /vulas/rest-backend/target/surefire-reports for the individual test results.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to /vulas/rest-backend/target/surefire-reports for the individual test results.
    at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution (SurefireHelper.java:82)
    at org.apache.maven.plugin.surefire.SurefirePlugin.handleSummary (SurefirePlugin.java:254)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked (AbstractSurefireMojo.java:854)
    at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute (AbstractSurefireMojo.java:722)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :rest-backend
Cleaning old archives
rm: can't remove '/exporter/**/*.?ar': No such file or directory
Copying new archives
cp: can't stat 'rest-backend/target/*.?ar': No such file or directory

from steady.

Naramsim avatar Naramsim commented on July 16, 2024

Hi, A test that requires network connectivity is failing. I see that a server responds with a 500 instead of a 200.

Until we understand which server does block you, could you try to skip tests that rely on network? By using this Maven flag -DexcludedGroups="com.sap.psr.vulas.shared.categories.RequiresNetwork"

docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.RequiresNetwork vulas-build-img

from steady.

Sab0tag3d avatar Sab0tag3d commented on July 16, 2024

I have ran docker with this flags before and got this errors:

sudo docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.Slow vulas-build-img

But you sent me new command:

docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.RequiresNetwork vulas-build-img

And it also crashed:

[ERROR] Failures: 
[ERROR]   WarAnalyzerTest.testInstrument:64
[INFO] 
[ERROR] Tests run: 53, Failures: 1, Errors: 0, Skipped: 4
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Vulas 3.0.11-SNAPSHOT:
[INFO] 
[INFO] Vulas .............................................. SUCCESS [ 12.858 s]
[INFO] Shared classes ..................................... SUCCESS [ 19.501 s]
[INFO] Framework and base classes for language analysis ... SUCCESS [ 11.830 s]
[INFO] Java - Init ........................................ SUCCESS [  0.092 s]
[INFO] Java - Core classes for Java analysis .............. FAILURE [ 24.142 s]
[INFO] Java - Core classes and SPI for Java reachability analysis SKIPPED
[INFO] Java - Wala call graph constructor service ......... SKIPPED
[INFO] Python - Core classes for Python analysis .......... SKIPPED
[INFO] Interface for Git and SVN repos .................... SKIPPED
[INFO] Analysis of security patches ....................... SKIPPED
[INFO] Analysis of libraries in regards to security patches SKIPPED
[INFO] Command Line Interface ............................. SKIPPED
[INFO] Plugin for Maven ................................... SKIPPED
[INFO] Frontend for analysis results ...................... SKIPPED
[INFO] Frontend for bug administration .................... SKIPPED
[INFO] Frontend for patch analyzer ........................ SKIPPED
[INFO] REST service to analyze and compare libraries (init) SKIPPED
[INFO] REST service to analyze and compare libraries ...... SKIPPED
[INFO] REST service to manage scan results and bugs ....... SKIPPED

from steady.

serenaponta avatar serenaponta commented on July 16, 2024

Hello,

most of the tests failing when executing
sudo docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.Slow vulas-build-img

involve network connection. In particular, these are the endpoints used:

http://search.maven.org/solrsearch/select?q=1:<SHA1>&rows=20&wt=json
https://pypi.python.org/pypi/<name>/<version>/json
http://www.cvedetails.com/cve-details.php?t=1&cve_id=CVE-2014-0050

  1. Can you check whether they are reachable from the system where docker is running?
  2. Could you run again
    sudo docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.Slow vulas-build-img
    and attached the complete console output to the issue?
  3. Could you run again
    docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.RequiresNetwork vulas-build-img
    and attached the complete console output to the issue?

from steady.

Sab0tag3d avatar Sab0tag3d commented on July 16, 2024

Maven's site returns stack trace and 500 error when you added " in the end of url:
http://search.maven.org/solrsearch/select?q=1:&rows=20&wt=json%22
But all sites are avaliable.

I've attached output of commands:

sudo docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.Slow vulas-build-img >> 1.txt

1.txt

sudo docker run -it --rm -v ${PWD}/docker:/exporter --env-file ./docker/.env -e mvn_flags=-DexcludedGroups=com.sap.psr.vulas.shared.categories.RequiresNetwork vulas-build-img >> 2.txt

2.txt

from steady.

serenaponta avatar serenaponta commented on July 16, 2024

The issue is currently not reproducible from our side.

Could you also share the .env configuration file you are using (obfuscating sensitive information-if any)?

from steady.

serenaponta avatar serenaponta commented on July 16, 2024

We were able to reproduce the issue commenting out the proxy configurations in .env. In case you do not need any proxy, still the properties needs to stay as follows

# Proxy
HTTP_PROXY_HOST=
HTTPS_PROXY_HOST=
HTTP_PROXY_PORT=
HTTPS_PROXY_PORT=
NON_PROXY_HOSTS=

# Proxy (you should not need to modify this)
http_proxy=
https_proxy=
no_proxy=

We will improve the proxy handling to cover such case.

Thanks for reporting the issue!

from steady.

Sab0tag3d avatar Sab0tag3d commented on July 16, 2024

It is strange, I have the same .env file but it fails

VULAS_RELEASE=3.0.11-SNAPSHOT
VULAS_ENV=prod

# PostgreSQL
POSTGRES_USER=
POSTGRES_PASSWORD=

# Jira (optional)
JIRA_USER=
JIRA_PASSWORD=

# Proxy
HTTP_PROXY_HOST=
HTTPS_PROXY_HOST=
HTTP_PROXY_PORT=
HTTPS_PROXY_PORT=
NON_PROXY_HOSTS=
http_proxy=
https_proxy=
no_proxy=

# Spring (should be equal to the values in PostgreSQL section)
spring.datasource.username=
spring.datasource.password=

from steady.

serenaponta avatar serenaponta commented on July 16, 2024

The fields

# PostgreSQL
POSTGRES_USER=
POSTGRES_PASSWORD=

# Spring (should be equal to the values in PostgreSQL section)
spring.datasource.username=
spring.datasource.password=

must always be provided (with matching values), e.g.,

# PostgreSQL
POSTGRES_USER=abc
POSTGRES_PASSWORD=abcd

# Spring (should be equal to the values in PostgreSQL section)
spring.datasource.username=abc
spring.datasource.password=abcd

from steady.

Sab0tag3d avatar Sab0tag3d commented on July 16, 2024

I've changed this configuration but it wasn't help.

from steady.

copernico avatar copernico commented on July 16, 2024

@Sab0tag3d Could you check if the fix we just merged addresses you problem?

from steady.

serenaponta avatar serenaponta commented on July 16, 2024

The build is still failing, we are currenty working on it.

from steady.

Sab0tag3d avatar Sab0tag3d commented on July 16, 2024

This issue fixed, thanks.
But now I have problems with rest backend, It wont's start.
http://localhost:8033/backend return 503

and in haproxy I see:
Layer4 connection problem: Connection refused

Do you have any ideas how I can fix that?

from steady.

serenaponta avatar serenaponta commented on July 16, 2024

With 5224c31 we fixed the build error and the "connection refused" issue you reported. In our test the setup of the docker images with any postgres user and no proxy settings is now successfull (Note that the backend takes >20sec to start).

Thank you for reporting all the issues you encountered and helping us improving the vulnerability assessment tool!

from steady.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.