Error: Unresolved host - is it monsoon, hxcpp or tink?

81 views
Skip to first unread message

der Raab

unread,
Feb 14, 2017, 11:02:27 AM2/14/17
to Haxe
Hi! I tried everything but with the latest version of everything (haxelibs, haxe 3.4.0) I get the **Error: Unresolved host** when I just call this part when build as a static hxcpp version:


try {
    monsoon
= new Monsoon();
    monsoon
.listen( port );
}
catch ( e : Dynamic ) {
   
Sys.println('Unable to serve from port ${port}. Error: ' + e );
   
Sys.println('Trying next port number...');
}


My hxml looks like that:

# JavaScript


# Main class
-main Main


# used haxelibs
#-lib asys
#-lib http-status
#-lib mime
-lib monsoon
-lib monsoon-embed
#-lib path2ereg
#-lib tink_core
#-lib tink_http
#-lib tink_io
#-lib tink_macro
#-lib tink_runloop
#-lib tink_streams
#-lib tink_url


# output file
-cpp ./../../bin/cpp/release/


# remove all unused code
-dce full


# static link
-D static

I tried to find the String "Unresolved host" within monsoon, hxcpp and tink_http and I think the error itself might come from https://github.com/HaxeFoundation/hxcpp/blob/5d3f85072516e7a86968ae1c3b133981cf5b3811/project/libs/common/socket.cpp but I don't know if that's true.

Actually I didn't change anything within my source code but just updated all libs. Is this something I can fix somehow?

Thanks in advance!

Juraj Kirchheim

unread,
Feb 14, 2017, 3:46:36 PM2/14/17
to haxe...@googlegroups.com
There is a chance that it comes from here: https://github.com/haxetink/tink_tcp/blob/master/src/tink/tcp/Server.hx#L131 
Can you try "localhost" or "127.0.0.1" or maybe `null`?

Best,
Juraj

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Hugh

unread,
Feb 14, 2017, 8:01:24 PM2/14/17
to Haxe
I just fixed a bug with host "0.0.0.0" generating this error.

You could patch this file locally, or put a copy of it with priority in your class path, or use an overnight build.

Hugh.

der Raab

unread,
Feb 20, 2017, 10:51:26 AM2/20/17
to Haxe
Thanks Hugh, I patched it locally and it works! Thanks again! :)
Reply all
Reply to author
Forward
0 new messages