Re: [vertx:23848] Digest for vertx@googlegroups.com - 23 updates in 9 topics

54 views
Skip to first unread message

Ramesh Srinivasalu

unread,
Mar 6, 2015, 12:26:38 PM3/6/15
to ve...@googlegroups.com
Hello,

I'm facing issue while deploying the vert.x module using sudo ./bin/vertx runzip /usr/appAccouting-0.4.10-mod.zip
Once I run the above command, If I delete the folder and still i'm able to access the application using url. Could you please provide any scripts to make the deployment more streamlined like this but when I execute this script I get "setupid: no command found."

Could anyone help me write a script to stop/start and assigning the pid and kill before deploying new version? Thanks in advance!.

start on runlevel [2345]
stop on runlevel [016]

setupid useracctmods
setgid useracctmods

chdir /usr/lib/vert.x-2.1M5/

exec authbind ./bin/vertx runzip /usr/local/productdb_deploy/appAccouting-0.4.10-mod.zip

On Fri, Mar 6, 2015 at 12:40 AM, <ve...@googlegroups.com> wrote:
John Troxel <john...@gmail.com>: Mar 05 10:43AM -0800

See https://github.com/jtroxel/mystack
 
vertx run src/main/resources/server.js
- works
mvn vertx:runMod
- hangs after sending payload on the bus
 
Test with curl localhost:8080/ratings
 
Thanks in advance, John
 
On Wednesday, March 4, 2015 at 11:46:04 PM UTC-8, Jez P wrote:
Jez P <mr.n...@gmail.com>: Mar 05 11:10AM -0800

Hmmmm, I'm going to have to faff around with jruby on my machine I think.
All looks fine. Just one thing, not that I think this should make a
difference, but shouldn't ratings.rb be deployed as a worker verticle.
You're doing db writes, which are almost certainly blocking calls.
 
That doesn't really explain why it would be different between a maven run
and a run using vertx run though.
 
On Thursday, March 5, 2015 at 6:43:29 PM UTC, John Troxel wrote:
Jez P <mr.n...@gmail.com>: Mar 05 11:39AM -0800

Hmm, if i just do mvn clean compile vertx:runMod I get connection refused
on 8080, so I'm not even seeing server.js starting correctly.
 
On Thursday, March 5, 2015 at 6:43:29 PM UTC, John Troxel wrote:
Jez P <mr.n...@gmail.com>: Mar 05 11:44AM -0800

The location of your main script in mod.json looks wrong to me. That won't
be where the script will be found following compilation.
 
Furthermore, if you wan to use runMod, you need to compile first to put all
the resources in the right place relative to the classpath,
so you'd need to mvn compile vertx:runMod (if I do this currently I don't
see the http server starting up properly).
 
On Thursday, March 5, 2015 at 6:43:29 PM UTC, John Troxel wrote:
Jez P <mr.n...@gmail.com>: Mar 05 11:54AM -0800

By the way the reason it's failing, I'm pretty sure, is because your rb
file is not being found on the classpath, but the reason for that isn't
clear. I think the problem is that that verticle is (silently) not being
deployed when you run via runMod (which I would normally expect to be
because it's not ending up on the classpath). This means the message is
going onto the event bus but not being picked up and processed
 
On Thursday, March 5, 2015 at 7:44:33 PM UTC, Jez P wrote:
Jez P <mr.n...@gmail.com>: Mar 05 11:55AM -0800

(You shouldn't need src/main/resources littered through your code to make
this stuff work)
 
On Thursday, March 5, 2015 at 7:54:48 PM UTC, Jez P wrote:
Jez P <mr.n...@gmail.com>: Mar 05 12:09PM -0800

Added a little debug output to check what happened when you try to deploy
the ruby verticle:
 
[INFO] CTRL-C to stop server
Mar 05, 2015 8:05:55 PM org.vertx.java.platform.impl.resolver.HttpResolution
INFO: Downloading io.vertx~lang-jruby~2.1.0-final. Please wait...
Mar 05, 2015 8:06:01 PM org.vertx.java.platform.impl.DefaultPlatformManager
INFO: Module io.vertx~lang-jruby~2.1.0-final successfully installed
Deployment failed! org.jruby.embed.EvalFailedException: (LoadError) no such
file to load -- active_record
 
I suspect the ruby module system isn't playing nicely with the vert.x one
when using maven. However, I don't know a lot about using vert.x with ruby,
but the failure is because that file is failing to deploy, because it
references active_record (presumably from a gem, which isn't being picked
up by the maven setup).
 
Sorry I can't help more, but I'm Java/Groovy and have zero handle on how
Ruby gems are supposed to get picked up when using runMod.
 
On Thursday, March 5, 2015 at 7:54:48 PM UTC, Jez P wrote:
John Troxel <john...@gmail.com>: Mar 05 03:34PM -0800

Well that makes sense: when running plain vertx run it uses the gem path
from the current environment, but maven is probably going to want to set up
that path explicitly. Guess I need to re-read the modules and ruby docs to
see how that is done.
 
Can I ask how you got the additional console logging?
 
Thanks for your help.
 
- John
 
On Thursday, March 5, 2015 at 12:09:31 PM UTC-8, Jez P wrote:
John Troxel <john...@gmail.com>: Mar 05 06:17PM -0800

OK removing the relative path of the resources (src/main/resources) worked.
I committed the fix, and made the ruby script a worker as well.
https://github.com/jtroxel/mystack
 
BTW, I did not have to mess with anything classpathy. I believe that,
since vertx is running jruby, the gem path is still read from the
environment. I added a little more on setting up in the README.
 
On Thursday, March 5, 2015 at 3:34:00 PM UTC-8, John Troxel wrote:
Jez P <mr.n...@gmail.com>: Mar 05 11:55PM -0800

Re the extra debug, I added a handler to the deployVerticle call in
server.js to provide extra info about whether the verticle deployed
successfully (not really proper logging but just to see what was going on):-
 
console.log("About to deploy child verticle")
container.deployVerticle('ratings.rb', function(err, deployID) {
if (!err) {
console.log("The verticle has been deployed, deployment ID is " +
deployID);
} else {
console.log("Deployment failed! " + err.getMessage());
}
});
 
This is documented for vert.x 2
at http://vertx.io/core_manual_js.html#getting-notified-when-deployment-is-complete
- verticle deployment is asynchronous.
 
Of course my issue locally was that I didn't have the gem installed, but
maybe just removing the relative path was enough for you, so in fact the
gems were being picked up fine in Maven, and it was just the relative path
issue in your case, so in effect I was looking at a different problem. Glad
you're up and running :)
 
The worker issue would probably not be a problem during dev (where you're
not hitting things hard) but would kill your server as soon as you had more
than a few simultaneous requests so running anything using JDBC as a worker
is pretty much mandatory.
 
On Friday, March 6, 2015 at 2:17:18 AM UTC, John Troxel wrote:
Michael Smolyak <msmo...@gmail.com>: Mar 05 06:54PM -0800

I cloned the vertx-when project and built it locally. To build it I had to
switch from Java 7 to Java 8, which I did. The project is installed locally
as "com.englishtown.vertx:vertx-when:4.0.0-SNAPSHOT".
 
I added this statement to my build.gradle:
compile "com.englishtown.vertx:vertx-when:4.0.0-SNAPSHOT"
 
 

 
I am able to run 'gradle install' or 'gradle fatjar' for my Vert.x
application written in Groovy without any problems.
 
Here is the code, which gives me trouble:
 
package test
import org.vertx.groovy.core.eventbus.Message
import org.vertx.groovy.platform.Verticle
import org.vertx.java.core.Future
import com.englishtown.promises.WhenFactory
import com.englishtown.vertx.promises.WhenVertx
import com.englishtown.promises.When
import com.englishtown.vertx.promises.impl.DefaultWhenVertx
 
class ApplicationVerticle extends Verticle {
 
def start(Future startedResult) {
def config = container.config
 
When when = WhenFactory.createSync();
WhenVertx whenContainer = new DefaultWhenVertx(vertx, when);
...
 
I get a runtime error when trying to run either the ApplicationVerticle or
the entire module.
 
On line When when = WhenFactory.createSync(); I get this error:
 
java.lang.NoClassDefFoundError: javax/inject/Provider
 
I found a post related to this error suggesting adding this line to Vert.x
langs.properties
 
groovy=com.englishtown~vertx-mod-hk2~1.7.0:com.englishtown.vertx.hk2.HK2VerticleFactory
 
Adding this line causes another error when I try to run the Verticle (it
has no effect on the module):
 
java.lang.NoClassDefFoundError: org/vertx/groovy/platform/Verticle
 
What is the proper way of integrating vertx-when with a Vert.x application?
John Troxel <john...@gmail.com>: Mar 05 06:24PM -0800

I have a javascript verticle, and running with mvn vertx:runMod. And I
have "auto-redeploy": true set in the mod.json. Does the system support
reloading of changes in this scenario? If not, is there a way to run it
that will? I'm interested in setting up for rapid development.
 
-John
Eugene Strokin <eug...@strokin.info>: Mar 05 05:04PM -0800

Hello, I have a strange situation. While I'm running my application (Vert.x
2) and checking number of opened files by the process:
 
cd /proc/{my pid}/fd
ls -l | wc -l
 
I see the number is constantly increasing.
 
Most of the files are something like this:
 
ls -l | less
 
lrwx------ 1 root root 64 Mar 5 19:51 999 -> socket:[178198
 
After the number reaches 4096 I'm getting
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:
241)
at io.netty.channel.socket.nio.NioServerSocketChannel.doReadMessages(
NioServerSocketChannel.java:135)
at io.netty.channel.nio.AbstractNioMessageChannel$NioMessageUnsafe.read(
AbstractNioMessageChannel.java:68)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:
511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(
NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:
382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(
SingleThreadEventExecutor.java:116)
at java.lang.Thread.run(Thread.java:745)
 
 
Could you please tell me what it could be? Looks like connections are not
getting closed for some reason.
 
I'm using HttpClient to send requests to other servers, nothing fancy, but
what possibly could lead to such situation?
 
Thank you,
 
Eugene
Witold Szczerba <pljos...@gmail.com>: Mar 06 02:23AM +0100

Hi,
I think you may have a bug in your code. Double check lines 23 to 28 (or
other, it's hard to guess).
Let us know how is your progress with the issue.
 
Regards,
Witold Szczerba
Eugene Strokin <eug...@strokin.info>: Mar 05 08:26PM -0500

I wander how did you get lines 23 or 28? I’m not sure what are you referring to.
 
Eugene Strokin <eug...@strokin.info>: Mar 05 05:59PM -0800

I had to add
request.response().close();
after each
 
request.response().end();
 
and now I see the number of opened file is stable.
 
I found this information here:
 
http://vertx.io/core_manual_java.html
 
But I nether saw it in the examples, here for instance:
 
https://github.com/vert-x/vertx-examples/blob/master/src/raw/java/proxy/ProxyServer.java
 
Looks like after line 51 we should be closing the response:
 
req.response().close()
 
Am I correct?
 
 
 
 
On Thursday, March 5, 2015 at 8:26:57 PM UTC-5, Eugene Strokin wrote:
javadevmtl <java.d...@gmail.com>: Mar 05 04:28PM -0800

I'm working on some sort of platform where we would like to upload and
deploy verticles and have them register on the event bus so we can send to
them as some type "service"
 
Is it possible in vertx 3 to deploy a verticle and any dependency jars
dynamically?
Alexander Lehmann <alex...@gmail.com>: Mar 05 01:49PM -0800

The file is here
https://drive.google.com/file/d/0B4J2ye6tk2EhTmdBM3ltLVd0eE0/edit?usp=sharing
not sure if there is a newer version, Tim has posted a list of features for
the beta version yesterday I think.
 
 
On Tuesday, March 3, 2015 at 1:18:44 AM UTC+1, Łukasz Żeligowski wrote:
javadevmtl <java.d...@gmail.com>: Mar 05 08:22AM -0800

Thanks
bytor99999 <bytor...@gmail.com>: Mar 05 08:00AM -0800

I think we have seen this slightly too. As time goes by in our system, each
new user logging in creates about 5 new Handlers that also get unregistered
when they logout. And gradually over time our memory consumption goes up.
We have caught a number of Hazelcast Memory leaks with our separate data we
store in Hazelcast and have already fixed those, but still see a slight
increase still and haven't found out where, but this could very well be our
last memory leak.
 
I also recall someone else Brian Lalor, who I think found the same thing.
 
I will have someone on my team look at it that is a Hazelcast expert and
see if he can stop it and let you guys know if so or if not.
 
Mark
 
On Wednesday, March 4, 2015 at 9:23:20 PM UTC-8, infrapol...@gmail.com
wrote:
Tim Fox <timv...@gmail.com>: Mar 05 11:12AM

HI Francesco,
 
On 02/03/15 08:22, Francesco Cina wrote:
> size production ready application, which patterns to use, how to
> organise the code etc. I could start investigating this argument,
> creating an example web application, and propose/discuss patterns.
 
We certainly need some end-end examples to go in the examples repo here:
 
https://github.com/vert-x3/vertx-examples
 
I would certainly like to see a "real-world" web app with a real front
end (e.g. using AngularJS) and some database access at the back end.
 
> standard technology like spring. Could the integration with spring be
> part of the aforementioned patterns/application? Is there interest in
> a vertx-spring-boot module?
 
When you say "integrate with Spring" what does that actually mean?
Vert.x 3.0 is a library so should be usable with pretty much any
framework, including Spring directly. Do we need any special
"integration" here?
 
Regarding Spring Boot - perhaps you could elaborate on what you are
thinking here?
 
> an higher abstraction level over vertx3-jdbc (and postgres/mysql) that
> uses a similar mechanism to avoid SQL handwriting and manual resultset
> handling.
 
That's an interesting idea. We have discussed ORMs before on this list -
but I would warn - ORMs are complex beasts, and it's hard to reuse
existing ones because they're generally not non blocking.
 
Deven Phillips <deven.p...@gmail.com>: Mar 05 05:08AM -0800

Tim et. al...
 
We certainly need some end-end examples to go in the examples repo here:
 
> https://github.com/vert-x3/vertx-examples
 
> I would certainly like to see a "real-world" web app with a real front end
> (e.g. using AngularJS) and some database access at the back end.
 
I am working on just such an application right now...
https://github.com/InfoSec812/vertx-nexus-proxy
I started work on the AngularJS UI last night (not yet committed and
pushed). In the end, it will be both a web application and a proxy server
to put in front of a Sonatype Nexus server which will provide token based
authentication for Nexus. The web application will perform authentication
via the proxied Nexus server and will allow for the management of the
tokens. Requests to "/nexus/**" will be proxied to the configured Nexus
server and set the "REMOTE_USER" token where appropriate. Requests to
"/nexus-proxy/**" will provide static content and ReST API endpoints for
working with the tokens. It should be done in a matter of days. I may end
up eventually adding socks.js/vertx-eventbus websockets for communicating
with the backend.
 
 
Cheers,
 
Deven
Gabriele Santomaggio <g.sant...@gmail.com>: Mar 05 06:20AM -0800

Hello to all,
What about AMQP ? could I help?
If yes, I have a few question about that:
1. 1.0 or/and 0.9.1 version?
2: Just a client to distribute jobs or embedded/use also a server ?
 
3: Are you thinking to map address in some way with a routing key?
4: Do you have some guide line/trace/unofficial-document/txt that I can
read?
 
Is it worth it to you?
Have a nice day!
Il giorno lunedì 21 luglio 2014 12:47:28 UTC+2, Tim Fox ha scritto:
> email me privately if you are shy ;) ), and we can hopefully find something
> appropriate for you (based on your skills, interests and how much time you
> have to spare).
 
Il giorno lunedì 21 luglio 2014 12:47:28 UTC+2, Tim Fox ha scritto:
You have received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to vertx+un...@googlegroups.com.



--
With Thanks & Regards,
Ramesh Srinivasalu
Mobile no: 480-685-7096
Reply all
Reply to author
Forward
0 new messages