Connection refused
On PlotlyJS v0.13.1 with WebIO v0.8.14 and Julia 1.4.2, in IJulia I get this error with using Plots; plotlyjs(); plot([1,2],[3,4]):
IOError(Base.IOError("connect: connection refused (ECONNREFUSED)", -111) during request(http://localhost:7982))
Stacktrace:
[1] wait_connected(::Sockets.TCPSocket) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Sockets/src/Sockets.jl:520
[2] connect at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Sockets/src/Sockets.jl:555 [inlined]
[3] connect(::Sockets.IPv4, ::UInt64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Sockets/src/Sockets.jl:541
[4] getconnection(::Type{Sockets.TCPSocket}, ::SubString{String}, ::SubString{String}; keepalive::Bool, connect_timeout::Int64, kw::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},Tuple{Symbol,Symbol,Symbol},NamedTuple{(:require_ssl_verification, :iofunction, :status_exception),Tuple{Bool,Nothing,Bool}}}) at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/ConnectionPool.jl:616
[5] #newconnection#25 at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/ConnectionPool.jl:583 [inlined]
[6] getconnection(::Type{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}, ::SubString{String}, ::SubString{String}; connection_limit::Int64, pipeline_limit::Int64, idle_timeout::Int64, reuse_limit::Int64, require_ssl_verification::Bool, kw::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},Tuple{Symbol,Symbol},NamedTuple{(:iofunction, :status_exception),Tuple{Nothing,Bool}}}) at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/ConnectionPool.jl:527
[7] request(::Type{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}, ::HTTP.URIs.URI, ::HTTP.Messages.Request, ::String; proxy::Nothing, socket_type::Type{T} where T, reuse_limit::Int64, kw::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},Tuple{Symbol,Symbol},NamedTuple{(:iofunction, :status_exception),Tuple{Nothing,Bool}}}) at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/ConnectionRequest.jl:73
[8] (::Base.var"#58#60"{Base.var"#58#59#61"{ExponentialBackOff,HTTP.RetryRequest.var"#2#3"{Bool,HTTP.Messages.Request},typeof(HTTP.request)}})(::Type{T} where T, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},Tuple{Symbol,Symbol},NamedTuple{(:iofunction, :status_exception),Tuple{Nothing,Bool}}}) at ./error.jl:301
[9] #request#1 at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/RetryRequest.jl:44 [inlined]
[10] request(::Type{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String; http_version::VersionNumber, target::String, parent::Nothing, iofunction::Nothing, kw::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:status_exception,),Tuple{Bool}}}) at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/MessageRequest.jl:51
[11] request(::Type{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String; kw::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:status_exception,),Tuple{Bool}}}) at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/BasicAuthRequest.jl:28
[12] request(::Type{HTTP.RedirectRequest.RedirectLayer{HTTP.BasicAuthRequest.BasicAuthLayer{HTTP.MessageRequest.MessageLayer{HTTP.RetryRequest.RetryLayer{HTTP.ConnectionRequest.ConnectionPoolLayer{HTTP.StreamRequest.StreamLayer{Union{}}}}}}}}, ::String, ::HTTP.URIs.URI, ::Array{Pair{SubString{String},SubString{String}},1}, ::String; redirect_limit::Int64, forwardheaders::Bool, kw::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:status_exception,),Tuple{Bool}}}) at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/RedirectRequest.jl:24
[13] request(::String, ::String, ::Dict{Any,Any}, ::String; headers::Dict{Any,Any}, body::String, query::Nothing, kw::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:status_exception,),Tuple{Bool}}}) at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/HTTP.jl:314
[14] #post#14 at /home/cst-jean/.julia/packages/HTTP/BOJmV/src/HTTP.jl:405 [inlined]
[15] savefig(::Base64.Base64EncodePipe, ::PlotlyBase.Plot{PlotlyBase.GenericTrace{Dict{Symbol,Any}}}; format::String, scale::Nothing, width::Nothing, height::Nothing) at /home/cst-jean/.julia/packages/ORCA/fiEmb/src/ORCA.jl:36
[16] savefig(::Base64.Base64EncodePipe, ::PlotlyJS.SyncPlot; k::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol},NamedTuple{(:format,),Tuple{String}}}) at /home/cst-jean/.julia/packages/PlotlyJS/AhkM5/src/savefig_orca.jl:2
[17] _show(::Base64.Base64EncodePipe, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.PlotlyJSBackend}) at /home/cst-jean/.julia/packages/Plots/JKY3H/src/backends/plotlyjs.jl:28
[18] show(::Base64.Base64EncodePipe, ::MIME{Symbol("image/png")}, ::Plots.Plot{Plots.PlotlyJSBackend}) at /home/cst-jean/.julia/packages/Plots/JKY3H/src/output.jl:215
[19] base64encode(::Function, ::MIME{Symbol("image/png")}, ::Vararg{Any,N} where N; context::Nothing) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Base64/src/encode.jl:206
[20] base64encode at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Base64/src/encode.jl:203 [inlined]
[21] _ijulia_display_dict(::Plots.Plot{Plots.PlotlyJSBackend}) at /home/cst-jean/.julia/packages/Plots/JKY3H/src/ijulia.jl:50
[22] display_dict(::Plots.Plot{Plots.PlotlyJSBackend}) at /home/cst-jean/.julia/packages/Plots/JKY3H/src/init.jl:73
[23] #invokelatest#1 at ./essentials.jl:712 [inlined]
[24] invokelatest at ./essentials.jl:711 [inlined]
[25] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/cst-jean/.julia/packages/IJulia/DrVMH/src/execute_request.jl:112
[26] #invokelatest#1 at ./essentials.jl:712 [inlined]
[27] invokelatest at ./essentials.jl:711 [inlined]
[28] eventloop(::ZMQ.Socket) at /home/cst-jean/.julia/packages/IJulia/DrVMH/src/eventloop.jl:8
[29] (::IJulia.var"#15#18")() at ./task.jl:358
The Jupyter server is on another machine, so there's a chance that during request(http://localhost:7982)) is the culprit. Perhaps it shouldn't talk with localhost?
However, using plain PlotlyJS without Plots works fine. The stack trace above points a finger at ORCA.jl...
In the REPL, over ssh -X I get a similar error, even when using PlotlyJS directly:
julia> using PlotlyJS
julia> plot([1,2],[3,4])
Error showing value of type PlotlyJS.SyncPlot:
ERROR: IOError: connect: connection refused (ECONNREFUSED)
Stacktrace:
[1] wait_connected(::Sockets.TCPSocket) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Sockets/src/Sockets.jl:520
[2] connect at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Sockets/src/Sockets.jl:555 [inlined]
[3] connect(::Sockets.IPv4, ::Int64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Sockets/src/Sockets.jl:541
[4] try_connect(::Sockets.IPv4, ::Vararg{Any,N} where N; interval::Float64, attempts::Int64) at /home/cst-jean/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:79
[5] try_connect at /home/cst-jean/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:77 [inlined]
[6] init(; debug::Bool) at /home/cst-jean/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:93
[7] shell(; debug::Bool) at /home/cst-jean/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:149
[8] shell at /home/cst-jean/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:144 [inlined]
[9] #Window#14 at /home/cst-jean/.julia/packages/Blink/u1xcH/src/AtomShell/window.jl:89 [inlined]
[10] Window at /home/cst-jean/.julia/packages/Blink/u1xcH/src/AtomShell/window.jl:89 [inlined]
[11] display_blink(::PlotlyJS.SyncPlot) at /home/cst-jean/.julia/packages/PlotlyJS/AhkM5/src/display.jl:155
[12] display(::PlotlyJS.PlotlyJSDisplay, ::PlotlyJS.SyncPlot) at /home/cst-jean/.julia/packages/PlotlyJS/AhkM5/src/display.jl:152
[13] display(::Any) at ./multimedia.jl:323
[14] #invokelatest#1 at ./essentials.jl:712 [inlined]
[15] invokelatest at ./essentials.jl:711 [inlined]
[16] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:161
[17] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:146
[18] (::REPL.var"#do_respond#38"{Bool,REPL.var"#48#57"{REPL.LineEditREPL,REPL.REPLHistoryProvider},REPL.LineEditREPL,REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:729
[19] #invokelatest#1 at ./essentials.jl:712 [inlined]
[20] invokelatest at ./essentials.jl:711 [inlined]
[21] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/LineEdit.jl:2354
[22] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:1055
[23] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:206
[24] (::Base.var"#764#766"{Bool,Bool,Bool,Bool})(::Module) at ./client.jl:383
[25] #invokelatest#1 at ./essentials.jl:712 [inlined]
[26] invokelatest at ./essentials.jl:711 [inlined]
[27] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:367
[28] exec_options(::Base.JLOptions) at ./client.jl:305
[29] _start() at ./client.jl:484
I tried installing Blink, as in this very old issue, but it did not change anything.
Confirming that this is a problem with ORCA somehow, if I do display(MIME"text/html"(), plot([1,2],[3,4])); then the plot is shown.
I just realized that I was using Plots in IJulia. I rewrote the issue to be clearer.
Does this have anything to do with https://community.plotly.com/t/url-change-for-chart-studio-cloud-https-chart-studio-plotly-com/33557/6 ?