Phantom JS Karma runner connects but doesn't execute tests in C9.io - karma-runner

I followed the directions as per the Karma website to run Karma in the Cloud9 IDE (http://karma-runner.github.io/0.10/plus/cloud9.html)
my karma.config correctly contains:
hostname: process.env.IP,
port: process.env.PORT,
runnerPort: 0,
my terminal output:
Running "karma:test" (karma) task
INFO [karma]: Karma v0.10.10 server started at http://0.0.0.0:8080/
INFO [launcher]: Starting browser PhantomJS
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start PhantomJS again.
I am able to see the words "Karma starting..." at
http://..c9.io/
However, I receive the following error logged in my console:
Mixed Content: The page at 'https://test-raptoria.c9.io/?
_c9_id=livepreview24&_c9_host=https://ide.c9.io' was loaded
over HTTPS, but requested an insecure XMLHttpRequest
endpoint http://test-raptoria.c9.io/socket.io/
EIO=3&transport=polling&t=1426358810471-0'. This
request has been blocked; the content must be served over HTTPS.
Any ideas on how to fix this?? It seems like the requests are being blocked..
I've shared my workspace here:
https://ide.c9.io/raptoria/test
Thank you!

Could you try to change the request to socket.io to https? If that is not possible, Try loading the test-raptoria.c9.io with http instead of https.

I downloaded my entire workspace from test (without the data folder and dependencies), and created a new one called simple. I ran 'grunt test' again and it works. I must've corrupted my old workspace somehow.
Problem solved!
Thanks for helping me look into this.

Related

Can log4js-node run in a karma-browserify set up?

I am trying to learn Node test-driven frameworks.
I figured I should include a logging system, but can't seem to get it to work.
yourself#BDD0:~/BDD/simplest$ npm run test-browser
> simplest#1.0.0 test-browser /home/yourself/BDD/simplest
> ./node_modules/karma/bin/karma start
INFO [framework.browserify]: registering rebuild (autoWatch=true)
INFO [karma]: Karma v0.12.28 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 39.0.2171 (Linux)]: Connected on socket p0GQRPZBeIOsd2Uz1e0p with id 97681222
INFO [framework.browserify]: 103086 bytes written (2.52 seconds)
INFO [framework.browserify]: bundle built
Chrome 39.0.2171 (Linux) ERROR
Uncaught Error: Problem reading log4js config { appenders: [ { type: 'console' } ], replaceConsole: false }.
Error was "Cannot find module 'console'" (Error: Cannot find module 'console'
at s (/tmp/9e6dc093e0e34f105c98657867f51cb8bdd77edf.browserify:1:156)
: :
: :
I'm hoping someone recognizes the error and can tell me what it means.
The Chrome browser has a console. I have nodejs-console in my dependencies.
Am I trying something that log4js cannot do?
Thanx.
Ok I got it to work.
I found it necessary to clone the log4js project and edit log4js.js, in order to add a single line :
require('./appenders/console');
I have posted a Pull Request for my solution : Force bundling of appenders/console
I have created a little demo that shows it in action : javascript-bdd-baby-steps
Possibly my pull request will be rejected with a description of the correct solution. If so I will update here.
I hope this helps someone somewhere someday.
Update 2015/04/20:
My PR was accepted.

ATG Commerce v11 CRS install Error:

I have installed Oracle ATG v11 with the commerce reference store, when I startup the production server and go to the url domain/crs/storeus I see the blank white page, and have the following error in the console:
Oct 13, 2014 1:56:37 PM com.endeca.infront.site.SiteManager getSite
SEVERE: Unable to retrieve site definition for site id: /storeSiteUS
com.endeca.store.exceptions.PathNotFoundException: No node found at
path: [pages].
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:153)
at com.endeca.store.configuration.InternalNode.getNodeInfo(InternalNode.java:221)
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:150)
at com.endeca.store.configuration.InternalNode.getNode(InternalNode.java:61)
........................................
**** Error Mon Oct 13 13:00:47 +00:00 2014 1413205247448 /atg/endeca/assembler/droplet/InvokeAssembler A problem occurred
assembling the content for content item /content/Web/Home Pages. The
response received was {#type=ContentSlot,
atg:currentSiteProductionURL=/crs/storeus,
canonicalLink=com.endeca.infront.cartridge.model.NavigationAction#2b35e9c6,
ruleLimit=1, #error=com.endeca.infront.content.ContentException:
com.endeca.navigation.ENEConnectionException: Error establishing
connection to retrieve Navigation Engine request
http://localhost:15000/graph?node=0&profiles=sitegroup.siteGroupUS|NoPriceRange|site.storeSiteUS&offset=0&nbins=0&irversion=640'.
Tried all: '2' addresses, but could not connect over HTTP to server:
'localhost', port: '15000' Check MDEX Logs and specified query
parameters. , contentCollection=/content/Web/Home Pages}. Servicing
the error open parameter.
I am assuming this error is related to endeca? I have downloaded CAS, Tools And Frameworks with experience manager and MDX, and Platform Services. Do I need to start these or have I missed a part of the endeca install?
The value of the configurationPath attribute in the DefaultFileStoreFactory.properties located at \localconfig\atg\endeca\assembler\cartridge\manager may be incorrect.
In OOTB CRS, we normally provide the following value for configurationPath attribute :
/ToolsAndFrameworks/11.1.0/server/workspace/state/repository/CRS
Could you please verify the .zip is present at path provided in DefaultFileStoreFactory.properties.
Just check if you are able to connect the below url:
host:15000/admin?op=stats
If you are able to connect this URL, then MDEX is running. Also, you can login to the experience manager and check if the dgraphs and dgidx are running.
If you are not able to connect then check all the services are(tools and http) running and accessible. You can check the endeca logs to debug further.
Your DGraph is not (yet) started.
(Hit this URL in your browser and verify: http://localhost:15000/graph?node=0&profiles=sitegroup.siteGroupUS|NoPriceRange|site.storeSiteUS&offset=0&nbins=0&irversion=640&format=xml)
Possible reasons are:
You did not run baseline update from ATG (from
ProductCatalogSimpleIndexingAdmin dyn/admin component).
You did not run promote content (from your Endeca App's control folder).
Your Services are not working properly (or not started at all). Check that Platform Services and Tools And Frameworks are started.
The solution is to properly define the value for the property configurationPath=E:/Endeca/Apps/CRS/data/workbench/application_export_archive/CRS in "DefaultFileStoreFactory.properties"
If you are using the OS as Windows then define this path as Unix style as shown above.

Cometd in wildfly8.1.0 no response

I'm trying to deploy a project which utilizes Cometd2.9.1 in Wildfly8.1.0.
The project worked in glassfish4.0, however it won't work in wildfly. It can be deployed with no problem, but it stuck after I visit http://localhost:8080/Cometd3/ (Yes, the project name is Cometd3 while I ended up with cometd2.9.1)
It's weird because there is no error or exception message even I enabled debug log.
Because my log is too long to post here and I have completely no idea what is the problem, please download my log file here.
Please note that the log is just stop at
2014-09-17 14:57:09,893 FINE [javax.enterprise.resource.webcontainer.jsf.application] (default task-4) servletPath /faces
2014-09-17 14:57:09,900 FINE [javax.enterprise.resource.webcontainer.jsf.application] (default task-5) servletPath /faces
2014-09-17 14:57:09,907 FINE [javax.enterprise.resource.webcontainer.jsf.application] (default task-6) servletPath /faces
2014-09-17 14:58:44,505 DEBUG [org.jboss.ejb.client.txn] (Periodic Recovery) Send recover request for transaction origin node identifier 1 to EJB receiver with node name 972909-a43sv
And there are no other log after those messages.
What's more,when I say it is stuck, I mean not only the server side stuck, but also the browser, which means the browser is totally white and keep loading page when I open it.
Any thoughts? Thanks!
I can answer only from the CometD side of things.
The logs shows some server-side CometD activity (a LocalSession called echo handshakes), but after that it's like there are no requests to the server, so that CometD has nothing to do and just sits idle.
From your description of the problem looks more like a server problem than a CometD problem.
CometD typically runs very well in Jetty; I would try to deploy your application in Jetty and see how it goes.

Error running hadoop application in Eclipse on Windows

I'm trying to set up an Eclipse environment for developing and debugging hadoop. I'm following Tom White's Definitive Hadoop 3rd ed. What I would like to do is get the MaxTemperature app working locally on my Windows within Eclipse before moving it to my Hortonworks sandbox VM. The comment on page 158 about using the local job runner seems to be what I want. I don't want to set up a full hadoop implementation on Windows. I'm hoping with the right config params I can convince it to run as a java application inside Eclipse.
Windows: 7
Eclipse: Luna
Hadoop: 2.4.0
JDK: 7
When I set the Run configuration for MaxTemperatureDriver (Source code on page 157) to
inputfile outputdir foo (deliberate bogus 3rd parameter)
I get the usage message so I know I'm running my program with those params.
If I remove the bogus third param I get
Exception in thread "main" java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.
at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:120)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:75)
at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1255)
at org.apache.hadoop.mapreduce.Job$9.run(Job.java:1251)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
at org.apache.hadoop.mapreduce.Job.connect(Job.java:1250)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1279)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1303)
at mark.MaxTemperatureDriver.run(MaxTemperatureDriver.java:52)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at mark.MaxTemperatureDriver.main(MaxTemperatureDriver.java:56)
I've tried inserting -conf but it seems to be ignored. There is no error message if I specify a nonexistent path.
I've tried inserting -fs file:/// -jt local, but it makes no difference
I've tried inserting -D mapreduce.framework.name=local
I've tried specifying the input and output with the file: format
Note. I'm not asking about how to configure eclipse to connect to a remote Hadoop installation. I want the application to run within eclipse.
Is this possible? Any ideas?
Additional info:
I turned on debugging. I saw:
582 [main] DEBUG org.apache.hadoop.mapreduce.Cluster - Trying ClientProtocolProvider : org.apache.hadoop.mapred.YarnClientProtocolProvider
583 [main] DEBUG org.apache.hadoop.mapreduce.Cluster - Cannot pick org.apache.hadoop.mapred.YarnClientProtocolProvider as the ClientProtocolProvider - returned null protocol
I'm wondering not why YarnClientProtocolProvider failed, but why it didn't try LocalClientProtocolProvider.
New info:
It seems that this is an issue with Hadoop 2.4.0. I recreated my environment with Hadoop 1.2.1, followed the instructions in
http://gerrymcnicol.com/index.php/2014/01/02/hadoop-and-cassandra-part-4-writing-your-first-mapreduce-job/
added the Windows hack from
http://bigdatanerd.wordpress.com/2013/11/14/mapreduce-running-mapreduce-in-windows-file-system-debug-mapreduce-in-eclipse
and it all started working.
Following blog will be useful.
Running mapreduce in Windows filesystem

Selenium looping through jenkins and permission denied in cli

After struggling to get proper testsuites, I'm now pretty disappointed by the fact that , while following as close as possible this tutorial (pretty straightforward, right ?) Setting up Selenium server on a headless Jenkins CI build machine, Jenkins keeps looping on the current build, outputting :
So I decided to run a selenium build by hand on the ci machine, and got this :
user#machine:/var/log$ export DISPLAY=":99" && java -jar /var/lib/selenium/selenium- server.jar -browserSessionReuse -htmlSuite *firefox http://staging.site.com /var/lib/jenkins/jobs/project/workspace/tests/selenium/testsuite.html /var/lib/jenkins/jobs/project/workspace/logs/selenium.html
24 janv. 2012 19:27:56 org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
19:27:59.927 INFO - Java: Sun Microsystems Inc. 20.0-b11
19:27:59.929 INFO - OS: Linux 3.0.0-14-generic amd64
19:27:59.951 INFO - v2.17.0, with Core v2.17.0. Built from revision 15540
19:27:59.958 INFO - Will recycle browser sessions when possible.
19:28:00.143 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
19:28:00.144 INFO - Version Jetty/5.1.x
19:28:00.145 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
19:28:00.147 INFO - Started HttpContext[/selenium-server,/selenium-server]
19:28:00.147 INFO - Started HttpContext[/,/]
19:28:00.183 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#16ba8602
19:28:00.184 INFO - Started HttpContext[/wd,/wd]
19:28:00.199 INFO - Started SocketListener on 0.0.0.0:4444
19:28:00.199 INFO - Started org.openqa.jetty.jetty.Server#6f7a29a1
HTML suite exception seen:
java.io.IOException: Permission denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:900)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:603)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:287)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:54)
19:28:00.218 INFO - Shutting down...
19:28:00.220 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]
While understanding the output is'nt that hard, finding what to do to remove this issue is.
Any chance you guys already have been facing that kind of stuff ? Thanks
I only just got past these problems myself, but I was able to run your command when I pointed it at my .jar, testSuite and report file. I'm thinking that perhaps the location of your files under,
/var/lib/selenium
could be part of the problem. Try putting them where your user has permission perhaps under
/home/USERNAME/selenium
Other than that the only thing I can say is make sure your .jar, testSuite and report file are valid.
Also (I assume this is an error of copy and paste into stack overflow) but, this part of your command is incorrect
/var/lib/selenium/selenium- server.jar
You are not getting the error I would expect from an incorrect jar location so I assume something was lost when you pasted to stackoverflow.