milaboratory / mixcr

MiXCR is an ultimate software platform for analysis of Next-Generation Sequencing (NGS) data for immune profiling.
https://mixcr.com
Other
336 stars 79 forks source link

error plotting over ssh with X11 forwarding #1013

Open DzmitryGB opened 1 year ago

DzmitryGB commented 1 year ago

Command

mixcr exportQc chainUsage *.clns chainUsage.pdf (and likely similar plotting commands)

Expected Result

plot is generated

Actual Result

MoTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused

java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
        at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:264)
        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)
        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)
        at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)
        at org.apache.fop.svg.PDFGraphics2D.<init>(PDFGraphics2D.java:1724)
        at org.apache.fop.svg.PDFDocumentGraphics2D.<init>(PDFDocumentGraphics2D.java:100)
        at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:112)
        at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142)
        at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:158)
        at com.milaboratory.miplots.ExportKt.toBytes(Export.kt:165)
        at com.milaboratory.miplots.ExportKt.toPDF(Export.kt:56)
        at com.milaboratory.miplots.ExportKt.toPDF(Export.kt:54)
        at com.milaboratory.miplots.ExportKt.writePDFFigure(Export.kt:198)
        at com.milaboratory.miplots.ExportKt.writeFile(Export.kt:179)
        at com.milaboratory.miplots.ExportKt.writeFile(Export.kt:171)
        at com.milaboratory.mixcr.cli.qc.CommandExportQcChainUsage.run1(CommandExportQcChainUsage.kt:139)
        at com.milaboratory.mixcr.cli.MiXCRCommandWithOutputs.run0(MiXCRCommandWithOutputs.kt:69)
        at com.milaboratory.mixcr.cli.MiXCRCommand.run(MiXCRCommand.kt:36)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at com.milaboratory.mixcr.cli.Main.registerLogger$lambda-25(Main.kt:387)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at com.milaboratory.mixcr.cli.Main.main(Main.kt:87)

Workaround

Disabling X11 forwarding solves the issue.

Env

ssh connection to server with MiXCR v4.2.0

Duplicate

https://github.com/milaboratory/docs/issues/56#issue-1589293329

PoslavskySV commented 1 year ago

Hi Dzmitry and thanks for reporting! We'll take a look how that could be solved.