I built the watsonqa.jar per this tutorial. After running the command:
cf push -m 128M -c "node server.js"
I received the following error
FAILED
Start unsuccessful
TIP: use 'cf logs dialog-tool-hayday100-2147 --recent' for more information
minecraft#minecraft-VirtualBox:~/watsonspigotbluemix$ cf logs dialog-tool-hayday100-2147 --recent
2016-03-11T20:19:57.67-0500 [STG/0] ERR
2016-03-11T20:20:03.86-0500 [STG/28] OUT -----> Uploading droplet (59M)
2016-03-11T20:20:09.69-0500 [DEA/28] OUT Starting app instance (index 0) with guid 7db0f08f-ca12-4c82-9896-12a07e34dfa8
2016-03-11T20:20:21.15-0500 [App/0] ERR module.js:338
2016-03-11T20:20:21.15-0500 [App/0] ERR throw err;
2016-03-11T20:20:21.15-0500 [App/0] ERR ^
2016-03-11T20:20:21.15-0500 [App/0] ERR Error: Cannot find module '/home/vcap/app/server.js'
2016-03-11T20:20:21.15-0500 [App/0] ERR at Function.Module._resolveFilename (module.js:336:15)
2016-03-11T20:20:21.15-0500 [App/0] ERR at Function.Module._load (module.js:278:25)
2016-03-11T20:20:21.15-0500 [App/0] ERR at Function.Module.runMain (module.js:501:10)
2016-03-11T20:20:21.15-0500 [App/0] ERR at startup (node.js:129:16)
2016-03-11T20:20:21.15-0500 [App/0] ERR at node.js:814:3
2016-03-11T20:20:21.15-0500 [App/0] OUT
2016-03-11T20:20:21.26-0500 [DEA/28] ERR Instance (index 0) failed to start accepting connections
2016-03-11T20:20:21.32-0500 [API/1] OUT App instance exited with guid 7db0f08f-ca12-4c82-9896-12a07e34dfa8 payload: {"cc_partition"=>"default", "droplet"=>"7db0f08f-ca12-4c82-9896-12a07e34dfa8", "version"=>"2a5148e5-0020-4817-a52b-21d7a7c01bab", "instance"=>"ca56895fbb5848ae81bb994fe8f5dfdb", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1457745621}
2016-03-11T20:20:21.32-0500 [API/8] OUT App instance exited with guid 7db0f08f-ca12-4c82-9896-12a07e34dfa8 payload: {"cc_partition"=>"default", "droplet"=>"7db0f08f-ca12-4c82-9896-12a07e34dfa8", "version"=>"2a5148e5-0020-4817-a52b-21d7a7c01bab", "instance"=>"ca56895fbb5848ae81bb994fe8f5dfdb", "index"=>0, "reason"=>"CRASHED", "exit_status"=>1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1457745621}
2016-03-11T20:21:20.69-0500 [DEA/147] OUT Starting app instance (index 0) with guid 7db0f08f-ca12-4c82-9896-12a07e34dfa8
Why are you doing: "cf push"? After building watsonqa.jar, you'll need to build docker image, push it to bluemix, and then run it.
Related
i am trying to setup a HA instance of rocket chat on IBM Cloud (Bluemix).
My application nodes are running on Cloud Foundry while I use for the database MongoDB on compose.
I followed this guide:
https://rocket.chat/docs/installation/docker-containers/high-availability-install/
but my application crashes on startup when I am providing the env-var for the oplog db. So my question:
Is there any support for oplog on Mongo on Compose at all?
If yes, how to access the database?
Best
Patrick
UPDATE:
As asked by #kylemclaren here the error logs:
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR
> /app/bundle/programs/server/node_modules/fibers/future.js:313
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR throw(ex);
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR ^
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR MongoError: no
> primary found in replicaset or invalid replica set name
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR at
> /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/replset.js:560:28
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR at
> Server.<anonymous>
> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/replset.js:312:24)
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR at
> Object.onceWrapper (events.js:315:30) 2018-08-07T21:03:29.62+0200
> [APP/PROC/WEB/0] ERR at emitOne (events.js:116:13)
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR at Server.emit
> (events.js:211:7) 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR
> at
> /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:300:14
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR at
> /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18
> 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR at
> _combinedTickCallback (internal/process/next_tick.js:131:7) 2018-08-07T21:03:29.62+0200 [APP/PROC/WEB/0] ERR at
> process._tickCallback (internal/process/next_tick.js:180:9)
You can add oplog support to Compose.io by paying an additional fee.
By logging into your compose.io database you can navigate to the addons section and activate it there.
Good day to all. I have an app in the IBM Cloud running with using the Internet of Things Platform Starter. Since I installed a resource, i.e. API Connect, and made the connection to my app, my app is then not running anymore.
Even I deleted the API Connect and disconnected with my app, my app still cannot work anymore. But the design and information in this app are important for me.
The following is the log for running my app.
2018-02-22T16:24:18.91+0800 [CELL/0] OUT Creating container2018-02-22T16:24:21.13+0800 [CELL/0] OUT Successfully created container
2018-02-22T16:24:46.68+0800 [CELL/0] OUT Starting health monitoring of container
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR /home/vcap/app/node_modules/node-red/node_modules/fs-extra/lib/index.js:3
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR const assign = require('./util/assign')
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR ^^^^^
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR SyntaxError: Use of const in strict mode.
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at exports.runInThisContext (vm.js:73:16)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Module._compile (module.js:443:25)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Object.Module._extensions..js (module.js:478:10)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Module.load (module.js:355:32)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Function.Module._load (module.js:310:12)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Module.require (module.js:365:17)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at require (module.js:384:17)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Object. (/home/vcap/app/node_modules/node-red/red.js:26:10)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Module._compile (module.js:460:26)
2018-02-22T16:24:47.93+0800 [APP/PROC/WEB/0] ERR at Object.Module._extensions..js (module.js:478:10)
2018-02-22T16:24:47.96+0800 [APP/PROC/WEB/0] OUT Exit status 1
2018-02-22T16:24:47.97+0800 [CELL/0] OUT Exit status 0
2018-02-22T16:24:48.02+0800 [CELL/0] OUT Stopping instance f426c44a-11b6-4373-453d-577f
2018-02-22T16:24:48.02+0800 [CELL/0] OUT Destroying container
2018-02-22T16:24:50.77+0800 [CELL/0] OUT Successfully destroyed container
2018-02-22T16:24:54.02+0800 [API/4] OUT Process has crashed with type: "web"
2018-02-22T16:24:54.15+0800 [API/4] OUT App instance exited with guid 54f30301-ef43-4476-9ba6-261ca1c47aae payload: {"instance"=>"f426c44a-11b6-4373-453d-577f", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"APP/PROC/WEB: Exited with status 1", "crash_count"=>67, "crash_timestamp"=>1519287887997896126, "version"=>"8915be08-78b2-4717-808c-aea8b227afe4"}
Please help me and many thanks to you all.
After migrating my Watson IoTP boilerplate application to Diego, it not longer starts. I see this in the log:
[APP/0] OUT Welcome to Node-RED
[APP/0] OUT ===================
[APP/0] OUT 18 Jan 15:43:16 - [info] Node-RED version: v0.15.3
[APP/0] OUT 18 Jan 15:43:16 - [info] Node.js version: v4.6.2
[APP/0] OUT 18 Jan 15:43:16 - [info] Linux 4.4.0-45-generic x64 LE
[APP/0] OUT 18 Jan 15:43:16 - [info] Loading palette nodes
[APP/0] OUT 18 Jan 15:43:18 - [warn] [ibm hdfs in] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument
[APP/0] OUT 18 Jan 15:43:18 - [warn] [ibm hdfs] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument
[APP/0] OUT 18 Jan 15:43:18 - [warn] [ibmpush] Deprecated call to RED.runtime.nodes.registerType - node-set name must be provided as first argument
[APP/0] OUT 18 Jan 15:43:20 - [info] Settings file : /home/vcap/app/bluemix-settings.js
[APP/0] OUT 18 Jan 15:43:20 - [info] Server now running at http://127.0.0.1:`**1880**`/red/
[APP/0] OUT 18 Jan 15:43:20 - [info] Starting flows
[APP/0] OUT 18 Jan 15:43:20 - [info] Started flows
[CELL/0] ERR Timed out after 1m0s: health check never passed.
[CELL/0] OUT Exit status 0
[CELL/0] OUT Destroying container
[API/8] OUT App instance exited with guid ca3f2bbd-ac6e-42ec-8a61-1ff704274c3e payload: {"instance"=>"", "index"=>0, "reason"=>"CRASHED", "exit_description"=>"2 error(s) occurred:\n\n* 1 error(s) occurred:\n\n* Exited with status 4\n* 2 error(s) occurred:\n\n* cancelled\n* process did not exit", "crash_count"=>2, "crash_timestamp"=>1484754267594231230, "version"=>"0361fa77-694c-4e8f-991e-0c52dd0c4c87"}
How can I fix this ?
The problem is that the way apps find the port to bind to has changed with Diego. The VCAP_APP_PORT environment variable is no longer populated by default. To fix it, you need to create a git repo for your app (Overview tab -> Continuous Delivery -> Add GIT). Use jazzhub to edit the bluemix-settings.js file to change
uiPort: process.env.VCAP_APP_PORT
to
uiPort: process.env.PORT
Deploy those changes and the app should start.
I had a similar issue with a npm express app and fixed it without having to edit the bluemix-settings.js file.
Simple remove all references to process.env.VCAP_APP_HOST (no longer a reference in Diego) and change process.env.VCAP_APP_PORT to process.env.PORT.
for example,
var host = 'localhost';
var port = (process.env.PORT || 1337);
app.listen(port, host);
console.log('App started on port ' + port);
You can check to see if your app is running Diego by typing:
cf has-diego-enabled APPNAME
after installing the diego cli tool
cf install-plugin Diego-Enabler -r CF-Community
I also disabled health checks:
cf set-health-check APPNAME none
I'm experimenting the apiDiscovery-1.0 feature with a swagger generated server (exported from editor.swagger.io).
The pom.xml file includes
<swagger-core-version>1.5.9</swagger-core-version>
If I push the generated war without specifying a server.xml file, just the war of my app, I am able to get to http://.eu-gb.mybluemix.net/v1/swagger.json
The same does not happen if I push the war with a server.xml including the
<feature>apiDiscovery-1.0</feature>
In that case I get the following exception when pointing at http://.eu-gb.mybluemix.net/v1/swagger.json
2016-09-21T00:34:15.05+0200 [App/0] ERR [ERROR ] SRVE0777E: Exception thrown by application class 'org.glassfish.jersey.servlet.WebComponent.serviceImpl:489'
2016-09-21T00:34:15.05+0200 [App/0] ERR javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoSuchMethodError: io/swagger/annotations/ApiParam.examples()Lio/swagger/annotations/Example; (loaded from file:/home/vcap/app/.liberty/dev/api/third-party/com.ibm.websphere.appserver.thirdparty.swagger.annotations_1.0.14.jar by org.eclipse.osgi.internal.loader.EquinoxClassLoader#1a477115[com.ibm.websphere.appserver.thirdparty.swagger.annotations:1.0.14.cl160320160831-1555(id=113)]) called from class io.swagger.util.ParameterProcessor$ApiParamWrapper (loaded from file:/home/vcap/app/wlp/usr/servers/defaultServer/apps/servicemanager-jaxrs-server-1.0.0.war/WEB-INF/lib/swagger-core-1.5.9.jar by com.ibm.ws.classloading.internal.AppClassLoader#efe5e076).
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
2016-09-21T00:34:15.05+0200 [App/0] ERR at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1290)
2016-09-21T00:34:15.05+0200 [App/0] ERR at [internal classes]
2016-09-21T00:34:15.05+0200 [App/0] ERR at io.swagger.api.ApiOriginFilter.doFilter(ApiOriginFilter.java:16)
2016-09-21T00:34:15.05+0200 [App/0] ERR at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:207)
2016-09-21T00:34:15.05+0200 [App/0] ERR at [internal classes]
2016-09-21T00:34:15.05+0200 [App/0] ERR Caused by: org.glassfish.jersey.server.ContainerException: java.lang.NoSuchMethodError: io/swagger/annotations/ApiParam.examples()Lio/swagger/annotations/Example; (loaded from file:/home/vcap/app/.liberty/dev/api/third-party/com.ibm.websphere.appserver.thirdparty.swagger.annotations_1.0.14.jar by org.eclipse.osgi.internal.loader.EquinoxClassLoader#1a477115[com.ibm.websphere.appserver.thirdparty.swagger.annotations:1.0.14.cl160320160831-1555(id=113)]) called from class io.swagger.util.ParameterProcessor$ApiParamWrapper (loaded from file:/home/vcap/app/wlp/usr/servers/defaultServer/apps/servicemanager-jaxrs-server-1.0.0.war/WEB-INF/lib/swagger-core-1.5.9.jar by com.ibm.ws.classloading.internal.AppClassLoader#efe5e076).
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.internal.ResponseWriter.rethrow(ResponseWriter.java:278)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.internal.ResponseWriter.failure(ResponseWriter.java:260)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:509)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:334)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
2016-09-21T00:34:15.05+0200 [App/0] ERR at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
2016-09-21T00:34:15.05+0200 [App/0] ERR ... 9 more
2016-09-21T00:34:15.05+0200 [App/0] ERR Caused by: java.lang.NoSuchMethodError: io/swagger/annotations/ApiParam.examples()Lio/swagger/annotations/Example; (loaded from file:/home/vcap/app/.liberty/dev/api/third-party/com.ibm.websphere.appserver.thirdparty.swagger.annotations_1.0.14.jar by org.eclipse.osgi.internal.loader.EquinoxClassLoader#1a477115[com.ibm.websphere.appserver.thirdparty.swagger.annotations:1.0.14.cl160320160831-1555(id=113)]) called from class io.swagger.util.ParameterProcessor$ApiParamWrapper (loaded from file:/home/vcap/app/wlp/usr/servers/defaultServer/apps/servicemanager-jaxrs-server-1.0.0.war/WEB-INF/lib/swagger-core-1.5.9.jar by com.ibm.ws.classloading.internal.AppClassLoader#efe5e076).
If I comment the server.xml line
<feature>apiDiscovery-1.0</feature>
and push again the app, it works, I get back the swagger.json file.
Note that the /ibm/api/explorer does not show the API I defined in my swagger.json. I guess the exception is the root cause.
What I noticed is the version of swagger reported in the exception:
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.NoSuchMethodError: io/swagger/annotations/ApiParam.examples()Lio/swagger/annotations/Example; (loaded from file:/home/vcap/app/.liberty/dev/api/third-party/com.ibm.websphere.appserver.thirdparty.swagger.annotations_1.0.14.jar by
which is different from the build version: 1.5.9.
Any idea? Thanks.
Yes, as of today (09/20/2016), the Swagger annotation version that Liberty's API discovery is using 1.5.3, which is why the exception is being thrown for the newer attributes of ApiParam.
If you compile your application against the Liberty Swagger annotations found at wlp/dev/api/third-party/com.ibm.websphere.appserver.thirdparty.swagger.annotations_1.0.14.jar (you can get this free from wasdev.net by downloading the base WLP zip, and then running "wlp/bin installUtility install apiDiscovery-1.0" on it), OR point your maven dependency to the 1.5.3 repo: https://mvnrepository.com/artifact/io.swagger/swagger-annotations/1.5.3, then you'll see the deltas. After fixing them up you should be able to happily deploy and see them in /ibm/api/explorer.
I will take this feedback to the team to update the jar, so stay tuned for the next few Betas.
I have basic Scala application on Play framework and I try to deploy it to IBM Bluemix. During deployment it shows next:
an instance of the app crashed: failed to accept connections within health check timeout
exit status: -1, CRASHED
My manifest.yml
applications:
- path: ./target/universal/scala-bluemix-1.0-SNAPSHOT.zip
memory: 512M
instances: 1
domain: eu-gb.mybluemix.net
name: TestApp1WithTotalyUniqueName
host: testapp1withtotalyuniquename
disk_quota: 1024M
I have already checked this link: http://blog.ibmjstart.net/2015/10/27/a-play-scala-server-running-on-ibm-bluemix/
Any ideas how to fix it?
Output from console:
2015-11-03T18:30:50.70+0200 [STG/0] OUT -----> Liberty buildpack is done creating the droplet
2015-11-03T18:30:51.31+0200 [STG/0] ERR
2015-11-03T18:31:00.89+0200 [STG/115] OUT -----> Uploading droplet (91M)
2015-11-03T18:31:11.91+0200 [DEA/115] OUT Starting app instance (index 0) with guid b634d704-85f2-4e42-b559-985de67c90ae
2015-11-03T18:31:30.09+0200 [App/0] OUT [info] - play.api.Play - Application started (Prod)
2015-11-03T18:31:30.23+0200 [App/0] OUT [info] - play.core.server.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
2015-11-03T18:32:22.04+0200 [DEA/115] ERR Instance (index 0) failed to start accepting connections
2015-11-03T18:32:22.05+0200 [API/7] OUT App instance exited with guid b634d704-85f2-4e42-b559-985de67c90ae payload: {"cc_partition"=>"default", "droplet"=>"b634d704-85f2-4e42-b559-985de67c90ae", "version"=>"1b3e8d86-501a-4679-9104-9a9dea063ccd", "instance"=>"19d1570c9865486985c6f159a90233dd", "index"=>0, "reason"=>"CRASHED", "exit_status"=>-1, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1446568342}
2015-11-03T18:32:22.07+0200 [App/0] ERR
2015-11-03T18:32:52.39+0200 [DEA/112] OUT Starting app instance (index 0) with guid b634d704-85f2-4e42-b559-985de67c90ae
2015-11-03T18:33:04.31+0200 [App/0] OUT [info] - play.api.Play - Application started (Prod)
2015-11-03T18:33:04.43+0200 [App/0] OUT [info] - play.core.server.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
And this line was missing in manifest.yml:
buildpack: java_buildpack