testcontainers / testcontainers/testcontainers-java

Improve documentation to include JNA configuration capabilities

Offen Anfängerfreundlich
#1,910 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

help wanted resolution/acknowledged
Vorherrschende Sprache
Java
Sterne
8.7k
Forks
1.9k
Ø Merge
2 T. 17 Std.
Gemergte PRs (30 T.)
9

Beschreibung

Hi all,

testcontainers appears to be using JNA to perform its magic. By default, JNA writes to /tmp/jna folder and tries to execute something from there.

On some environments, /tmp folder is mounted with noexec flag, which makes the whole process fail.

Could you please add a documentation section where you specify your usage of JNA (maybe it's coming from docker-java?) and adding a note that properties jna.tmpdir and java.io.tmpdir can be used to override the default value?

A sample error that might occur during build with wrong configuration is:

ERROR o.t.d.EnvironmentAndSystemPropertyClientProviderStrategy.test - ping failed with configuration Environment variables, system properties and defaults. Resolved: 
[08:35:13][Step 2/5]     dockerHost=unix:///var/run/docker.sock
[08:35:13][Step 2/5]     apiVersion='{UNKNOWN_VERSION}'
[08:35:13][Step 2/5]     registryUrl='https://index.docker.io/v1/'
[08:35:13][Step 2/5]     registryUsername='xxx'
[08:35:13][Step 2/5]     registryPassword='null'
[08:35:13][Step 2/5]     registryEmail='null'
[08:35:13][Step 2/5]     dockerConfig='DefaultDockerClientConfig[dockerHost=unix:///var/run/docker.sock,registryUsername=xxx,registryPassword=<null>,registryEmail=<null>,registryUrl=https://index.docker.io/v1/,dockerConfigPath=/home/xxx/.docker,sslConfig=<null>,apiVersion={UNKNOWN_VERSION},dockerConfig=<null>]'
[08:35:13][Step 2/5]  due to java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: /tmp/jna-100295547/jna9104525941980512569.tmp: /tmp/jna-100295547/jna9104525941980512569.tmp: failed to map segment from shared object: Operation not permitted
[08:35:13][Step 2/5] 	at org.rnorth.ducttape.timeouts.Timeouts.callFuture(Timeouts.java:68)

And I understand it is not directly your issue, but having a documentation section about it would help others in the future

Thanks and cheers

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Das Issue nennt weder eine Dokumentationsdatei noch einen Test. Beginne damit, die vorhandene Konfigurations- oder Troubleshooting-Dokumentation zu finden und zu bestätigen, ob JNA über docker-java eingebunden wird; füge die angeforderten Hinweise zur Verwendung von JNA und zu tmpdir hinzu, einschließlich des noexec-Symptoms, und prüfe anschließend, ob der neue Abschnitt zusammen mit der umgebenden Dokumentation korrekt gerendert wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, java
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.