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 in configure_server! when listen_port not defined. #231

Open
vpuri3 opened this issue Jun 4, 2024 · 0 comments
Open

Error in configure_server! when listen_port not defined. #231

vpuri3 opened this issue Jun 4, 2024 · 0 comments

Comments

@vpuri3
Copy link

vpuri3 commented Jun 4, 2024

if isnothing(listen_url)
if !isnothing(proxy_url)
# if we serve to an external url, server must listen to 0.0.0.0
listen_url = "0.0.0.0"
else
listen_url = SERVER_CONFIGURATION.listen_url[]
end
end

When listen_url is not defined, it is set to SERVER_CONFIGURATION.listen_url[] which is set to nothing. This trips the error in line 140 as follows:

julia> using Bonito

julia> Bonito.configure_server!()
ERROR: Trying to listen to nothing, while only "127.0.0.1", "0.0.0.0" and "localhost" are supported
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] configure_server!(; listen_url::Nothing, listen_port::Int64, forwarded_port::Int64, proxy_url::Nothing)
   @ Bonito ~/.julia/packages/Bonito/5OnJB/src/server-defaults.jl:140
 [3] configure_server!()
   @ Bonito ~/.julia/packages/Bonito/5OnJB/src/server-defaults.jl:118
 [4] top-level scope
   @ REPL[2]:1
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

1 participant