serenity-bdd / serenity-demos

64 stars 170 forks source link

Connection reset error when resolving maven dependencies via jenkins #57

Closed Tanvitha closed 3 years ago

Tanvitha commented 3 years ago

Hi, I am getting below error when running my tests from Jenkins. error

but when I run one test which passes, I am getting the serenity report, but when there are test failures, I am getting above error and below is the pom file used pom.txt Please help me with this issue, I am stuck with this from many days.

Any help is appreciated, Thanks.

wakaleo commented 3 years ago

These examples are pretty old. Bintray no longer exists, so remove the references to bintray from the pom.xml files.

Tanvitha commented 3 years ago

I removed Bintray references, but still seeing the same issue image and attached is the updated pom file pom.txt

wakaleo commented 3 years ago

"Could not transfer artifAct...from/to central". Looks like you cannot access maven central from your machine. You may need to configure a proxy (https://maven.apache.org/settings.html#Proxies)

Tanvitha commented 3 years ago

Okay, But when there is a test pass, I am able to see the report, that time I don't see this issue, not sure, how it works at that time.?

Tanvitha commented 3 years ago

Can You please provide me a pom file with all the necessary details which will pass when run through jenkins. i am thinking, i am missing in some dependencies.

wakaleo commented 3 years ago

https://github.com/serenity-bdd/serenity-junit-starter

Tanvitha commented 3 years ago

Thanks for such a quick reply. And i followed the same and my pom looks same as this now. but still i am seeing the "Connection reset" issue

wakaleo commented 3 years ago

The error you describe is not related to the project or pom - it's related to your overall Maven configuration.

Tanvitha commented 3 years ago

Thanks it's related to your overall Maven configuration - Can you please elaborate here, if possible Since it is working fine in local, not sure what configuration I am missing.

wakaleo commented 3 years ago

Your Jenkins server cannot connect to the Maven central repository to download the artifacts it needs. You may need to configure the maven proxy, or maybe the network configuration of the jenkins server needs changing.

Tanvitha commented 3 years ago

Thanks, but one question is still there, how it works when the test case passes, or when run with only 2 or 3 test cases?, that time I don't see any issue, the build will be success, and i will get report also. image This is for success case, the dependency issue on maven.core jar: 3.6.3, which i am getting in above case is not there here, as i ran one single test case here

wakaleo commented 3 years ago

I don't know, it looks like some sort of environment specific issue unrelated to your tests or Pom file.

Tanvitha commented 3 years ago

Issue got resolved. I added below dependency

    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>3.5.0</version>
    </dependency>

and even in bulk testcases run, I am able to get the report and in this case I used serenity version: 2.2.8