Hi,
ok, there are no mappings at all configured. That is the problem.
So I tried to reproduce the problem and yes - it happens here also.
I tracked down the problem and found, why it does not work. It is a bug.
The mappings are read from a singleton instance of the TntConfig and not
from the passed object. That is wrong. I guess I have to remove that
singleton and handle it differently. It was a bad idea to make it a
singleton but not to be consequent. I have to see, how to fix that.
Tommi
Am 26.08.2014 19:03, schrieb Jean-Marc Choulet:
I creates the file log.xml. Now, I have theses logs :
curl http://xxx.xxx.xxx.xxx:9000
<html><body><h1>Error</h1><p>Not Found: vhost: xxx.xxx.xxx.xxx:9000
/</p></body></html>
./myapp
2014-08-26 18:59:19.14340 [19944.140335163934528] DEBUG tntnet.tntnet
- listen on ip port 9000
2014-08-26 18:59:19.14357 [19944.140335163934528] DEBUG
tntnet.listener - listen :9000
2014-08-26 18:59:19.14387 [19944.140335163934528] DEBUG tntnet.tntnet
- worker-process
2014-08-26 18:59:19.14391 [19944.140335163934528] DEBUG tntnet.tntnet
- 1 listeners
2014-08-26 18:59:19.14394 [19944.140335163934528] INFO tntnet.listener
- listen ip= port=9000
2014-08-26 18:59:19.14396 [19944.140335163934528] INFO tntnet.tntnet -
create 5 worker threads
2014-08-26 18:59:19.14398 [19944.140335163934528] DEBUG tntnet.tntnet
- create worker 0
2014-08-26 18:59:19.14408 [19944.140335163934528] DEBUG tntnet.tntnet
- create worker 1
2014-08-26 18:59:19.14414 [19944.140335163934528] DEBUG tntnet.tntnet
- create worker 2
2014-08-26 18:59:19.14417 [19944.140335128004352] DEBUG tntnet.worker
- start thread 140335128004352
2014-08-26 18:59:19.14420 [19944.140335163934528] DEBUG tntnet.tntnet
- create worker 3
2014-08-26 18:59:19.14425 [19944.140335163934528] DEBUG tntnet.tntnet
- create worker 4
2014-08-26 18:59:19.14431 [19944.140335163934528] DEBUG tntnet.tntnet
- start poller thread
2014-08-26 18:59:19.14435 [19944.140335019710208] DEBUG tntnet.worker
- start thread 140335019710208
2014-08-26 18:59:19.14438 [19944.140335163934528] DEBUG tntnet.tntnet
- start timer thread
2014-08-26 18:59:19.14444 [19944.140335002924800] DEBUG tntnet.tntnet
- timer thread
2014-08-26 18:59:19.14449 [19944.140335036495616] DEBUG tntnet.worker
- start thread 140335036495616
2014-08-26 18:59:19.14450 [19944.140335028102912] DEBUG tntnet.worker
- start thread 140335028102912
2014-08-26 18:59:19.14457 [19944.140335119611648] DEBUG tntnet.worker
- start thread 140335119611648
2014-08-26 18:59:39.48712 [19944.140335128004352] DEBUG tntnet.job -
connection accepted from 172.20.252.124
2014-08-26 18:59:39.48723 [19944.140335128004352] DEBUG
tntnet.httpmessage.parser - method=GET
2014-08-26 18:59:39.48725 [19944.140335128004352] DEBUG
tntnet.httpmessage.parser - url=/
2014-08-26 18:59:39.48727 [19944.140335128004352] DEBUG
tntnet.messageheader - User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu)
libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
2014-08-26 18:59:39.48729 [19944.140335128004352] DEBUG
tntnet.messageheader - Host: xxx.xxx.xxx.xxx:9000
2014-08-26 18:59:39.48729 [19944.140335128004352] DEBUG
tntnet.messageheader - Accept: */*
2014-08-26 18:59:39.48733 [19944.140335128004352] INFO tntnet.worker -
request GET / from client 172.20.252.124 user-Agent "curl/7.22.0
(x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4
libidn/1.23 librtmp/2.3" user ""
2014-08-26 18:59:39.48777 [19944.140335128004352] WARN tntnet.worker -
http-Error: 404 Not Found: vhost: xxx.xxx.xxx.xxx:9000 /
2014-08-26 18:59:39.48781 [19944.140335128004352] DEBUG
tntnet.httpreply - sendReply
2014-08-26 18:59:39.48782 [19944.140335128004352] DEBUG
tntnet.httpreply - send data
2014-08-26 18:59:39.48783 [19944.140335128004352] DEBUG
tntnet.httpreply - HTTP/1.1 404 Not Found: vhost: xxx.xxx.xxx.xxx:9000 /
2014-08-26 18:59:39.48786 [19944.140335128004352] DEBUG
tntnet.httpreply - Date: Tue, 26 Aug 2014 16:59:39 GMT
2014-08-26 18:59:39.48787 [19944.140335128004352] DEBUG
tntnet.httpreply - Server: Tntnet/2.3
2014-08-26 18:59:39.48788 [19944.140335128004352] DEBUG
tntnet.httpreply - Content-Length: 86
2014-08-26 18:59:39.48789 [19944.140335128004352] DEBUG
tntnet.httpreply - Content-Type: text/html; charset=UTF-8
2014-08-26 18:59:39.48790 [19944.140335128004352] DEBUG
tntnet.httpreply - Keep-Alive: timeout=15000, max=999
2014-08-26 18:59:39.48790 [19944.140335128004352] DEBUG
tntnet.httpreply - Connection: Keep-Alive
2014-08-26 18:59:39.48791 [19944.140335128004352] DEBUG
tntnet.httpreply - send 86 bytes body
2014-08-26 18:59:39.49804 [19944.140335128004352] DEBUG tntnet.worker
- pass job to poll-thread
2014-08-26 18:59:39.57748 [19944.140335036495616] DEBUG tntnet.worker
- eof
Le 26/08/2014 18:33, Tommi Mäkitalo a écrit :
Hi,
the logging is far too less. The problem is, that logging is
initialized with log_init(). This reads a file "log.xml" or
"log.properties". Initializing logging from tntnet.xml is a little
more complicated. I guess I have to fix that. "app.init(config)"
should initialize logging as well.
For now it is easiest to put the logging configuration into "log.xml".
Tommi
Am 26.08.2014 17:59, schrieb Jean-Marc Choulet:
Ok.
<logger>
<category>tntnet</category>
<level>DEBUG</level>
</logger>
I also changed the port : 8000 to 9000 :
<listener>
<port>9000</port>
</listener>
curl http://xxx.xxx.xxx.xxx:9000
<html><body><h1>Error</h1><p>Not Found: vhost: xxx.xxx.xxx.xxx:9000
/</p></body></html>
./myapp
2014-08-26 17:56:58.37331 [19648.140510530180928] INFO
tntnet.listener - listen ip= port=9000
2014-08-26 17:56:58.37342 [19648.140510530180928] INFO tntnet.tntnet
- create 5 worker threads
2014-08-26 17:57:21.98465 [19648.140510494250752] INFO tntnet.worker
- request GET / from client xxx.xxx.xxx.xxx user-Agent "curl/7.22.0
(x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4
libidn/1.23 librtmp/2.3" user ""
2014-08-26 17:57:21.98512 [19648.140510494250752] WARN tntnet.worker
- http-Error: 404 Not Found: vhost: xxx.xxx.xxx.xxx:9000 /
Le 26/08/2014 17:44, Tommi Mäkitalo a écrit :
Hi,
please increase the log level of category tntnet to DEBUG and
either read the logs or just send them to the list.
<logger>
<category>tntnet</category>
<level>*DEBUG*</level>
</logger>
Tommi
Am 26.08.2014 17:40, schrieb Jean-Marc Choulet:
Hello,
<mappings>
<!-- map / to MyApp@MyApp -->
<mapping>
<target>MyApp</target>
<url>^/$</url>
</mapping>
<!-- map /comp.* or /comp to comp@MyApp -->
<mapping>
<target>$1</target>
<url>^/([^.]+)(\..+)?</url>
</mapping>
</mappings>
I remove '@MyApp' but I always get the same error.
...
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general