Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: connect: connection refused (ECONNREFUSED) #33

Closed
diegozea opened this issue Apr 18, 2016 · 31 comments
Closed

ERROR: connect: connection refused (ECONNREFUSED) #33

diegozea opened this issue Apr 18, 2016 · 31 comments

Comments

@diegozea
Copy link
Contributor

I'm getting the following error in two different computers:

julia> using Plots; plotlyjs()
Plots.PlotlyJSBackend()

julia> plot(1:10, rand(10))
[Plots.jl] Initializing backend: plotlyjs
Error showing value of type Plots.Plot{Plots.PlotlyJSBackend}:
ERROR: connect: connection refused (ECONNREFUSED)
 in yieldto at ./task.jl:71
 in wait at ./task.jl:371
 in wait at ./task.jl:286
 in stream_wait at ./stream.jl:60
 in wait_connected at ./stream.jl:331
 in connect at socket.jl:669
 in try_connect at /home/diego/.julia/v0.4/Blink/src/AtomShell/process.jl:58
 in init at /home/diego/.julia/v0.4/Blink/src/AtomShell/process.jl:72
 in shell at /home/diego/.julia/v0.4/Blink/src/AtomShell/process.jl:110
 in get_window at /home/diego/.julia/v0.4/PlotlyJS/src/displays/electron.jl:30
 in get_window at /home/diego/.julia/v0.4/PlotlyJS/src/displays/electron.jl:23
 in display at /home/diego/.julia/v0.4/PlotlyJS/src/displays/electron.jl:47
 in display at /home/diego/.julia/v0.4/Plots/src/output.jl:114
 in display at REPL.jl:117
 [inlined code] from multimedia.jl:151
 in display at multimedia.jl:162
 in print_response at REPL.jl:134
 in print_response at REPL.jl:121
 in anonymous at REPL.jl:624
 in run_interface at ./LineEdit.jl:1610
 in run_frontend at ./REPL.jl:863
 in run_repl at ./REPL.jl:167
 in _start at ./client.jl:420

This one is:

julia> versioninfo(true)
Julia Version 0.4.1
Commit cbe1bee (2015-11-08 10:33 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz
  WORD_SIZE: 64
           Ubuntu 15.04
  uname: Linux 3.19.0-26-generic #28-Ubuntu SMP Tue Aug 11 14:16:32 UTC 2015 x86_64 x86_64
Memory: 11.725090026855469 GB (3030.91796875 MB free)
Uptime: 2.679364e6 sec
Load Avg:  0.134765625  0.2265625  0.1513671875
Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz: 
       speed         user         nice          sys         idle          irq
#1  1599 MHz    7274174 s     387255 s     759019 s  257963316 s         10 s
#2  1333 MHz    7232676 s     387630 s     775130 s  258054140 s         11 s
#3  2667 MHz    6803630 s     387476 s     765098 s  258439281 s        130 s
#4  1199 MHz    7711733 s     245117 s     809228 s  257621608 s         85 s

  BLAS: libopenblas (NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Nehalem)
  LAPACK: liblapack.so.3
  LIBM: libopenlibm
  LLVM: libLLVM-3.3
Environment:
  TERM = xterm
  XDG_SESSION_PATH = /org/freedesktop/DisplayManager/Session0
  XDG_SEAT_PATH = /org/freedesktop/DisplayManager/Seat0
  DEFAULTS_PATH = /usr/share/gconf/ubuntu.default.path
  PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/diego/.julia/v0.4/MIToS/scripts:/home/diego/Desktop/naccess
  MANDATORY_PATH = /usr/share/gconf/ubuntu.mandatory.path
  HOME = /home/diego
  COMPIZ_BIN_PATH = /usr/bin/

Package Directory: /home/diego/.julia/v0.4
48 required packages:
 - ArgParse                      0.3.0+             master
 - Atom                          0.4.1
 - BiomolecularStructures        0.0.1
 - Blink                         0.3.4
 - Bokeh                         0.2.0
 - Bootstrap                     0.3.3
 - Cairo                         0.2.31
 - DataFrames                    0.7.0
 - DataFramesMeta                0.1.1
 - Example                       0.4.1
 - FixedSizeArrays               0.0.10
 - GLFW                          1.1.2
 - GLM                           0.5.0
 - Gadfly                        0.4.2              fdb02ed4 (dirty)
 - GadflyDiff                    0.0.1
 - Hinton                        0.1.1
 - HttpParser                    0.1.1
 - HypothesisTests               0.2.10+            master
 - IJulia                        1.1.9
 - ImageMagick                   0.1.4
 - Immerse                       0.0.11
 - IndexedArrays                 0.1.0
 - Interact                      0.3.1
 - Jewel                         1.0.8
 - KernelDensity                 0.1.2
 - KernelEstimator               0.1.7
 - MIToS                         1.0.0+             master
 - Merly                         0.0.1
 - Mustache                      0.0.14
 - NLopt                         0.3.1
 - NetworkViz                    0.0.2
 - NullableArrays                0.0.2
 - PairwiseListMatrices          0.3.0+             master
 - Patchwork                     0.2.2
 - PlotlyJS                      0.1.4              master
 - Plots                         0.5.4
 - PyCall                        1.4.0
 - PyPlot                        2.1.1
 - Qwt                           0.0.1
 - RCall                         0.4.0
 - RDatasets                     0.1.2
 - ROCAnalysis                   0.0.1
 - Roots                         0.1.26
 - SmoothingKernels              0.0.0
 - UnicodePlots                  0.1.3
 - Vega                          0.6.5
 - VoronoiDelaunay               0.0.1
 - Winston                       0.11.13
119 additional packages:
 - ArrayViews                    0.6.4
 - AutoHashEquals                0.0.9
 - Benchmark                     0.1.0
 - Benchmarks                    0.0.0-             master (unregistered)
 - BinDeps                       0.3.21
 - BioSeq                        0.4.0
 - Blosc                         0.1.4
 - BufferedStreams               0.0.3
 - Calculus                      0.1.14
 - Clustering                    0.5.0
 - CodeTools                     0.3.0
 - Codecs                        0.1.5
 - ColorBrewer                   0.3.0
 - ColorTypes                    0.2.2
 - ColorVectorSpace              0.1.2
 - Colors                        0.6.3
 - Combinatorics                 0.2.0
 - Compat                        0.7.13
 - Compose                       0.4.2
 - ComposeDiff                   0.0.1
 - Conda                         0.1.9
 - Contour                       0.1.0
 - Cubature                      1.0.10
 - CurveFit                      0.1.0
 - DThree                        0.0.0-             master (unregistered)
 - DataArrays                    0.2.20
 - DataStructures                0.4.3
 - Dates                         0.4.4
 - Distances                     0.3.0
 - Distributions                 0.8.10
 - Docile                        0.5.23
 - DualNumbers                   0.2.2
 - FactCheck                     0.4.2
 - FastaIO                       0.1.4
 - FileIO                        0.0.4
 - FixedPointNumbers             0.1.2
 - Formatting                    0.1.5
 - ForwardDiff                   0.1.6
 - FreeType                      1.0.3
 - FunctionalCollections         0.1.3
 - GLAbstraction                 0.0.11             master
 - GLVisualize                   0.0.7              master
 - GLWindow                      0.1.1
 - GZip                          0.2.18
 - GeometricalPredicates         0.0.4
 - GeometryTypes                 0.1.4
 - GraphLayout                   0.3.1
 - GraphVisualize                0.0.0-             master (unregistered)
 - Graphics                      0.1.3
 - Grid                          0.4.0
 - Gtk                           0.9.3
 - GtkUtilities                  0.0.8
 - HDF5                          0.5.8
 - Hexagons                      0.0.4
 - Hiccup                        0.0.2
 - HttpCommon                    0.2.4
 - HttpServer                    0.1.5
 - Images                        0.5.3
 - ImmutableArrays               0.0.11
 - IniFile                       0.2.5
 - Iterators                     0.1.9
 - JLD                           0.5.9
 - JSON                          0.5.0
 - JuMP                          0.12.2
 - Judo                          0.0.0-             mdjl (unregistered)
 - JuliaParser                   0.6.4
 - LNR                           0.0.2
 - LaTeXStrings                  0.1.6
 - Lazy                          0.10.1
 - Lexicon                       0.1.18
 - Libz                          0.0.2
 - LightGraphs                   0.5.2
 - LightXML                      0.2.1
 - Loess                         0.0.6
 - MLPlots                       0.0.0-             master (unregistered)
 - MacroTools                    0.3.0
 - MathProgBase                  0.4.3
 - MbedTLS                       0.2.1
 - Measures                      0.0.2
 - Media                         0.1.2
 - MeshIO                        0.0.4
 - ModernGL                      0.0.7
 - Mux                           0.2.0
 - NaNMath                       0.2.1
 - Nettle                        0.2.2
 - NoveltyColors                 0.1.0
 - NumericFuns                   0.2.4
 - Optim                         0.4.4
 - PDMats                        0.4.1
 - Packing                       0.0.4
 - ParserCombinator              1.7.8
 - Polynomials                   0.0.5
 - Quaternions                   0.1.0
 - Reactive                      0.3.2
 - Reexport                      0.0.3
 - Requests                      0.3.6
 - Requires                      0.2.2
 - ReverseDiffSparse             0.5.5
 - SHA                           0.1.2
 - SIUnits                       0.0.6
 - Showoff                       0.0.6
 - SignedDistanceFields          0.0.1
 - SimpleStats                   0.0.0-             master (unregistered)
 - SortingAlgorithms             0.0.6
 - StatsBase                     0.8.0
 - StatsFuns                     0.2.0
 - TexExtensions                 0.0.3
 - TextWrap                      0.1.5
 - ThreeJS                       0.2.1
 - Tk                            0.3.7
 - URIParser                     0.1.3
 - WebSockets                    0.1.2
 - WoodburyMatrices              0.1.5
 - XMLDict                       0.0.8
 - YAML                          0.1.10
 - Yeppp                         0.0.10
 - ZMQ                           0.3.1
 - Zlib                          0.1.12
 - mdjl                          0.0.0-             master (unregistered)

@sglyon
Copy link
Member

sglyon commented Apr 18, 2016

Will you do Pkg.checkout("Blink") and try again?

I think I'm relying on some un-tagged changes to Blink.jl

@diegozea
Copy link
Contributor Author

It's strange... It works now without changing Blink.

@sglyon
Copy link
Member

sglyon commented Apr 18, 2016

Strange indeed. I'll close now, but feel free to reopen/post if it resurfaces

@sglyon sglyon closed this as completed Apr 18, 2016
@seppalai
Copy link

seppalai commented Jun 28, 2016

I got the same error and then when I used Pkg.checkout("Blink") I got

julia> Pkg.checkout("Blink")
INFO: Checking out Blink master...
error: unknown switch `B'
usage: git checkout [options] <branch>
   or: git checkout [options] [<branch>] -- <file>...

    -q, --quiet           be quiet
    -b <new branch>       branch
    -l                    log for new branch
    -t, --track           track
    -2, --ours            stage
    -3, --theirs          stage
    -f, --force           force
    -m, --merge           merge
    --conflict <style>    conflict style (merge or diff3)
    -p, --patch           select hunks interactively

ERROR: connect: connection refused (ECONNREFUSED)
in yieldto at ./task.jl:71
in wait at ./task.jl:371
in wait at ./task.jl:286
in stream_wait at ./stream.jl:60
in wait_connected at ./stream.jl:336
in connect at socket.jl:671
in try_connect at /home/usr/.julia/v0.4/Blink/src/AtomShell/process.jl:58
in init at /home/usr/.julia/v0.4/Blink/src/AtomShell/process.jl:72
in shell at /home/usr/.julia/v0.4/Blink/src/AtomShell/process.jl:110
in call at /home/usr/.julia/v0.4/Blink/src/AtomShell/window.jl:37

Any idea what is causing this?

@sglyon
Copy link
Member

sglyon commented Jun 29, 2016

I've seen this come up a few times and haven't been able to figure out just what causes it.

Were you running this julia session remotely, perhaps via SSH?

@sglyon sglyon reopened this Jun 29, 2016
@tbreloff
Copy link
Member

FYI I frequently get this too. I think it's some sort of race condition during window setup for Blink. When I re-run the command it usually works.

@seppalai
Copy link

seppalai commented Jul 1, 2016

Yes, Spencer, I was running julia via Putty on a remote server. Might that have something to do with the problem?

I've run the command a few times consecutively and it always gives out the same error message.

@sglyon
Copy link
Member

sglyon commented Jul 1, 2016

@i-dash yes, that would be a problem. What is happening is that Blink.jl starts up a web server on the remote machine, but the remote machine blocks communication to it for security reasons. This is a good thing. If you ssh somewhere, you don't really want that computer to be opened up on any port.

We still have not figured out a way to work remotely with Blink.

@sglyon sglyon closed this as completed Jul 1, 2016
@AntonioLoureiro
Copy link

I also got this error, managed to solve forking Blink and changing default interval of function try_connect, solving the race condition!

Original:
function try_connect(args...; interval = 0.01, attempts = 100)

Modified:
function try_connect(args...; interval = 0.1, attempts = 100)

Any solution to keep original code of Blink allowing to update it and override the function?!

@sglyon
Copy link
Member

sglyon commented Aug 11, 2016

@AntonioLoureiro that's interesting.

Instead of changing interval can you change attempts to something like 300 and let me know if the issue goes away?

@AntonioLoureiro
Copy link

Changed attempts to 300 and it also works! And this solution is better i think!!

Do you know any elegant manner to override this arg not forking Blink Module?

@sglyon
Copy link
Member

sglyon commented Aug 11, 2016

@MikeInnes I'm thinking of just changing the default in blink -- are you opposed to that?

@MikeInnes
Copy link
Contributor

Please do. In general we probably need a better approach to making this connection.

@sglyon
Copy link
Member

sglyon commented Aug 12, 2016

OK great, thanks.

@AntonioLoureiro that has been merged into Blink and a new release has been tagged on METADATA. Whenever the metadata PR is merged, you should be able to go back to the released blink and have this change!

@stugorf
Copy link

stugorf commented Feb 16, 2017

@MikeInnes @sglyon I am having the same connection refused error and have the new attempts = 300 code in my docker container running PlotlyJS.jl. I am trying to use xvfb-run now and synch it's port to the same one Blink.port indicates Blink is listening on. Not much success at the moment. For example:

Blink.port = 5382 and I an running Xvfb :5382 -screen 0 1024x768x24 > /dev/null 2>&1 in the container. Still get same error even internally when calling Blink.Window().

Any thoughts or suggestions? Thank you!

@krcools
Copy link

krcools commented Dec 11, 2017

I still see this issue on Ubuntu 16.04. I use Julia in a local terminal, versioninfo:

Julia Version 0.6.0
Commit 9036443 (2017-06-19 13:05 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)

Playing around with the default arguments of try_connect did not result in success so far. I just get a longer time-out before the error message and stack info is printed out.

Has there been any progress on this?

@sglyon
Copy link
Member

sglyon commented Dec 12, 2017

Hi @krcools sorry to hear that. I haven't heard of anyone having this issue when using a terminal with a connected display on a local machine.

Can you post more of the output of the Julia session when the issue came up?

@krcools
Copy link

krcools commented Dec 12, 2017

Hi and thanks for the quick response. Yes, given that I'm the only one seeing this and that extending the time-out settings does not fix it, it is probably something different. The stack trace is very similar to the above though. Here is a complete session, from Julia start-up to the error being thrown:

julia> using PlotlyJS

julia> plot(scatter(x=collect(1:10),y=rand(10)))
Error showing value of type PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}:
ERROR: connect: connection refused (ECONNREFUSED)
Stacktrace:
 [1] try_yieldto(::Base.##296#297{Task}, ::Task) at ./event.jl:189
 [2] wait() at ./event.jl:234
 [3] wait(::Condition) at ./event.jl:27
 [4] stream_wait(::TCPSocket, ::Condition, ::Vararg{Condition,N} where N) at ./stream.jl:42
 [5] wait_connected(::TCPSocket) at ./stream.jl:258
 [6] connect at ./stream.jl:983 [inlined]
 [7] connect(::IPv4, ::Int64) at ./socket.jl:738
 [8] #try_connect#4(::Float64, ::Int64, ::Function, ::IPv4, ::Vararg{Any,N} where N) at /home/ezzkc/.julia/v0.6/Blink/src/AtomShell/process.jl:62
 [9] #init#5(::Bool, ::Function) at /home/ezzkc/.julia/v0.6/Blink/src/AtomShell/process.jl:76
 [10] (::Blink.AtomShell.#kw##init)(::Array{Any,1}, ::Blink.AtomShell.#init) at ./<missing>:0
 [11] #shell#8(::Bool, ::Function) at /home/ezzkc/.julia/v0.6/Blink/src/AtomShell/process.jl:114
 [12] Type at /home/ezzkc/.julia/v0.6/Blink/src/AtomShell/window.jl:37 [inlined]
 [13] get_window at /home/ezzkc/.julia/v0.6/PlotlyJS/src/displays/electron.jl:51 [inlined]
 [14] #get_window#67(::Array{Any,1}, ::Function, ::PlotlyJS.ElectronDisplay) at /home/ezzkc/.julia/v0.6/PlotlyJS/src/displays/electron.jl:64
 [15] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.ElectronDisplay) at ./<missing>:0
 [16] #get_window#68(::Array{Any,1}, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/ezzkc/.julia/v0.6/PlotlyJS/src/displays/electron.jl:108
 [17] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./<missing>:0
 [18] #display_blink#70(::Bool, ::Bool, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/ezzkc/.julia/v0.6/PlotlyJS/src/displays/electron.jl:115
 [19] (::PlotlyJS.#kw##display_blink)(::Array{Any,1}, ::PlotlyJS.#display_blink, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./<missing>:0
 [20] display(::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/ezzkc/.julia/v0.6/PlotlyJS/src/displays/electron.jl:111
 [21] eval(::Module, ::Any) at ./boot.jl:235
 [22] print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:144
 [23] print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:129
 [24] (::Base.REPL.#do_respond#16{Bool,Base.REPL.##26#36{Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:646

@sglyon
Copy link
Member

sglyon commented Dec 12, 2017

Hmm. This is strange indeed.

Can you tell me what happens when you try that same code from within a Julia session started with xvfb-run julia?

If you don't have the xvfb-run command, you can install it on ubuntu by running sudo apt-get install xvfb

@krcools
Copy link

krcools commented Dec 13, 2017

The same thing happens.

@krcools
Copy link

krcools commented Dec 13, 2017

I should probably take my issue to Blink. Going through there example gives me the same result... Thanks for your help.

@romainFr
Copy link

romainFr commented Jan 4, 2018

Running

Blink.AtomShell.install()

usually solves the problem for me

@krcools
Copy link

krcools commented Jan 6, 2018

A complete reinstall of Julia and the .julia package directory fixed the problem for me.

@sglyon
Copy link
Member

sglyon commented Jan 6, 2018

Thanks for the report and sorry for the inconvenience!

@Antoniodivz
Copy link

I want to do simulations in Julia with the "Plots" package and when compiling I get this error, someone who has solved it can help me:

connect: connection refused (ECONNREFUSED)

Stacktrace:
[1] try_yieldto(::Base.##296#297{Task}, ::Task) at ./event.jl:189
[2] wait() at ./event.jl:234
[3] wait(::Condition) at ./event.jl:27
[4] stream_wait(::TCPSocket, ::Condition, ::Vararg{Condition,N} where N) at ./stream.jl:42
[5] wait_connected(::TCPSocket) at ./stream.jl:258
[6] connect at ./stream.jl:983 [inlined]
[7] connect(::IPv4, ::Int64) at ./socket.jl:742
[8] #try_connect#4(::Float64, ::Int64, ::Function, ::IPv4, ::Vararg{Any,N} where N) at /home/toodivz/.julia/v0.6/Blink/src/AtomShell/process.jl:62
[9] #init#5(::Bool, ::Function) at /home/toodivz/.julia/v0.6/Blink/src/AtomShell/process.jl:76
[10] (::Blink.AtomShell.#kw##init)(::Array{Any,1}, ::Blink.AtomShell.#init) at ./:0
[11] #shell#8(::Bool, ::Function) at /home/toodivz/.julia/v0.6/Blink/src/AtomShell/process.jl:114
[12] Type at /home/toodivz/.julia/v0.6/Blink/src/AtomShell/window.jl:37 [inlined]
[13] get_window at /home/toodivz/.julia/v0.6/PlotlyJS/src/displays/electron.jl:51 [inlined]
[14] #get_window#83(::Array{Any,1}, ::Function, ::PlotlyJS.ElectronDisplay) at /home/toodivz/.julia/v0.6/PlotlyJS/src/displays/electron.jl:64
[15] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.ElectronDisplay) at ./:0
[16] #get_window#84(::Array{Any,1}, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/toodivz/.julia/v0.6/PlotlyJS/src/displays/electron.jl:108
[17] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[18] #display_blink#86(::Bool, ::Bool, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/toodivz/.julia/v0.6/PlotlyJS/src/displays/electron.jl:115
[19] (::PlotlyJS.#kw##display_blink)(::Array{Any,1}, ::PlotlyJS.#display_blink, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[20] (::Base.Multimedia.#kw##display)(::Array{Any,1}, ::Base.Multimedia.#display, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[21] svg_data(::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}, ::String, ::Bool) at /home/toodivz/.julia/v0.6/PlotlyJS/src/displays/electron.jl:211
[22] #savefig#223(::Symbol, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}, ::String) at /home/toodivz/.julia/v0.6/PlotlyJS/src/savefig.jl:126
[23] savefig(::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}, ::String) at /home/toodivz/.julia/v0.6/PlotlyJS/src/savefig.jl:106
[24] #savefig#232(::Array{Any,1}, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.JupyterDisplay}, ::String, ::Vararg{String,N} where N) at /home/toodivz/.julia/v0.6/PlotlyJS/src/savefig.jl:166
[25] savefig(::PlotlyJS.SyncPlot{PlotlyJS.JupyterDisplay}, ::String) at /home/toodivz/.julia/v0.6/PlotlyJS/src/savefig.jl:166
[26] plotlyjs_save_hack at /home/toodivz/.julia/v0.6/Plots/src/backends/plotlyjs.jl:102 [inlined]
[27] _show at /home/toodivz/.julia/v0.6/Plots/src/backends/plotlyjs.jl:106 [inlined]
[28] show(::IOStream, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.PlotlyJSBackend}) at /home/toodivz/.julia/v0.6/Plots/src/output.jl:208
[29] png(::Plots.Plot{Plots.PlotlyJSBackend}, ::String) at /home/toodivz/.julia/v0.6/Plots/src/output.jl:8
[30] frame(::Plots.Animation, ::Plots.Plot{Plots.PlotlyJSBackend}) at /home/toodivz/.julia/v0.6/Plots/src/animation.jl:20
[31] frame(::Plots.Animation) at /home/toodivz/.julia/v0.6/Plots/src/animation.jl:18
[32] macro expansion at /home/toodivz/.julia/v0.6/Plots/src/animation.jl:142 [inlined]
[33] macro expansion at ./In[6]:3 [inlined]
[34] macro expansion at /home/toodivz/.julia/v0.6/Plots/src/animation.jl:152 [inlined]
[35] anonymous at ./:?
[36] include_string(::String, ::String) at ./loading.jl:522

When compiling the PlotlyJS package, this error appears:

Plotly javascript loaded.

To load again call

init_notebook(true)

WARNING: Method definition (::Type{PlotlyJS.SyncPlot{TD} where TD<:PlotlyJS.AbstractPlotlyDisplay})(PlotlyJS.Plot{TT} where TT<:PlotlyJS.AbstractTrace) in module PlotlyJS at /home/toodivz/.julia/v0.6/PlotlyJS/src/display.jl:136 overwritten at /home/toodivz/.julia/v0.6/PlotlyJS/src/displays/ijulia.jl:187.

MethodError: no method matching PlotlyJS.GenericTrace(::String; showlegend=true, mode="lines", xaxis="x", colorbar=Dict{Symbol,Any}(Pair{Symbol,Any}(:title, "")), line=Dict{Symbol,Any}(Pair{Symbol,Any}(:color, "rgba(0, 154, 250, 1.000)"),Pair{Symbol,Any}(:shape, "linear"),Pair{Symbol,Any}(:dash, "solid"),Pair{Symbol,Any}(:width, 1)), y=[0.0998334, 0.109778, 0.119712, 0.129634, 0.139543, 0.149438, 0.159318, 0.169182, 0.17903, 0.188859 … 0.00681464, 0.0168139, 0.0268115, 0.0368064, 0.0467976, 0.0567841, 0.066765, 0.0767392, 0.0867057, 0.0966635], name="y1", yaxis="y", x=[0.0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09 … 6.19, 6.2, 6.21, 6.22, 6.23, 6.24, 6.25, 6.26, 6.27, 6.28])
Closest candidates are:
PlotlyJS.GenericTrace(::Union{AbstractString, Symbol}) at /home/toodivz/.julia/v0.6/PlotlyJS/src/traces_layouts.jl:11 got unsupported keyword arguments "showlegend", "mode", "xaxis", "colorbar", "line", "y", "name", "yaxis", "x"
PlotlyJS.GenericTrace(::Union{AbstractString, Symbol}, ::Any; kwargs...) at /home/toodivz/.julia/v0.6/PlotlyJS/src/traces_layouts.jl:11
PlotlyJS.GenericTrace(::T<:Associative{Symbol,Any}) where T<:Associative{Symbol,Any} at /home/toodivz/.julia/v0.6/PlotlyJS/src/traces_layouts.jl:5 got unsupported keyword arguments "showlegend", "mode", "xaxis", "colorbar", "line", "y", "name", "yaxis", "x"
...

Stacktrace:
[1] _series_added(::Plots.Plot{Plots.PlotlyJSBackend}, ::Plots.Series) at /home/toodivz/.julia/v0.6/Plots/src/backends/plotlyjs.jl:59
[2] _add_the_series(::Plots.Plot{Plots.PlotlyJSBackend}, ::Plots.Subplot{Plots.PlotlyJSBackend}, ::Dict{Symbol,Any}) at /home/toodivz/.julia/v0.6/Plots/src/pipeline.jl:380
[3] _process_seriesrecipe(::Plots.Plot{Plots.PlotlyJSBackend}, ::Dict{Symbol,Any}) at /home/toodivz/.julia/v0.6/Plots/src/pipeline.jl:402
[4] _plot!(::Plots.Plot{Plots.PlotlyJSBackend}, ::Dict{Symbol,Any}, ::Tuple{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},Array{Float64,1}}) at /home/toodivz/.julia/v0.6/Plots/src/plot.jl:233
[5] #plot#176(::Array{Any,1}, ::Function, ::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Vararg{Any,N} where N) at /home/toodivz/.julia/v0.6/Plots/src/plot.jl:58
[6] plot(::StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N} where N) at /home/toodivz/.julia/v0.6/Plots/src/plot.jl:52
[7] macro expansion at ./In[5]:3 [inlined]
[8] anonymous at ./:?
[9] include_string(::String, ::String) at ./loading.jl:522

@fqroldan
Copy link

fqroldan commented Jun 2, 2018

Hey I'm getting this old error again. On a fresh install (new laptop) of julia 0.6.3 on ubuntu 18.04, upon
using PlotlyJS; plot(), I get

Error showing value of type PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}:
ERROR: connect: connection refused (ECONNREFUSED)
Stacktrace:
[1] try_yieldto(::Base.##298#299{Task}, ::Task) at ./event.jl:189
[2] wait() at ./event.jl:234
[3] wait(::Condition) at ./event.jl:27
[4] stream_wait(::TCPSocket, ::Condition, ::Vararg{Condition,N} where N) at ./stream.jl:42
[5] wait_connected(::TCPSocket) at ./stream.jl:258
[6] connect at ./stream.jl:983 [inlined]
[7] connect(::IPv4, ::Int64) at ./socket.jl:742
[8] #try_connect#4(::Float64, ::Int64, ::Function, ::IPv4, ::Vararg{Any,N} where N) at /home/q/.julia/v0.6/Blink/src/AtomShell/process.jl:62
[9] #init#5(::Bool, ::Function) at /home/q/.julia/v0.6/Blink/src/AtomShell/process.jl:76
[10] (::Blink.AtomShell.#kw##init)(::Array{Any,1}, ::Blink.AtomShell.#init) at ./:0
[11] #shell#8(::Bool, ::Function) at /home/q/.julia/v0.6/Blink/src/AtomShell/process.jl:114
[12] Type at /home/q/.julia/v0.6/Blink/src/AtomShell/window.jl:37 [inlined]
[13] get_window at /home/q/.julia/v0.6/PlotlyJS/src/displays/electron.jl:51 [inlined]
[14] #get_window#46(::Array{Any,1}, ::Function, ::PlotlyJS.ElectronDisplay) at /home/q/.julia/v0.6/PlotlyJS/src/displays/electron.jl:64
[15] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.ElectronDisplay) at ./:0
[16] #get_window#47(::Array{Any,1}, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/q/.julia/v0.6/PlotlyJS/src/displays/electron.jl:109
[17] (::PlotlyJS.#kw##get_window)(::Array{Any,1}, ::PlotlyJS.#get_window, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[18] #display_blink#49(::Bool, ::Bool, ::Function, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/q/.julia/v0.6/PlotlyJS/src/displays/electron.jl:116
[19] (::PlotlyJS.#kw##display_blink)(::Array{Any,1}, ::PlotlyJS.#display_blink, ::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at ./:0
[20] display(::PlotlyJS.SyncPlot{PlotlyJS.ElectronDisplay}) at /home/q/.julia/v0.6/PlotlyJS/src/displays/electron.jl:112
[21] eval(::Module, ::Any) at ./boot.jl:235
[22] print_response(::Base.Terminals.TTYTerminal, ::Any, ::Void, ::Bool, ::Bool, ::Void) at ./REPL.jl:144
[23] print_response(::Base.REPL.LineEditREPL, ::Any, ::Void, ::Bool, ::Bool) at ./REPL.jl:129
[24] (::Base.REPL.#do_respond#16{Bool,Base.REPL.##26#36{Base.REPL.LineEditREPL,Base.REPL.REPLHistoryProvider},Base.REPL.LineEditREPL,Base.LineEdit.Prompt})(::Base.LineEdit.MIState, ::Base.AbstractIOBuffer{Array{UInt8,1}}, ::Bool) at ./REPL.jl:646

I ran Blink.Atom.install() with no success and also tried the old suggestions of running Pkg.checkout("Blink") and using xvfb-run julia. There were no changes

Any ideas?

@andreasnoack
Copy link

CIBot seems to hit this consistently so it would be great if somebody knew how to avoid this error.

@sglyon
Copy link
Member

sglyon commented Sep 11, 2018

Does CIBot run with a "fake display" (e.g. inside xvfb-run)?

@andreasnoack
Copy link

Yes. It uses xvfb-run.

@sglyon
Copy link
Member

sglyon commented Sep 11, 2018

Does it perhaps spawn a subprocess or connect to a remote process that doesn't have a fake display?

@andreasnoack
Copy link

The current code is basically

@schedule run(`Xvfb :99`)
sleep(10)
com = Cmd(`$julia -e "$test_cmd"`; env=("DISPLAY"=>":99",))
run(com)

and I also tried with just xvfb-run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests