I have a problem with running JHipster in Production Mode. After building the .war by
mvn -Pprod package
and uploading it to my server, I get the "normal" start page - so the page loaded, but with following errors:
"NetworkError: 404 Not Found - http://server.net:9080/studentenhelfer-intern-0.0.1-SNAPSHOT.original/api/authentication?cacheBuster=1459611519471"
"NetworkError: 404 Not Found - http://server.net:9080/studentenhelfer-intern-0.0.1-SNAPSHOT.original/api/logout?cacheBuster=1459611519626"
The second point - when I "install/start" the Application on the server, the database will be not created. (No tables and no data)
I can´t figure out why.... With the dev-profile everything is working fine.... (Also with the same DB settings in application-prod.yml)
Additionial Info: the spring profile has also been set to prod profile in
/etc/default/tomcat7
JAVA_OPTS="${JAVA_OPTS} -Dspring.profiles.active=prod"
(This should be ok, yes?)
I´m using MySql as Db (with liquibase) and Maven for building. The server is a linux server (ubuntu) with Plesk 12.
For information - that´s my first experience with a linux-server. So maybe I forgot some extra configurations, but I think if the page gets loaded, the tomcat should not be the problem)
I also can´t find any "usefull" logs from catalina or tomcat...
var/log/tomcat7/catalina.out
var/log/apache2/error.log
But if someone needs to see the logs, I will post them..
Please help :(
Thanks, Fab
EDIT: I have tried to run the application on a local running tomcat -> And it works... so it´s a server-side problem?
Related
I keep getting this error while I try to start Tomcat in Eclipse. No other message or details just a pop up with this message: "Server Tomcat v9.0 Server at localhost failed to start." Tomcat works fine in the terminal so I don't see what could be the issue. I looked at countless solutions, nothing worked.
What I tried:
- Changing the ports
- Reinstalling server
- Deleting .snap file
- Deleting temp folder
- Removing runtime environment
- Restarting everything
So basically all the suggestions that were made in different posts, nothing works, anybody have any idea what else can I try?
Ps. It can't be the web.xml since I get the same message when I try to start the tomcat server on it's own without any project.
Can it be some permission issues somewhere in windows?
I have a java-application (standard springboot from default tutorial: https://spring.io/guides/gs/spring-boot-for-azure/ ) that I "successfuly" deploy to my WebApp (created during deployment) via Eclipse/maven plugin azure-webapp:deploy
Once deployed, files are inside the WebApp, I can see them. If start-up is successful I do get running application, but if it is not - I do not know how to troubleshoot. I don't know where to find error logs, what caused the problem and as consequence, how to solve it.
as an example of how to make it fail, add this line:
throw new RuntimeException("Doomed to fail");
I tried enabling logs from "diagnostic logs tab" and expected to see them under LogFiles/Applications but that folder remains empty.
How do I troubleshoot java-application that fails to start in WebApps of Azure?
edit: additional example of Exception to troubleshoot:
public static void main(String[] args) {
throw new RuntimeException("start failure #21");
//SpringApplication.run(Application.class, args);
}
It sounds like you followed the springboot tutorial Deploying a Spring Boot app to Azure to build the GitHub project microsoft/gs-spring-boot and deploy to Azure, but not works.
Here is my steps which I also followed the tutorial, but deployed via my own way.
I created a directory SpringBoot on my local machine, and to do the commands cd SpringBoot and git clone https://github.com/microsoft/gs-spring-boot.
Then, to build it via commands cd gs-spring-boot/complete and mvnw clean package
Note: I reviewed the sections of the tutorial under Create a sample Spring Boot web app which seems to do on Linux, but the web.config file in microsoft/gs-spring-boot/complete is ready to Azure WebApp for Windows. However, there is not any comments to describe the deployment target that be Azure WebApp for Windows or Linux.
So I used my existing WebApp for Windows to test my deployment. I open my Kudu console in browser via the url https://<webapp name>.scm.azurewebsites.net/DebugConsole and drag the files complete/web.config and complete/target/gs-spring-boot-0.1.0.jar to site/wwwroot as the figure below. Then, I started my webapp, and it works fine.
Note: Please check the JAVA_HOME environment variable which has been configured on Azure via command echo %JAVA_HOME% as the figure below.
If not, you need to set Java runtime in the Application settings tab of Azure portal.
Or you can also configure the web.config file to replace the reference %JAVA_HOME% with an existing Java runtime installed in the path D:\Program Files\Java of Azure WebApp, as below.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified"/>
</handlers>
<!-- <httpPlatform processPath="%JAVA_HOME%\bin\java.exe" -->
<httpPlatform processPath="D:\Program Files\Java\jre1.8.0_181\bin\java.exe"
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar "%HOME%\site\wwwroot\gs-spring-boot-0.1.0.jar"">
</httpPlatform>
</system.webServer>
</configuration>
I didn't manage to find logs in windows based machine, but If you enable logs on linux-based-machine you will see them in the "Diagnostic logs" output. There is a catch though.
There is 230 timeout. It will wait full "timeout" time, until producing logs in the log file, after which you can access them via log file or through "Diagnostic logs". Make sure to enable logging before you start application. This applies to linux based machine, I don't know if it can apply to windows based machine.
Then it waits for an answer trigger. Answer trigger, as it turns out, is a phrase in console output "Application is started in X seconds". I increased the timeout to 500 seconds, because although it starts in 60 seconds on my local machine, it takes 430 seconds on remote-linux-based machine of Microsoft Azure*
Second, I changed the name of my main class from "GameStart" to "Application" and after that it actually caught the trigger. After that the application started. Nowhere in manuals did I find the "until timeout - no logs" and "trigger phrase" clauses mentioned.
ps: For reference, it took me 20 to upload application, 5 minutes to start it. I was using centralUS server, cuz centralEU did not work out for me, as it was even longer, although I'm in central EU myself
-
*using test account. It might happen that on payed account number are either different or similar.
I am new to java servlets. I have installed apache-tomcat-9.0.0.M21.
When I run the project containing servlet in eclipse browser, sometimes I get the error-
Error resolving 'localhost': Name or service not known.
Other times the error is -
Error resolving 'localhost' : Temporary failure in name resolution.
This project runs fine in my web browser.
Also, after I add <servlet>...</servlet> and <servlet-mapping>...<servlet-mapping> in web.xml, I get the error - Server Tomcat v9.0 Server at localhost failed to start.
One more thing, I use Ubuntu operating system (if it has to do something with the question).
Please help. I googled for the solution but I am not able to resolve the error.
Try adding the below to your /etc/hosts file.
127.0.0.1 localhost
I have big problem to run activiti-explorer when i try access: http://localhost:8080/activiti-explorer/ tomcat shows me HTTP Status 404 - The requested resource is not available. I'm really don't have any idea why that dosen't work. Can you help me?
This what have I done on my PC:
I'm using 5.19.0 version of activiti-explorer
7.0.63 tomcat
JDK 1.8.0.77 (i think there is no point to downgrade java to previous versions (<=1.7) becouse my main application using this version)
I'm sure I have correctly configured environment variables (JAVA_HOME,JRE_HOME,PATH,CATALINA_HOME)
I configured data base connection (db.properties, context.xml) in activiti-explorer.war and i moved this file to tomcat/webapps
I don't have any errors about activiti during tomcat start
Check if activiti explorer is deployed to tomcat in manager.
http://{host}:{port}/manager/html
More info in https://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html
Check the catalina.out log. There will be something in there that leads you to the solution.
Check Admin Console (cmd that runs behind) after hitting the link. most recent exception occurred will be displayed there.
I create a simple java web service project in intellij idea and configured the glassfish 4.1 server. and just run the application. output window shows the following messages
C:\glassfish4\glassfish\bin\asadmin.bat start-domain domain1
Attempting to start domain1.... Please look at the server log for more details.....
[2015-06-10 01:35:00,667] Artifact HelloWorld:war exploded: Server is not connected. Deploy is not available.
Detected server admin port: 4848
Detected server http port: 8080
server is running fine. but webservice is not deployed. can anyone help me.
I use java 8. intellij 14, glassfish 4.1 and windows 8.1
I followed following posts, but none of these are helps me.
post one , post two , post 03, post 04
I spend last two day to find an answer, please help me.
Check your Facets and your Artifacts are all right. Facets must have web deployment description and Web Resource description, the absolute path is all right.
Check the Artifact output directory, make directories:
WEB-INF/class/{your compile output},
the resource directory for example web app directory content.
I think the IntelliJ use ant as it's deployment tools, then you can image how it work, just denote the path the project need