Failed to start Quarkus application - startup

I have moved my Quarkus app to a new env and it will not start there. It works localy and on a AzureVM.
I have started the application with :quarkus.debug.print-startup-times
stackTrace :
2022-02-22 11:02:29,889 Build step LoggingResourceProcessor.setupLoggingStaticInit completed in: 5ms
2022-02-22 11:02:29,895 Build step HttpSecurityProcessor.setupAuthenticationMechanisms completed in: 2ms
2022-02-22 11:02:29,899 Build step VertxCoreProcessor.ioThreadDetector completed in: 4ms
2022-02-22 11:02:29,900 Build step BlockingOperationControlBuildStep.blockingOP completed in: 0ms
2022-02-22 11:02:29,911 Build step MutinyProcessor.buildTimeInit completed in: 10ms
2022-02-22 11:02:29,953 Build step QuarkusSecurityCommonProcessor.registerPasswordProvider completed in: 41ms
2022-02-22 11:02:29,957 Build step DataSourcesExcludedFromHealthChecksProcessor.produceBean completed in: 3ms
2022-02-22 11:02:29,985 Build step SmallRyeOpenApiProcessor.classLoaderHack completed in: 28ms
2022-02-22 11:02:29,992 Build step SmallRyeContextPropagationProcessor.buildStatic completed in: 6ms
2022-02-22 11:02:29,994 Build step SmallRyeHealthProcessor.build completed in: 1ms
2022-02-22 11:02:29,995 Build step AgroalProcessor.generateDataSourceSupportBean completed in: 0ms
2022-02-22 11:02:29,995 Build step NativeImageConfigBuildStep.build completed in: 0ms
2022-02-22 11:02:29,998 Build step SecurityProcessor.gatherSecurityChecks completed in: 2ms
2022-02-22 11:02:29,999 Build step SyntheticBeansProcessor.initStatic completed in: 0ms
2022-02-22 11:02:30,022 Build step SmallRyeMetricsProcessor.registerMetricsFromAnnotatedMethods completed in: 22ms
2022-02-22 11:02:30,198 Build step ArcProcessor.generateResources completed in: 176ms
2022-02-22 11:02:30,201 Build step ResteasyCommonProcessor.setupResteasyInjection completed in: 2ms
2022-02-22 11:02:30,204 Build step SmallRyeMetricsProcessor.build completed in: 3ms
2022-02-22 11:02:30,335 Build step ResteasyStandaloneBuildStep.staticInit completed in: 130ms
2022-02-22 11:02:30,340 Build step SmallRyeMetricsProcessor.createRoute completed in: 4ms
2022-02-22 11:02:30,358 Build step BootstrapConfigSetupBuildStep.setupBootstrapConfig completed in: 16ms
2022-02-22 11:02:30,359 Build step QuarkusSecurityCommonProcessor.registerPasswordProviderForNative completed in: 0ms
2022-02-22 11:02:30,360 Build step NettyProcessor.eagerlyInitClass completed in: 0ms
2022-02-22 11:02:30,361 Build step VertxCoreProcessor.createVertxThreadFactory completed in: 0ms
2022-02-22 11:02:30,361 Build step VertxCoreProcessor.createVertxContextHandlers completed in: 0ms
2022-02-22 11:02:30,362 Build step SmallRyeMetricsProcessor.dropRegistriesAtShutdown completed in: 0ms
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/oas/rekvirent/quarkus-app/lib/main/org.jboss.slf4j.slf4j-jboss-logmanager-1.1.0.Final.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/oas/rekvirent/quarkus-app/lib/main/ch.qos.logback.logback-classic-1.2.9.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Slf4jLoggerFactory]
2022-02-22 11:02:30,786 Build step VaultProcessor.init completed in: 424ms
2022-02-22 11:02:30,796 Build step SmallRyeMetricsProcessor.registerBaseAndVendorMetrics completed in: 9ms
Feb 22, 2022 11:02:29 AM io.quarkus.config
WARN: Unrecognized configuration key "%s" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo
Feb 22, 2022 11:02:30 AM org.jboss.resteasy.resteasy_jaxrs.i18n
INFO: RESTEASY002225: Deploying javax.ws.rs.core.Application: class MyDemoApplication
Feb 22, 2022 11:02:30 AM io.netty.resolver.dns.DefaultDnsServerAddressStreamProvider
WARN: Default DNS servers: [/8.8.8.8:53, /8.8.4.4:53] (Google Public DNS as a fallback)
Feb 22, 2022 11:02:31 AM io.quarkus.runtime.ApplicationLifecycleManager run
ERROR: Failed to start application (with profile prod)
java.net.ConnectException: Connection refused
at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:710)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:658)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:584)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:496)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Unknown Source)
The new env does not have have Connection to internet , could that be a problem ?

Related

Completed 500 Internal Server Error in 112ms (MongoDB: 0.0ms) using rails version '5.2.4' error in ssl

Completed 500 Internal Server Error in 112ms (MongoDB: 0.0ms
Errno::ECONNRESET: Connection reset by peer - SSL_connect

Error CordovaModuleLoadError - multi device hybrid app in visual studio

I am following the steps here and here to build and simulate a multi device hybrid app in ios.
I followed the steps in the articles and I can see that when I run my multi device hybrid app in visual studio using iphone simulator as the run target, the connected mac device response to the build request. However, the mac terminal will end the build process with the following build error:
Done building 5116: error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
And here is the full terminal output:
IBRAHIM-ALHUSSAINs-Mac-mini:cordova IBRAHIMALHUSSAIN$ vs-mda-remote --secure false
vs-mda-remote
Copyright (C) 2014 Microsoft Corporation. All rights reserved.
0.2.11
Loading resources for language en from /usr/local/lib/node_modules/vs-mda-remote/resources/en/resources.json
Build Retention initialized with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds, maxBuildsToKeep 20
Initialized BuildManager with baseBuildDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds; maxBuildsInQueue 10; deleteBuildsOnShutdown true; allowsEmulate true; nextBuildNumber 5115
Remote build server listening on [http] port 3000
ios-sim is installed on path at: /usr/local/lib/node_modules/vs-mda-remote/node_modules/ios-sim/build/release/ios-sim
New build request submitted:
/build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release
{ 'accept-language': 'en-US',
host: '192.168.1.11:3000',
connection: 'keep-alive',
'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 3.5.0-0.2.4; buildCommand: build; configuration: release
Build will be executed under: /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saving build request payload to : /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116
Saved upload to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz
Extracting /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/upload_5116.tgz to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp...
POST /build/tasks?command=build&vcordova=3.5.0-0.2.4&cfg=release 202 1279ms - 529b
GET /build/tasks/5116 200 3ms - 529b
Extracted app contents from uploaded build request to /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp. Requesting build.
Taking 5116 as current build
Building cordova app B8ak بيتك at appDir /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/cordovaApp
Opened build log file /Users/IBRAHIMALHUSSAIN/remote-builds/builds/5116/build.log
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 2ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 0ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
GET /build/tasks/5116 200 1ms - 625b
Done building 5116 : error CordovaModuleLoadError [ '3.5.0-0.2.4' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/5116 200 2ms - 667b
GET /build/tasks/5116/log 200 4ms
This indicates you are using CTP2 of tools for Apache Cordova. Moving to CTP3.1 or VS 2015 RC should resolve your issue.
VS 2015 will also allow you to select the version of Cordova you use though you could see problems with a year old release like Cordova 3.5.0. The default in VS 2015 of 4.3.0 should be compatible and contains numerous bug fixes including security improvements.
VS 2015 will be the supported version of Tools for Apache Cordova. Previous releases were only technology previews.

Rails shows incorrect time spent in a request

When I do-
$ time curl 'http://localhost:3000'
I get this: 0.00s user 0.00s system 0% cpu 1.270 total
Gem 'rack-mini-profiler' also show time taken almost same as curl.
But in the rails log, I see-
Completed 200 OK in 103ms (Views: 72.7ms | ActiveRecord: 5.0ms)
Why there is time difference of about 1 second?
Curl and rails server both are running on my development machine.
"time curl" is timing how long the curl client takes to fetch Rails content, ie it's the client time.
The Rails log is showing you the server time.
You did not specify that but if you are running development mode, there is classes reloading and assets compilation, which heavily impacts response time. But it does not affect production.
Here is what I got in my rails 4.2 application (first curl, than corresponding excerpts from log):
curl 'http://localhost:3000' 0.01s user 0.00s system 0% cpu 1.817 total
curl 'http://localhost:3000' 0.01s user 0.00s system 2% cpu 0.366 total
Completed 200 OK in 1254ms (Views: 1206.2ms | ActiveRecord: 13.9ms)
127.0.0.1 - - [04/Oct/2014:19:48:52 +0200] "GET / HTTP/1.1" 200 - 1.6863
Completed 200 OK in 279ms (Views: 278.7ms | ActiveRecord: 0.0ms)
127.0.0.1 - - [04/Oct/2014:19:49:41 +0200] "GET / HTTP/1.1" 200 - 0.2895
While in production:
curl 'http://localhost:3000' 0.01s user 0.00s system 3% cpu 0.329 total
curl 'http://localhost:3000' 0.00s user 0.01s system 11% cpu 0.090 total
I, [2014-10-04T19:54:02.739988 #27830] INFO -- : Completed 200 OK in 143ms (Views: 123.0ms | ActiveRecord: 6.3ms)
I, [2014-10-04T19:54:17.521175 #27830] INFO -- : Completed 200 OK in 41ms (Views: 40.9ms | ActiveRecord: 0.0ms)
So differences persist there, but it's probably due to time for send request from curl to server and then to receive the response. I still think that bigger differences in development are caused by reloading and compiling.

Unknown slow process of requests

The behaviour is: the browser hangs keep loading without any response back.
Please see the following log.
I, [2014-07-16T14:14:09.766062 #11713] INFO -- : Started GET "/somepage" for xxx.xxx.xxx.xxx at 2014-07-16 14:14:09 +0800
I, [2014-07-16T14:14:40.872411 #31111] INFO -- : Started GET "/" for yyy.yyy.yyy.yyy at 2014-07-16 14:14:40 +0800
I, [2014-07-16T14:14:40.874968 #31111] INFO -- : Processing by HomeController#index as */*
I, [2014-07-16T14:14:40.893189 #31111] INFO -- : Rendered ...
I, [2014-07-16T14:14:40.901553 #31111] INFO -- : Completed 200 OK in 26ms (Views: 22.5ms | ActiveRecord: 2.6ms)
... more other requests handled normally
I, [2014-07-16T14:29:35.395493 #11713] INFO -- : Processing by HomeController#somepage as HTML
I, [2014-07-16T14:29:35.403614 #11713] INFO -- : Rendered home/somepage.html.erb (1.5ms)
I, [2014-07-16T14:29:35.403762 #11713] INFO -- : Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.5ms)
In between the "Started GET ..." and "Processing by" logs, the rails app can handle other requests normally. However, the 2 logs (should be from the same request) have around 15mins gap.
Server: Apache with passenger
Database: Mysql using mysql2 adapter
I completely lost and have no clues what is the root cause....
I faced this similar kind of issue where the browser kept on loading with no logs in the log file.And what i found out was that we have mistakenly written find.all in one of our model as during testing it only had 1000 records as compared to production with more than 1 million records.so changing it to batch records/pagination resolved it.
...........Hope this might help you.

Empty HTML in production

Rails is returning blank HTML when running in production.
The tests I describe bellow are done with the following line: wget http://localhost:3000/login -O here.txt ; cat here.txt. I expect see some HTML being output after executing it.
On my server, I can see the HTML being rendered when I start rails in development mode, using the command rails s. I can see the following in the log:
Started GET "/login" for 127.0.0.1 at 2013-08-21 18:30:32 +0000
Processing by UserSessionsController#new as */*
Rendered user_sessions/_login.html.haml (59.5ms)
Rendered user_sessions/new.html.haml within layouts/application (62.8ms)
Compiled bootstrap-datepicker.css (0ms) (pid 8050)
Compiled application.css (4ms) (pid 8050)
Compiled bootstrap.min.css (0ms) (pid 8050)
# lots of Compiled lines
Rendered layouts/_navigation.html.haml (3.2ms)
Rendered layouts/_messages.html.haml (1.0ms)
Completed 200 OK in 1404ms (Views: 1395.6ms | ActiveRecord: 0.8ms)
When starting my application with RAILS_ENV=production rails s, doing the same request, I got the following on the log:
Started GET "/login" for 127.0.0.1 at 2013-08-21 18:30:52 +0000
Processing by UserSessionsController#new as */*
Rendered user_sessions/_login.html.haml (57.8ms)
Rendered user_sessions/new.html.haml within layouts/application (60.9ms)
Completed 200 OK in 69ms (ActiveRecord: 0.9ms)
But no HTML is output. What is happening? Why this is not working the same way that it does on development?
I use rails 3.2.13, and in this test it runs with WEBrick. I also am using RVM if that matters.
Update: Using the content of config/environments/development.rb on config/environments/production.rb does not fix the problem
The problem is that I was rescuing an exception on ApplicationController and not handling it properly by a logical error. The exception was not raised on development mode.

Resources