Comments (4)
Works no me!
endpoint: format!("127.0.0.1:7021"),
from nickel.rs.
I did with Wi-Fi turned off:
let mut server = Nickel::new();
server.listen("127.0.0.1:5010");
And it throws this error when : cargo run
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InitializationError(Some("Error opening a connection: Error communicating with the server:
A socket operation was attempted to an unreachable host. (os error 10065)"))', src\libcore\result.rs:1165:5
stack backtrace:
0: backtrace::backtrace::trace_unsynchronized
at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.37\src\backtrace\mod.rs:66
1: std::sys_common::backtrace::_print_fmt
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\sys_common\backtrace.rs:76
2: std::sys_common::backtrace::_print::{{impl}}::fmt
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\sys_common\backtrace.rs:60
3: core::fmt::write
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libcore\fmt\mod.rs:1028
4: std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\io\mod.rs:1412
5: std::sys_common::backtrace::_print
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\sys_common\backtrace.rs:64
6: std::sys_common::backtrace::print
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\sys_common\backtrace.rs:49
7: std::panicking::default_hook::{{closure}}
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panicking.rs:196
8: std::panicking::default_hook
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panicking.rs:210
9: std::panicking::rust_panic_with_hook
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panicking.rs:473
10: std::panicking::continue_panic_fmt
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panicking.rs:380
11: std::panicking::rust_begin_panic
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panicking.rs:307
12: core::panicking::panic_fmt
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libcore\panicking.rs:84
13: core::result::unwrap_failed
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libcore\result.rs:1165
14: core::result::Result<nickel_postgres::middleware::PostgresMiddleware, alloc::boxed::Box<Error>>::unwrap<nickel_postgres::middleware::PostgresMiddleware,alloc::boxed::Box<Error>>
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\src\libcore\result.rs:933
15: adbi_online::main
at .\src\main.rs:29
16: std::rt::lang_start::{{closure}}<()>
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\src\libstd\rt.rs:64
17: std::rt::lang_start_internal::{{closure}}
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\rt.rs:49
18: std::panicking::try::do_call<closure-0,i32>
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panicking.rs:292
19: panic_unwind::__rust_maybe_catch_panic
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libpanic_unwind\lib.rs:80
20: std::panicking::try
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panicking.rs:271
21: std::panic::catch_unwind
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\panic.rs:394
22: std::rt::lang_start_internal
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\/src\libstd\rt.rs:48
23: std::rt::lang_start<()>
at /rustc/032a53a06ce293571e51bbe621a5c480e8a28e95\src\libstd\rt.rs:64
24: main
25: invoke_main
at d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
26: __scrt_common_main_seh
at d:\agent\_work\2\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
27: BaseThreadInitThunk
28: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
By the way I am on Windows.
from nickel.rs.
To clarify, under Windows, with wifi off, the following fails as above:
let mut server = Nickel::new();
server.listen("127.0.0.1:5010");
but this would work?
let mut server = Nickel::new();
server.listen("localhost:5010");
This is rather puzzling. What version of windows are you using? I presume turning the wifi back on fixes this?
from nickel.rs.
I found out the issue. It was one of my custom middleware
that tried to access the internet and thus caused errors when I tried to register it. After removing it everything works. Sorry :)
from nickel.rs.
Related Issues (20)
- Access Request Params and Body HOT 2
- Create Regex Matching Example HOT 2
- Matcher has problem matching text HOT 4
- Router cannot match while the HTTP Path is AbsoluteUri
- StaticFilesHandler from binary resource HOT 12
- How to use handler in impl HOT 6
- How to handle form body ? HOT 2
- Missing .head() method in Nickel::router() HOT 5
- How to use an handler with self ? HOT 5
- How to change the Server response header ? HOT 2
- How tu set utf-8 ? HOT 10
- About https and hyper-openssl HOT 2
- What is the good threads count to setup ?
- EventSource Server
- Guidance Serving ReactJS SPA HOT 1
- Wildcards break on encountering the @ symbol HOT 2
- Hello World Code Gives Scary Warning! HOT 4
- "Finalizer" middleware
- What happened to this masterpiece? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nickel.rs.