question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

netty-all 4.1.64 has a broken dependency graph

See original GitHub issue

Expected behavior

When maven compile (or install) runs on a maven project using both dependencies below, it should not generate errors with dependencies cannot be resolved.

Actual behavior

It generates errors such as:

ERROR] Failed to execute goal on project testNetty64: Could not resolve dependencies for project org.example:testNetty64:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: io.netty:netty- tcnative:jar:${os.detected.classifier}:2.0.39.Final, io.netty:netty-transport-native- epoll:jar:${os.detected.name}-${os.detected.arch}:4.1.64.Final: Could not find artifact io.netty:netty- tcnative:jar:${os.detected.classifier}:2.0.39.Final in MavenCentral (https://repo.maven.apache.org/maven2) -> [Help 1]

Steps to reproduce

Simple pom.xml as below:

  <?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>testNetty64</artifactId>
    <version>1.0-SNAPSHOT</version>
  
    <properties>
      <maven.compiler.source>8</maven.compiler.source>
      <maven.compiler.target>8</maven.compiler.target>
    </properties>
  
    <dependencies>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>4.1.64.Final</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-tcnative</artifactId>
        <version>2.0.39.Final</version>
      </dependency>
    </dependencies>
  </project>

maven clean compile

Netty version

Replacing 4.1.64-Final by 4.1.63-Final runs fine.

With 4.1.64-Final: mvn clean compile -U

  [INFO] ----------------------< org.example:testNetty64 >-----------------------
  [INFO] Building testNetty64 1.0-SNAPSHOT
  [INFO] --------------------------------[ jar ]---------------------------------
  Downloading from MavenCentral: https://repo.maven.apache.org/maven2/io/netty/netty-transport-native-epoll/4.1.64.Final/netty-transport-native-epoll-4.1.64.Final-$%7Bos.detected.name%7D-$%7Bos.detected.arch%7D.jar
  Downloading from MavenCentral: https://repo.maven.apache.org/maven2/io/netty/netty-tcnative/2.0.39.Final/netty-tcnative-2.0.39.Final-$%7Bos.detected.classifier%7D.jar
  Downloading from central: https://repo.maven.apache.org/maven2/io/netty/netty-tcnative/2.0.39.Final/netty-tcnative-2.0.39.Final-$%7Bos.detected.classifier%7D.jar
  Downloading from central: https://repo.maven.apache.org/maven2/io/netty/netty-transport-native-epoll/4.1.64.Final/netty-transport-native-epoll-4.1.64.Final-$%7Bos.detected.name%7D-$%7Bos.detected.arch%7D.jar
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  1.478 s
  [INFO] Finished at: 2021-05-18T09:35:23+02:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal on project testNetty64: Could not resolve dependencies for project org.example:testNetty64:jar:1.0-SNAPSHOT: 
  [The following artifacts could not be resolved: io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.39.Final, io.netty:netty-transport-native-epoll:jar:${os.detected.name}-${os.detected.arch}:4.1.64.Final: 
  [Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.39.Final in MavenCentral (https://repo.maven.apache.org/maven2) -> [Help 1]

In DEBUG mode, I’ve got the following possibly useful elements: mvn clean compile -e -X -U

  Apache Maven 3.6.3
  Maven home: /usr/share/maven
  Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
  Default locale: fr_FR, platform encoding: UTF-8
  OS name: "linux", version: "5.4.0-73-generic", arch: "amd64", family: "unix"
  ...
  [DEBUG] =======================================================================
  [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=974120, ConflictMarker.markTime=382215, 
  ConflictMarker.nodeCount=158, ConflictIdSorter.graphTime=782831, ConflictIdSorter.topsortTime=386305, 
  ConflictIdSorter.conflictIdCount=44, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=7735894, 
  ConflictResolver.conflictItemCount=157, DefaultDependencyCollector.collectTime=208052123, 
  DefaultDependencyCollector.transformTime=11590815}
  [DEBUG] org.example:testNetty64:jar:1.0-SNAPSHOT
  [DEBUG]    io.netty:netty-all:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-buffer:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-dns:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-haproxy:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-http:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-http2:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-memcache:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-mqtt:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-redis:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-smtp:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-socks:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-stomp:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-codec-xml:jar:4.1.64.Final:compile
  [DEBUG]          com.fasterxml:aalto-xml:jar:1.0.0:compile
  [DEBUG]             org.codehaus.woodstox:stax2-api:jar:4.0.0:compile
  [DEBUG]       io.netty:netty-common:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-handler:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-handler-proxy:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-resolver:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-resolver-dns:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-transport:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-transport-rxtx:jar:4.1.64.Final:compile
  [DEBUG]          org.rxtx:rxtx:jar:2.1.7:compile
  [DEBUG]       io.netty:netty-transport-sctp:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-transport-udt:jar:4.1.64.Final:compile
  [DEBUG]          com.barchart.udt:barchart-udt-bundle:jar:2.3.0:compile
  [DEBUG]       io.netty:netty-example:jar:4.1.64.Final:compile
  [DEBUG]          com.google.protobuf:protobuf-java:jar:2.6.1:compile
  [DEBUG]          io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.39.Final:compile
  [DEBUG]          org.conscrypt:conscrypt-openjdk-uber:jar:2.5.2:compile
  [DEBUG]          com.jcraft:jzlib:jar:1.1.3:runtime
  [DEBUG]          com.yammer.metrics:metrics-core:jar:2.2.0:compile
  [DEBUG]             org.slf4j:slf4j-api:jar:1.7.2:compile
  [DEBUG]          ch.qos.logback:logback-classic:jar:1.1.7:runtime
  [DEBUG]             ch.qos.logback:logback-core:jar:1.1.7:runtime
  [DEBUG]          org.bouncycastle:bcpkix-jdk15on:jar:1.68:compile
  [DEBUG]          org.bouncycastle:bcprov-jdk15on:jar:1.68:compile
  [DEBUG]          com.sun.activation:javax.activation:jar:1.2.0:compile
  [DEBUG]       io.netty:netty-transport-native-epoll:jar:${os.detected.name}-${os.detected.arch}:4.1.64.Final:compile
  [DEBUG]          io.netty:netty-transport-native-unix-common:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-transport-native-kqueue:jar:4.1.64.Final:compile
  [DEBUG]       io.netty:netty-resolver-dns-native-macos:jar:4.1.64.Final:compile
  [DEBUG]    io.netty:netty-tcnative:jar:2.0.39.Final:compile
  [DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
  [DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
  [[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
  [[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
  [Downloading from MavenCentral: https://repo.maven.apache.org/maven2/io/netty/netty-tcnative/2.0.39.Final/netty-tcnative-2.0.39.Final-$%7Bos.detected.classifier%7D.jar
  [Downloading from MavenCentral: https://repo.maven.apache.org/maven2/io/netty/netty-transport-native-epoll/4.1.64.Final/netty-transport-native-epoll-4.1.64.Final-$%7Bos.detected.name%7D-$%7Bos.detected.arch%7D.jar
  [[DEBUG] Writing tracking file /home/frederic/.m2/repository/io/netty/netty-tcnative/2.0.39.Final/netty-tcnative-2.0.39.Final-${os.detected.classifier}.jar.lastUpdated
  [[DEBUG] Writing tracking file /home/frederic/.m2/repository/io/netty/netty-transport-native-epoll/4.1.64.Final/netty-transport-native-epoll-4.1.64.Final-${os.detected.name}-${os.detected.arch}.jar.lastUpdated
  [[DEBUG] Using transporter WagonTransporter with priority -1.0 for https://repo.maven.apache.org/maven2
  [[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for https://repo.maven.apache.org/maven2
  [Downloading from central: https://repo.maven.apache.org/maven2/io/netty/netty-tcnative/2.0.39.Final/netty-tcnative-2.0.39.Final-$%7Bos.detected.classifier%7D.jar
  [Downloading from central: https://repo.maven.apache.org/maven2/io/netty/netty-transport-native-epoll/4.1.64.Final/netty-transport-native-epoll-4.1.64.Final-$%7Bos.detected.name%7D-$%7Bos.detected.arch%7D.jar
  [[DEBUG] Writing tracking file /home/frederic/.m2/repository/io/netty/netty-tcnative/2.0.39.Final/netty-tcnative-2.0.39.Final-${os.detected.classifier}.jar.lastUpdated
  [[DEBUG] Writing tracking file /home/frederic/.m2/repository/io/netty/netty-transport-native-epoll/4.1.64.Final/netty-transport-native-epoll-4.1.64.Final-${os.detected.name}-${os.detected.arch}.jar.lastUpdated
  [[INFO] ------------------------------------------------------------------------
  [[INFO] BUILD FAILURE
  [[INFO] ------------------------------------------------------------------------
  [[INFO] Total time:  6.177 s
  [[INFO] Finished at: 2021-05-18T09:31:45+02:00
  [[INFO] ------------------------------------------------------------------------
  [[ERROR] Failed to execute goal on project testNetty64: Could not resolve dependencies for project org.example:testNetty64:jar:1.0-SNAPSHOT
  [: The following artifacts could not be resolved: io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.39.Final, io.netty:netty-transport-native-epoll:jar:${os.detected.name}-${os.detected.arch}:4.1.64.Final: 
  [Could not find artifact io.netty:netty-tcnative:jar:${os.detected.classifier}:2.0.39.Final in MavenCentral (https://repo.maven.apache.org/maven2) -> [Help 1]

JVM version (e.g. java -version)

Tried using Java 8 and Java 11

  java version "1.8.0_221"
  Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
  Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)

  openjdk version "11.0.11" 2021-04-20
  OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
  OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

OS version (e.g. uname -a)

  Linux frederic-X510UQ 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
normanmaurercommented, May 18, 2021

@boris-unckel hopefully this week

1reaction
candrewscommented, May 18, 2021

Here’s the result of running mvn dependency:tree on the pom.xml from the description against netty with #11278: tree.txt As far as I can tell, the tree output looks good.

Read more comments on GitHub >

github_iconTop Results From Across the Web

io.netty » netty-all » 4.1.64.Final - Maven Repository
Netty is a NIO client server framework which enables quick and easy development of network ... Vulnerabilities, Vulnerabilities from dependencies:
Read more >
AGP 7.1.1 Depends on Vulnerable Netty Version [220795136]
We attempted to use Gradle dependency resolution to force a newer version of Netty, however this broke execution of instrumented tests via the ......
Read more >
Netty 4.1.65.Final released - Netty.news
We are happy to announce the release of netty 4.1.65.Final, which beside fixes multiple bugs and includes some performance improvements as ...
Read more >
Dependency-Check Report
Scan Information (show all): ... Summary. Display: Showing Vulnerable Dependencies (click to show all) ... pkg:maven/io.netty/netty-transport@4.1.75.
Read more >
Looking for appropriate plugin for Netty dependenc... - Neo4j
Looking for appropriate plugin for Netty dependency for SSL provider ... Hello all,. I am in the process of upgrading to Neo4j 4.0...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found