Closed jaguililla closed 6 years ago
Great information @jaguililla ! I will take a closer look at this today!
@jaguililla After running your resin test, I don't see any resin-web.xml
or web.xml
files in $RESIN_HOME/webapps/ROOT/WEB-INF/
How are you configuring the db / db drivers with resin?
mongodb-java-driver
web.xml
descriptor because the components are configured by annotations (the WAR works ok in my Resin 4.0.49 :)It seems to be failing because of a timeout (does It reach the webapp?). Could it be the network interface of Resin? or the user that started the process? I don't know... just giving ideas.
The only thing I saw different from Tapestry (after I modified the tests locally) was the parent directory of the test (Kotlin
instead Java
)
The parent directory of the framework shouldn't matter here. Clojure/
tests also use resin successfully. The users that start the process for the other frameworks are the same here as well.
I have no clue :( it works in my local resin, but it fails in vagrant-development
Have you made any changes to your local resin conf files?
No, just unzipped Resin and deployed the war
@jaguililla I've tracked this down to an issue in the python requests module. I'm going to look in to making some quick changes. But this does not seem to be related to your framework. I'll ping you when I have more information.
@jaguililla Ok, so a little more digging. I thought it might be an issue with the headers. After looking at some verbose logging from resin, I'm getting headers back from you but the connection is being kept-alive when using python's requests module. However, when testing tapestry, the connection is closing properly.
Upon further inspection it looks like your response is actually disconnecting too fast. I'm not getting the entire response before the connection is closed. Below are two verbose curl
responses. Every time your connection closes before getting the final }
vagrant@TFB-all:~$ curl -v http://127.0.0.1:8080/tapestry/hellojson
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /tapestry/hellojson HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 200 OK
* Server Resin/4.0.48 is not blacklisted
< Server: Resin/4.0.48
< Content-Type: application/json; charset=UTF-8
< Transfer-Encoding: chunked
< Date: Thu, 29 Dec 2016 18:29:23 GMT
<
* Connection #0 to host 127.0.0.1 left intact
{"message":"Hello, World!"}
vagrant@TFB-all:~$ curl -v http://127.0.0.1:8080/json
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /json HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 200 OK
* Server Servlet/3.1 is not blacklisted
< Server: Servlet/3.1
< Transfer-Encoding: chunked
< Content-Type: application/json
< Transfer-Encoding: chunked
< Date: Thu, 29 Dec 2016 18:34:37 GMT
<
{
"message" : "Hello, World!"
* Connection #0 to host 127.0.0.1 left intact
}
Regarding this problem, when I run curl -v http://127.0.0.1:8080/json >output.json
the output.json
file contains a valid response (done from the Resin directory with vagrant
user in the Vagrant development machine).
@jam-walkers For the hexagon-resin test? Can you please create a sprunge
or other of your output from running that test? And what commit are you running it from, since the test no longer exists in the repo.
The previous comment was me using a different account, sorry. The test I ran was over the latest version from master adding the test to the configuration manually.
On the Vagrant development machine. Running: ~/FrameworkBenchmarks/toolset/run-tests.py --mode verify --test hexagon-resin
failed
But running Resin outside the toolkit it worked:
RESIN_HOME="/home/vagrant/FrameworkBenchmarks/installs/resin-4.0.48" /home/vagrant/FrameworkBenchmarks/installs/resin-4.0.48/bin/resinctl start
After starting up Resin. I executed:
curl -s http://127.0.0.1:8080/fortunes >>out.log && curl -s http://127.0.0.1:8080/db >>out.log && cat out.log
And the result was:
<!DOCTYPE html>
<html>
<head>
<title>Fortunes</title>
</head>
<body>
<table>
<tr>
<th>id</th>
<th>message</th>
</tr>
<tr>
<td>11</td>
<td><script>alert("This should not be displayed in a browser alert box.");</script></td>
</tr>
<tr>
<td>4</td>
<td>A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1</td>
</tr>
<tr>
<td>5</td>
<td>A computer program does what you tell it to do, not what you want it to do.</td>
</tr>
<tr>
<td>2</td>
<td>A computer scientist is someone who fixes things that aren't broken.</td>
</tr>
<tr>
<td>8</td>
<td>A list is only as strong as its weakest link. — Donald Knuth</td>
</tr>
<tr>
<td>0</td>
<td>Additional fortune added at request time.</td>
</tr>
<tr>
<td>3</td>
<td>After enough decimal places, nobody gives a damn.</td>
</tr>
<tr>
<td>7</td>
<td>Any program that runs right is obsolete.</td>
</tr>
<tr>
<td>10</td>
<td>Computers make very fast, very accurate mistakes.</td>
</tr>
<tr>
<td>6</td>
<td>Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen</td>
</tr>
<tr>
<td>9</td>
<td>Feature: A bug with seniority.</td>
</tr>
<tr>
<td>1</td>
<td>fortune: No such file or directory</td>
</tr>
<tr>
<td>12</td>
<td>フレームワークのベンチマーク</td>
</tr>
</table>
</body>
</html>
{
"id" : 1402,
"randomNumber" : 252
}
Which seems good. This was with vagrant
user. Any clue?
@jaguililla Can you do the same with verbos, -v
, output for curl
? I'm at a loss here, but I want to see what that shows as far as the connection goes.
This is the output with -vvv
(and thanks for keeping an eye in this issue):
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /fortunes HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 200 OK
* Server Servlet/3.1 is not blacklisted
< Server: Servlet/3.1
< Cache-Control: private
< Transfer-Encoding: chunked
< Set-Cookie: JSESSIONID=aaaPvj0REhS6TezwLhVNv; path=/
< Content-Type: text/html; charset=UTF-8
< Transfer-Encoding: chunked
< Date: Mon, 30 Jan 2017 14:04:16 GMT
<
{ [data not shown]
100 1491 0 1491 0 0 423k 0 --:--:-- --:--:-- --:--:-- 485k
* Connection #0 to host 127.0.0.1 left intact
<!DOCTYPE html>
<html>
<head>
<title>Fortunes</title>
</head>
<body>
<table>
<tr>
<th>id</th>
<th>message</th>
</tr>
<tr>
<td>11</td>
<td><script>alert("This should not be displayed in a browser alert box.");</script></td>
</tr>
<tr>
<td>4</td>
<td>A bad random number generator: 1, 1, 1, 1, 1, 4.33e+67, 1, 1, 1</td>
</tr>
<tr>
<td>5</td>
<td>A computer program does what you tell it to do, not what you want it to do.</td>
</tr>
<tr>
<td>2</td>
<td>A computer scientist is someone who fixes things that aren't broken.</td>
</tr>
<tr>
<td>8</td>
<td>A list is only as strong as its weakest link. — Donald Knuth</td>
</tr>
<tr>
<td>0</td>
<td>Additional fortune added at request time.</td>
</tr>
<tr>
<td>3</td>
<td>After enough decimal places, nobody gives a damn.</td>
</tr>
<tr>
<td>7</td>
<td>Any program that runs right is obsolete.</td>
</tr>
<tr>
<td>10</td>
<td>Computers make very fast, very accurate mistakes.</td>
</tr>
<tr>
<td>6</td>
<td>Emacs is a nice operating system, but I prefer UNIX. — Tom Christaensen</td>
</tr>
<tr>
<td>9</td>
<td>Feature: A bug with seniority.</td>
</tr>
<tr>
<td>1</td>
<td>fortune: No such file or directory</td>
</tr>
<tr>
<td>12</td>
<td>フレームワークのベンチマーク</td>
</tr>
</table>
</body>
</html>
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /db HTTP/1.1
> User-Agent: curl/7.35.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 200 OK
* Server Servlet/3.1 is not blacklisted
< Server: Servlet/3.1
< Transfer-Encoding: chunked
< Content-Type: application/json
< Transfer-Encoding: chunked
< Date: Mon, 30 Jan 2017 14:04:16 GMT
<
{ [data not shown]
100 42 0 42 0 0 15069 0 --:--:-- --:--:-- --:--:-- 21000
* Connection #0 to host 127.0.0.1 left intact
{
"id" : 6221,
"randomNumber" : 4429
}
That's looks different from the response I was getting. If you have the time, go ahead and open up a PR with the resin test added back in and I'll see if I can wrangle some people here in to look at it again.
Done (#2531)
Resolved by #2531
@knewmanTE @nbrady-techempower @LadyMozzarella This is the issue for the problem with PR #2421
Description
The standalone test of Hexagon is working, however, the Resin one is not working.
Tapestry Resin test is working so I trimmed my test to be as close as possible to theirs.
Even in that case the test fail (timeout connecting to Resin:
127.0.0.1:8080
).I downloaded the generated WAR and it worked fine in a local Resin (4.0.49 on Linux).
I changed the
hexagon
directory permissions and addeda+w
(like in Tapestry) just in case.One difference between woking Resin tests and Hexagon's is the fact that they live in different directories (
Java
andKotlin
) I do not know if this makes a difference.I made changes in my development vagrant machine. So the latest test details are below:
Setup
Building
Execution
Resin logs
If you need any other info, just write me