Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] PathResource warn in 9.3

[head knock] Found the README.TXT, points to the spot installed to, ran with current code, and the answer to the original question is that the 'bad alias' refers to a file on the file system, which is in fact loaded ok on the browser side. Possibly important is that the 'images' dir in the path below is a soft link to another dir. By the way, this being OSX I verified that there is no such file with uppercase letters in the name.

I tracked it down to a PathResource typo for a comparison, filed 472411 - PathResource.checkAliasPath() typo.

Details below.

Thanks,
Bill

The exception:

2015-07-10 18:11:19.729:WARN:oejur.PathResource:qtp1963387170-14: bad alias [/Users/priot/pr/jetty-base/webapps/ROOT/images/img2683a.jpg]
java.lang.IllegalArgumentException
        at sun.nio.fs.UnixPath.getName(UnixPath.java:323)
        at sun.nio.fs.UnixPath.getName(UnixPath.java:43)
at org.eclipse.jetty.util.resource.PathResource.checkAliasPath(PathResource.java:120) at org.eclipse.jetty.util.resource.PathResource.<init>(PathResource.java:169) at org.eclipse.jetty.util.resource.PathResource.addPath(PathResource.java:255) at org.eclipse.jetty.server.handler.ContextHandler.getResource(ContextHandler.java:1611)
   ...

Looking at UnixPath source, it seems that jetty's PathResource is assuming that 'abs' and 'real' have the same number of names, and this is false in this case, possibly owing to the soft linked images dir. The code *tries* to check that they are the same length, but the 'realCount' int is assigned the count of 'abs'.

I'll file a bug - looks like it would be on 'other', seems like there could be a 'util' that this would fall into.



On 7/10/2015 4:15 PM, Bill Ross wrote:
I commented out all the timing-failure tests, and filed a bug on the build as requested (Timeouts in BlockheadClient.readFrames()).

I wonder from the qa perspective if this could be boiled down to one sensitive test on the one point of failure.

Anyway, the build succeeds, but the documentation doesn't tell me what it created. (This is why I tried mvn compile instead of install - there is no mention of what the result is.) There is no build dir, nothing in my home dir, nothing system-installed. There is a target dir with nothing in it but an about.html and a .plxarc file, whatever that is.

What was installed, where?

Thanks,
Bill


On 7/8/2015 10:10 AM, Bill Ross wrote:
Thanks! I tried that a few times, with varying timeout errors as the only thing running on a new machine.
Here are two results.

-------------------------------- try 1

Results :

Tests in error:
WebSocketCloseTest.testFastFail:204 » Timeout Timeout waiting for 1 events (fo... MisbehavingClassTest.testAnnotatedRuntimeOnConnect:115 » Timeout Timeout waiti...

Tests run: 364, Failures: 0, Errors: 2, Skipped: 40

[INFO] Jetty :: Websocket :: Client ....................... SUCCESS [ 22.184 s] [INFO] Jetty :: Websocket :: Servlet Interface ............ SUCCESS [ 1.523 s] [INFO] Jetty :: Websocket :: Server ....................... FAILURE [ 21.499 s]

----------------------------------- try 4

Results :

Tests in error:
TooFastClientTest.testUpgradeWithLargeFrame:168 » Timeout Timeout waiting for ... WebSocketCloseTest.testFastFail:204 » Timeout Timeout waiting for 1 events (f...

Tests run: 364, Failures: 0, Errors: 2, Skipped: 40

------------- looking at testFastFail, common to both:

2015-07-08 09:53:16.497:WARN:oejwc.WebSocketSession:qtp1649320501-574:
java.lang.RuntimeException: Intentional FastFail
at org.eclipse.jetty.websocket.server.WebSocketCloseTest$FastFailSocket.onWebSocketConnect(WebSocketCloseTest.java:134)
 ...

Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.111 sec <<< FAILURE! - in org.eclipse.jetty.websocket.server.WebSocketCloseTest testFastFail(org.eclipse.jetty.websocket.server.WebSocketCloseTest) Time elapsed: 1.074 sec <<< ERROR! java.util.concurrent.TimeoutException: Timeout waiting for 1 events (found 0) at org.eclipse.jetty.toolchain.test.EventQueue.awaitEventCount(EventQueue.java:71) at org.eclipse.jetty.websocket.common.test.BlockheadClient.readFrames(BlockheadClient.java:596) at org.eclipse.jetty.websocket.server.WebSocketCloseTest.testFastFail(WebSocketCloseTest.java:204)

Thanks,
Bill

On 7/8/2015 12:53 AM, Jan Bartel wrote:
Do mvn install at the top level.

cheers
Jan

On 8 July 2015 at 17:45, Bill Ross <ross@xxxxxxxxxxxx> wrote:
Tried a git pull and got only java changes in the last 5 days - still looks
like a broken build -?

Thanks,
Bill


On 7/3/2015 3:23 PM, Bill Ross wrote:

I did a git pull of the current tree, changed the line, tried 'mvn compile'
and got an error on Ant Plugin:

[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 01:41 min
[INFO] Finished at: 2015-07-03T15:15:41-07:00
[INFO] Final Memory: 73M/731M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-dependency-plugin:2.2:copy-dependencies
(copy-lib-deps) on project jetty-ant: Error copying artifact from
/Users/priot/jetty/org.eclipse.jetty.project/jetty-plus/target/classes to /Users/priot/jetty/org.eclipse.jetty.project/jetty-ant/target/test-lib/jetty-plus-9.3.1-SNAPSHOT.jar: /Users/priot/jetty/org.eclipse.jetty.project/jetty-plus/target/classes (Is a
directory) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR]   mvn <goals> -rf :jetty-ant
priot org.eclipse.jetty.project> ls jetty-plus/target
classes/                        maven-status/
generated-sources/              pmd.xml
maven-shared-archive-resources/ pmd_logging_ruleset.xml


On 7/3/2015 2:51 PM, Joakim Erdfelt wrote:

This is the code.

https://github.com/eclipse/jetty.project/blob/jetty-9.3.0.v20150612/jetty-util/src/main/java/org/eclipse/jetty/util/resource/PathResource.java#L59-L136

Maybe if you change line #133 from

LOG.warn("bad alias ({}) for {}", e.getClass().getName(), e.getMessage());

to

LOG.warn("bad alias [" + path + "]", e);

we can get a better stacktrace (and path indication) to know what's going
on.

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
webtide.com - eclipse.org/jetty - cometd.org
Expert advice, services and support from from the Jetty & CometD experts

On Fri, Jul 3, 2015 at 1:36 PM, Bill Ross <ross@xxxxxxxxxxxx> wrote:
It seems this is the first case of this warning on the web:

2015-07-02 13:16:57.019:WARN:oejur.PathResource:qtp1963387170-179: bad
alias (java.lang.IllegalArgumentException) for null

I'm not sure what to make of it. It is associated with a stutter
in the user experience of loading pictures.

I have web page javascript calling a servlet running under jetty
when the user clicks a 'next image' button. The servlet returns
an image file name, and the javascript loads the file via jetty
http, following a soft link ROOT/images->[...]. There is only one
user doing one thing at a time.

I am getting these warnings singly when operation seems ok, and in
clusters when the user hasn't clicked 'next image' for a while. In that
case on the browser side, in conjunction with a cluster of these
warnings, I see several images flip by in less than a second. So
images are being loaded. I need to figure out how to debug from the
javascript side and dig into the jetty source, but since PathResource
appears to be new, it seems this could be of interest.

Setup:

cd /opt/jetty-distribution-9.3.0.v20150612
java -jar start.jar \
     jetty.home=/opt/jetty-distribution-9.3.0.v20150612 \
     jetty.base=[...]/jetty-base

egrep -v '^#' [...]/jetty-base/start.ini|awk 'NF > 0'
--module=server
jetty.threadPool.minThreads=5
jetty.threadPool.maxThreads=50
--module=http
jetty.http.port=8080
jetty.server.stopAtShutdown=true
--module=servlets
--module=deploy
jetty.deploy.monitoredDir=webapps


Thanks,
Bill
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users




_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users




Back to the top