I have a big problem, I want to send my backend to Google Cloud Run however, I get the following error when I follow this tutorial for the jvm part: https://quarkus.io/guides/deploying-to-google-cloud#deploying-to-google-cloud-run
ERROR: (gcloud.run.deploy) The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable. Logs for this revision might contain more information.
I tried to defined this variable in my application.yml : quarkus.http.port: 8080 but it still doesn't work :(
If you have any advice, I am interested, thank you very much
Look at https://github.com/cescoffier/polycloud-demo/blob/main/src/main/resources/application.properties.
This is part of a demo deploying on Google Cloud Run. As you can see, the port is configured using:
quarkus.http.port=${PORT:8080}
Also, make sure your application starts correctly. If there is an issue during the startup, the port is not opened.
Related
I try to use the MongoDB in the spring-boot project.
I tried a different of non-usable tutorial and stopped on the official documentation
I created cluster and now I ready to use MongoDB in my project.
Documentation says:
As I understand the pwd - this is the password, so my application.properties looks like:
spring.data.mongodb.uri=mongodb+srv://root:pass#88.155.XX.XXX.mongodb.net/mygrocerylist
spring.data.mongodb.database=mygrocerylist
this is all what I added to the application.properties - there are no other information in the tutorial.
After I started project, I receive error, that repeats every several seconds (however project still launched - I receive error even during system logging):
com.mongodb.MongoConfigurationException: No SRV records available for
host 88.155.21.126 at
com.mongodb.internal.dns.DefaultDnsResolver.resolveHostFromSrvRecords(DefaultDnsResolver.java:64)
~[mongodb-driver-core-4.4.2.jar:na] at
com.mongodb.internal.connection.DefaultDnsSrvRecordMonitor$DnsSrvRecordMonitorRunnable.run(DefaultDnsSrvRecordMonitor.java:78)
~[mongodb-driver-core-4.4.2.jar:na] at
java.base/java.lang.Thread.run(Thread.java:829) ~[na:an]
please, can anyone to explain how to exactly add MongoDB to the spring project?
I prefer to use such solution, since I need to complete the task and launch my project in the another PC. In any case - I tried to use mongoDb in the docker and this way also not work for me, and I not sure the other side use MongoDB locally.
I have created application from Jhipster's template,
I have changed almost nothing in the project and it's working fine on local machine but when I deploy it to my server (ubuntu, apache, tomcat - all are the last versions) weird things start to happen.
I have AJAX call to "/api/account" which on local machine get's in response the following json
{
"timestamp":1440703613150,
"status":401,
"error":"Unauthorized",
"message":"Access Denied",
"path":"/api/account"
}
and on the production server (you can check it here) same call get's json WITHOUT "path" field in it
{
"timestamp":1440703613150,
"status":401,
"error":"Unauthorized",
"message":"Access Denied"
}
I stuck on this for long period of time, so, please help me if you can :)
As you have an Apache front-end, have a look at your mod_http_proxy settings, ProxyPass and ProxyPassReverse.
You should also have a look at your Apache logs.
Or disable Apache and access JHipster directly, so you know if this is caused by Apache or not.
I can't see why this would be an issue.
Your setup is probably different somehow, if you want to have same setup the best is to use the executable jar embedding TOmcat rather than deploying it to a server.
Are you running in prod profile for both your local machine and production server?
I just started developing an unmanaged extension for Neo4j server using the Graphaware framework. Everything is fine so far. Even unit tests are working. But I would like to actually debug the extension running the Neo4j server from within Intellij.
Can anybody give me a hint on how to do that?
Many thanks in advance,
Oliver
PS: This extension is being called via rest interface from a separate web server providing hosting the actual web application.
You need to enable jvm remote debugging in conf/neo4j-wrapper.conf. Amend a new line to this file:
wrapper.java.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Xdebug-Xnoagent-Djava.compiler=NONE-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
In case you want to debug the startup sequence as well, use set suspend=y above.
In your debugger setup a remote debugging session to localhost:5005 or myhostname:5005.
For neo4j 3.0 you have to amend this line to conf/neo4j-wrapper.conf.
dbms.jvm.additional=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
I have a Java EE 5 application which consists of three web projects. I'm using JBoss 5.1 web server and NetBeans 7.2 IDE.
I have the following problems:
I cannot start application in Debug mode. That I know of, there are two (best) approaches in NetBeans and Java: Remote debugging and debugging via shared memory. I read this post How to debug JBOSS application in netbeans? and I set debug parameters in Jboss configuration(I also know there are different parameter sets for shared memory and remote debugging), but when I go to attach debugger I got following errors:
If I use remote debugging I got error "Connection refused";
If I use shared memory I got error similar to this text "dt_shmem:file path could not be found".
These errors occur when I start JBoss by running run.bat file. If I start JBoss from Netbeans IDE, I can attach to remote process (still have problem with shared memory approach), but then I have other problems, regarding variable primitives and model binding in page life cycle (I will not write about that now).
How can I solve these problems so I can debug application? At least, how can I find a better error message when it fails. I could not find too much on the Net by looking for "Connection refused" error only.
Why I cannot just press run main project(or web project) and that netbeans start application, open it in new browser tab(as localhost) and start debug mode? I'm coming from .net background and VS is offering this as out of the box tool (called ASP .NET development server). Why I have to use external web server and with every change deploy new application and then attach to it? Why Netbeans cannot by default use JVM for running application, and later when I deploy application I will choose which web server to use!?
I hope someone will make this clear to me :)
Thanks
added Note at 03.01.2013.
Well, when I changed VM options in project.properties file of web project (added run.args.extra=-J-Xms256m -J-Xmx756m), I succeeded to debug application and heat breakpoint when executing the code. However, I still have strange problem with Managed Bean properties. I have select list on page, and it is connected to Boolean property. When nothing is selected it should be set to null value by default (and it is when I start JBoss server by running run.bat file), but its value is by default set to false! I checked parameters post values in firebug and there is no problem in posting parameters to bean. It looks to me that problem is when JSF framework is trying to map post values to Managed Beans properties, but I cannot find out why this is happening. I also checked faces-config.xml, but did not find any specific rule for mapping to this specific property. Any tips?
I am trying for several hours to get the HornetQ Examples running in Eclipse. Using the Standalone Examples everything works fine, but when I run the examples in Eclipse I get the following error:
javax.jms.JMSSecurityException: Unable to validate user: null
What could this error mean? Where do I have to specify the user? Maybe HornetQ tries to look this user up in "Some Context/Properties" etc , but I do not know where and how to specifiy the user HornetQ is running under.
What i did:
1.)Started Default HornetQ Server with the start.sh Script in the ./bin directory
2.)Copied the QueueExample over to eclpise
3.)Did some minor changes in the config files (to have the same Queue Names...)
(I also tried to disable security completely by setting:
<security-enabled>false</security-enabled>
but with no success, always getting the same error. Also when trying to programmatically instance HornetQ only via classes I get this error too).
Thank you very much!!
Jens
Did you have a look at this thread? It seems you need to the permission 'createTempQueue' to the example role.