Deployment of opentele-server

Forside Forum Developer discussions Deployment of opentele-server

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #3911
    rebecca
    Participant

    Hii,I am trying to deploy the three servers on the tomcat to run it from a webbrowser. I have followed the guid on the wiki side, and is now able to access the opentele-citizen-server and opentele-client-html from a webbrowser, but opentele-server gives me following error.

    HTTP Status 404 - /opentele-servertype Status reportmessage /opentele-serverdescription The requested resource is not available.Apache Tomcat/7.0.52 (Ubuntu)

    I have tried to look up the server.xml and web.xml inside the /var/lib/tomcat7/conf folder. I have compared these files with the files which is available in virtual box, and there is no different between my and the existing files. I have looked inside the .war files in /var/lib/tomcat/webapps/ and my installation includes all the files, which your virtual box also includes. Can you eventually see what the problem is, or where I could look for more information. 🙂/Rebecca

    #3957
    mikek
    Participant

    Hi Rebecca,It sounds (the 404 error) like tomcat don't know about the server - I get the same error if I enter an invalid URL - can you send the catalina.out file, maybe I can see something in that one ("var/lib/tomcat7/logs/catalina.out").^__^Mike

    #3958
    rebecca
    Participant

    Hi,I have sent my catalina.out file.Hope you can help me.Thanks.I have tried to attach the file, but it fails, because of the large size of it. I can't sent the file through this forum, so I have just sent an e-mail with it./Rebecca

    #3959
    mikek
    Participant

    Hi Rebecca,I received your log file, there are several attempts where the server tries to start in it, the last one I found was:


    NFO: Deploying web application archive /var/lib/tomcat7/webapps/opentele-server.warokt 26, 2015 8:50:45 AM org.apache.catalina.loader.WebappClassLoader validateJarFileINFO: validateJarFile(/var/lib/tomcat7/webapps/opentele-server/WEB-INF/lib/tomcat-embed-core-7.0.53.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.classokt 26, 2015 8:50:45 AM org.apache.catalina.loader.WebappClassLoader validateJarFileINFO: validateJarFile(/var/lib/tomcat7/webapps/opentele-server/WEB-INF/lib/tomcat-embed-el-7.0.53.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.classUsing database url: jdbc:h2:clinicianDb;MVCC=TRUE;IGNORECASE=TRUEokt 26, 2015 08:50:54 AM org.codehaus.groovy.grails.commons.cfg.ConfigurationHelperWARN: Unable to load specified config location file:c:/kihdatamon/settings/datamon-config.properties : File does not exist.Using database url: jdbc:h2:clinicianDb;MVCC=TRUE;IGNORECASE=TRUEConfiguring Spring Security Core ...... finished configuring Spring Security Core2015-10-26 08:51:10,168 [localhost-startStop-2] ERROR pool.ConnectionPool  - Unable to create initial connections of pool.java.sql.SQLException: Access denied for user 'username'@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)[Snip, a zillion lines of stack traces] ... 5 moreCaused by: java.lang.NullPointerException ... 5 moreokt 26, 2015 8:51:10 AM org.apache.catalina.core.StandardContext startInternalSEVERE: Error listenerStartokt 26, 2015 8:51:10 AM org.apache.catalina.core.StandardContext startInternalSEVERE: Context [/opentele-server] startup failed due to previous errors ----First of all it looks like the explanation of what you see is that the server isn't starting (but I think we had a good idea that was the case anyway), but more impotently earlier in the log it says (I highlighted it in red above):2015-10-26 08:51:10,168 [localhost-startStop-2] ERROR pool.ConnectionPool  - Unable to create initial connections of pool.java.sql.SQLException: Access denied for user 'username'@'localhost' (using password: YES)So it looks like the problem is with the rights to access the database, can you double check the username/password that you are using, and that you can log in manually?^__^Mike

    #3960
    rebecca
    Participant

    Hi again,I've tried to access my database from the common line, and it is not a problem.Following message appears, and I can see all the databases and tables available.

    Welcome to the MySQL monitor.  Commands end with ; or g.Your MySQL connection id is 47Server version: 5.5.46-0ubuntu0.14.04.2 (Ubuntu)Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.mysql>

    I can also access the database as root./Rebecca/Rebecca

    #3961
    mikek
    Participant

    Did you double check that the password-username in all the configuration files are the same? (in the .kih folder)

    #3962
    rebecca
    Participant

    Yes, I have just checked it before I tried to login to the database./Rebecca

    #3963
    Jacob Andersen
    Moderator

    I am not familiar with your current setup, so the following is some general debugging steps to help you figure out, what is going on at the MySQL server:First of all, as Mike noted in red: You are absolutely sure, that your username is "username"??The next step will be to look at the server-side log. Log in to the MySQL server as root and do:

    Code:
    mysql> SHOW VARIABLES LIKE 'general_log%'G*************************** 1. row ***************************Variable_name: general_log        Value: OFF*************************** 2. row ***************************Variable_name: general_log_file        Value: /var/lib/mysql/mysql.log2 rows in set (0.00 sec)

    The general_log_file variable is the filename of the logfile and the general_log is a switch (either 'ON' or 'OFF')Change the location of the log file if necessary and switch the logging on (SET GLOBAL general_log='ON';).Now attempt the login again and look in the server log file for any indication of what the server is doing (or not doing). Compare to a successful login by the same user from the same host (for instance using the mysql command-line tool).Remember to turn the logging off (SET GLOBAL general_log='OFF';) when you finish your investigations as it would otherwise grow huge! (unless you have some logrotation service running that takes care of that)For MySQL user/login debugging, it may also be helpful to know, that the MySQL server stores all the user details (including hashed passwords) in the table mysql.user. Access rights are stored in similar tables in the "mysql" database. To access these tables, you must log on the MySQL server as user "root". Then you can do USE mysql; to select the "mysql" database and inspect the tables (e.g. SELECT * FROM user;)One thing that may come as a "gotcha!" when it comes to the MySQL credential handling is that in MySQL the user identity comprises the user name AND the host (which could be either an IP address or a host name). So the same user name logging in from different hosts may have different passwords and different access rights! Therefore, always notice the hostname! What you would normally think of as a "user name" is the ENTIRE STRING 'username'@'localhost' in your case - and not "just" the 'username' part!Hoping these tips will help you debug the connection problems...

    #3964
    rebecca
    Participant

    Hi again,I have just started with a fresh installation of my server deployment.According the installation I found something mysterious. After copying all three .war files to the webapps folder, for the first time my opentele-server worked fine, but my client-html and citizen-server doesn't work. After some time, I tried again and then the client-html and citizen-server worked fine, but the opentele-server don't work again.Can you tell me why this occurs?I have skipped this step in the installation guid:

    ...$ cd /var/lib/tomcat7...$ sudo chmod -R a+rw...$

    When I try to do this command, my server tells following message.

    rebecca@opentele:/var/lib/tomcat7$ sudo chmod -R a+rw[sudo] password for rebecca: chmod: missing operand after ‘a+rw’Try 'chmod --help' for more information.rebecca@opentele:/var/lib/tomcat7$

    Is this a problem that I haven't done this command?/Rebecca

    #3965
    mikek
    Participant

    Woups, there should be a missing “*” after the “sudo chmod -R a+rw”, thank you for pointing it out, I have updated the wiki.  Without the * we are not telling chmod which file to change the permissions on.When you say that the opentele-server worked fine first, but the other two's didn't, and the opposite happened later, do you mean after a restart of the server or just that some time passed?Can you post the contents of the files in the .kih folder?  - You can replace the passwords with [password] or something before posting.^__^Mike

    #3966
    rebecca
    Participant

    Thanks, I will try that command again.No I haven't restarted the server, it happened after some time passed. My .kih folder contains following: datamon-config

    # Common settings#dataSource.dbCreate = validate#dataSource.dbCreate = createdataSource.dbCreate = updatedataSource.pooled = truedataSource.logSql = true## MYSQL DBdataSource.dialect = org.opentele.server.core.util.MySQLInnoDBDialectdataSource.driverClassName = com.mysql.jdbc.DriverdataSource.username = opentele1dataSource.password = [password]dataSource.url = jdbc:mysql://localhost:3306/opentele

    datamon-citizen-config:

    # Common settings#dataSource.dbCreate = validate#dataSource.dbCreate = create#dataSource.dbCreate = updatedataSource.pooled = truedataSource.logSql = true## MYSQL DBdataSource.dialect = org.opentele.server.core.util.MySQLInnoDBDialectdataSource.driverClassName = com.mysql.jdbc.DriverdataSource.username = opentele1dataSource.password = [password]dataSource.url = jdbc:mysql://localhost:3306/opentele

    /Rebecca

    #3967
    mikek
    Participant

    Your configuration files look fine.  I could give some educated guesses on what happened, but can you zip the logs folder (var/lib/tomcat7/logs) and send them to me so I can verify it?^__^Mike

    #3968
    rebecca
    Participant

    Yes, I will do that. Thank you./Rebecca

    #3969
    mikek
    Participant

    Hi,I have been looking at the logs, and at your configuration files, I'm not convinced that the server is using the configuration files, in which folder did you put them?  - (in /usr/share/tomcat7/.kih or in /home/[randomuser]/.kih or in ????)As far as I remember, there are some modifications to the code on the virtual machine as to where the configuration files are read from, so it would be interesting if you have the source code from the virtual machine or directly from BitBucket.^__^Mike

    #3970
    rebecca
    Participant

    Hi again,Both of my configuration files is in /usr/share/tomcat7/.kih

    rebecca@opentele:/usr/share/tomcat7/.kih$ lsdatamon-citizen-config.properties  datamon-config.propertiesrebecca@opentele:/usr/share/tomcat7/.kih$

    My source code is directly downloaded from bitbucket, as written in the guid on the wiki side.But if you tell me that the opentele-server isn't working, I don't understand why I could access it from a webserver for some minutes after I have installed the war file in the webapps folder./Rebecca

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.