PhantomJS failed to load URL on Jetty running on Jenkins -


i want use siesta testing framework phantomjs on local server , there no problem. worked in http://www.bryntum.com/forum/viewtopic.php?f=20&t=3068 , on machine, there nothing complain about, want combine jenkins.

but using jenkins error 403 appears.

what do:

  • copy files of project in webapps folder of jetty (incl. framework )

  • start jetty server (so far no problems)

  • use phantomjs of framwork on localhost:port/project/index.html

and there problem starts: failed load url: localhost:port/project/index.html(status 403)

i searched results didn't find solves problem.

every hint welcome

thanks

to see i've done:

my jenkins shell script

jetty="jetty-distribution-9.2.0.v20140526" jettyweb="$jetty/webapps" dir="$workspace/$jettyweb/myproject/src/test" phantom="$dir/siesta_framework/bin"  rm -r "$jettyweb/myproject/" mkdir "$jettyweb/myproject/" cp -pr "src/" "$jettyweb/myproject/"  chmod u+x -r $jettyweb/ cd $workspace/$jetty  # start des servers java -dstop.port=11183 -jar start.jar -dstop.key=tadam &  sleep 5   #jenkins "$dir/browse-autmation.html?phantom=true&enablecodecoverage=false&haspreviousreport=false&page=0 cd $phantom  #curl http://localhost:11182/myproject/src/test/browse-automation.html  ./phantomjs "http://127.0.0.1:11182/myproject/src/test/browse-automation.html"  #"http://.../ci/job/test-phatomjs/ws/src/test/browse-automation.html?phantom=true&enablecodecoverage=false&haspreviousreport=false&page=0"    #curl http://127.0.0.1:11182/myproject/src/test/siesta_framework/bin/phantomjs   sleep 15 # stop des servers -dstop.key=tadam  cd $workspace/$jetty java -dstop.port=11183 -dstop.key=tadam -jar start.jar --stop  

and result was:

[envinject] - loading node environment variables. building remotely on ja_lin01 in workspace /var/opt/coinop/data/workspace/test-phatomjs fetching changes remote git repository fetching upstream changes gitlab@moso-ci-srv.novalocal:b.rohn/myproject.git checking out revision a056b4ac6a7b47a4e77f3f80c5b7cbc51167cefc (origin/master) [test-phatomjs] $ /bin/bash -xe /tmp/hudson8419984949815797813.sh + jetty=jetty-distribution-9.2.0.v20140526 + jettyweb=jetty-distribution-9.2.0.v20140526/webapps + dir=/var/opt/coinop/data/workspace/test-phatomjs/jetty-distribution-9.2.0.v20140526/webapps/myproject/src/test + phantom=/var/opt/coinop/data/workspace/test-phatomjs/jetty-distribution-9.2.0.v20140526/webapps/myproject/src/test/siesta_framework/bin + rm -r jetty-distribution-9.2.0.v20140526/webapps/myproject/ + mkdir jetty-distribution-9.2.0.v20140526/webapps/myproject/ + cp -pr src/ jetty-distribution-9.2.0.v20140526/webapps/myproject/ + chmod u+x -r jetty-distribution-9.2.0.v20140526/webapps/ + cd /var/opt/coinop/data/workspace/test-phatomjs/jetty-distribution-9.2.0.v20140526 + sleep 5 + java -dstop.port=11183 -jar start.jar -dstop.key=tadam warning: system properties and/or jvm args set.  consider using --dry-run or --exec 2014-07-01 15:37:10.895:info::main: logging initialized @1014ms 2014-07-01 15:37:12.451:info:oejs.server:main: jetty-9.2.0.v20140526 2014-07-01 15:37:12.480:info:oejdp.scanningappprovider:main: deployment monitor [file:/data/coinop/data/workspace/test-phatomjs/jetty-distribution-9.2.0.v20140526/webapps/] @ interval 1 2014-07-01 15:37:13.232:info:oejsh.contexthandler:main: started o.e.j.w.webappcontext@57cd102a{/myproject,file:/data/coinop/data/workspace/test-phatomjs/jetty-distribution-9.2.0.v20140526/webapps/myproject/,available}{/myproject} 2014-07-01 15:37:13.255:info:oejs.serverconnector:main: started serverconnector@6d622548{http/1.1}{0.0.0.0:11182} 2014-07-01 15:37:13.255:info:oejs.server:main: started @3388ms + cd /var/opt/coinop/data/workspace/test-phatomjs/jetty-distribution-9.2.0.v20140526/webapps/myproject/src/test/siesta_framework/bin + ./phantomjs http://127.0.0.1:11182/myproject/src/test/browse-automation.html /var/opt/coinop/data/workspace/test-phatomjs/jetty-distribution-9.2.0.v20140526/webapps/myproject/src/test/siesta_framework/bin launching phantomjs 1.6.0 @ http://127.0.0.1:11182/myproject/src/test/browse-automation.html failed load url: http://127.0.0.1:11182/myproject/src/test/browse-automation.html?phantom=true&enablecodecoverage=false&haspreviousreport=false&page=0(status: 403) process leaked file descriptors. see http://wiki.jenkins-ci.org/display/jenkins/spawning+processes+from+build more information build step 'execute shell' marked build failure 2014-07-01 15:37:24.931:info:oejs.serverconnector:thread-0: stopped serverconnector@6d622548{http/1.1}{0.0.0.0:11182} finished: failure 

after long searching noticed, phantomjs call doesn't have informations need. needs directory itself. resolution was: install phantomjs on linux server , use phantomjs, including directory , phantom script of framework: works. call is:

./phantomjs "$dir/phantomjs-launcher.js" $dir http://127.0.0.1:11182/myproject/browse-automation.html 

situation: cd in phtomjs directory on linux machine , give "dir" of framework/bin


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -