|
|
|
ошибка работы xmlrpcserver
|
|||
|---|---|---|---|
|
#18+
Добрый день! Очень нужна помощь - на java совсем не программирую!!! Рабочий веб-сервер с базой данных на CentOS были отключены (вообще!), а затем была сделана попытка перезапустить их: tomcat(startup.sh) [root@bn logs]# [root@bn bin]# cat startup.sh #!/bin/sh # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # —--------------------------------------------------------------------------- # Start Script for the CATALINA Server # # $Id: startup.sh 1130937 2011-06-03 08:27:13Z markt $ # —--------------------------------------------------------------------------- # Better OS/400 detection: see Bugzilla 31132 os400=false darwin=false case "`uname`" in CYGWIN*) cygwin=true;; OS400*) os400=true;; Darwin*) darwin=true;; esac # resolve links - $0 may be a softlink PRG="$0" while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`/"$link" fi done PRGDIR=`dirname "$PRG"` EXECUTABLE=catalina.sh # Check that target executable exists if $os400; then # -x will Only work on the os400 if the files are: # 1. owned by the user # 2. owned by the PRIMARY group of the user # this will not work if the user belongs in secondary groups eval else if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then echo "Cannot find $PRGDIR/$EXECUTABLE" echo "The file is absent or does not have execute permission" echo "This file is needed to run this program" exit 1 fi fi exec "$PRGDIR"/"$EXECUTABLE" start "$@" А затем запустила xmlrpcserver [root@bn bin]# cat xmlrpcserver #!/bin/sh ########################################################################### # Copyright (C) 2010 Swedish Meteorological and Hydrological Institute, SMHI, # # This file is part of beast library. # # beast library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # beast library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with beast library. If not, see < http://www.gnu.org/licenses/>. ########################################################################### # # The xmlrpc server that works as a product generation framework for the # baltrad project. # # @author Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI) # @date 2010-03-19 ########################################################################### SCRFILE=`python -c "import os;print os.path.abspath(\"$0\")"` SCRIPTDIR=`dirname "$SCRFILE"` INSTALLDIR=`dirname "$SCRIPTDIR"` LIBSDIR="$INSTALLDIR/libs" PLUGINDIR="$INSTALLDIR/plugins" # Need a java executable #JAVABIN=$JAVA_HOME/bin/java JAVABIN=/usr/bin/java # Default context file DEFAULT_CONTEXTURI="classpath:*xmlrpcserver-context.xml" CONTEXTURI=$DEFAULT_CONTEXTURI # The beast jar file containing the xmlrpc server BEASTJAR=`ls -1 "$SCRIPTDIR"/*.jar` # Log file DEFAULT_LOGFILE=~/xmlrpcserver.log LOGFILE=$DEFAULT_LOGFILE # Port DEFAULT_PORT=56565 PORT=$DEFAULT_PORT # On console printouts DEFAULT_ONCONSOLE=no ONCONSOLE=$DEFAULT_ONCONSOLE # Command parameters DOSTART=no DOSTOP=no # Setup the classpath # Add etc folder CLP="$INSTALLDIR/etc" CLP="$CLP:$BEASTJAR" # Create classpath for fname in `find $LIBSDIR -name "*.jar"`; do CLP="$CLP:$fname" done # Create classpath for fname in `find $PLUGINDIR -name "*.jar"`; do CLP="$CLP:$fname" done for dname in `ls -1 $PLUGINDIR`; do if [ -d "$PLUGINDIR/$dname" ]; then CLP="$CLP:$PLUGINDIR/$dname" fi done print_usage() { echo "xmlrpcserver [OPTIONS] start|stop|status" echo "" if [ "$1" = "brief" ]; then return fi echo "This is the main program for starting the beast xmlrpc server" echo "that manages the product generator plugins and other relevant" echo "plugins (e.g. alerts, system commands, etc)." echo "To add plugins, read documentation and see the xmlrpcaddplugin script." echo "" echo "start) starts this server" echo "stop) stops this server" echo "status) shows if this server is running or not" echo "" echo "OPTIONS:" echo "--context=<context uri>:" echo " Specifies a context uri to use." echo " [default: $DEFAULT_CONTEXTURI]" echo "--logfile=<path>:" echo " Specifies where log messages should be written." echo " [default: $DEFAULT_LOGFILE]" echo "--onconsole:" echo " If the log messages should be printed on the console Но в браузере ошибка type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet.init() for servlet baltraddex threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Thread.java:722) root cause org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#2' defined in ServletContext resource [/WEB-INF/baltraddex-servlet.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'remoteDataSourceController' defined in ServletContext resource [/WEB-INF/baltraddex-servlet.xml]: Cannot resolve reference to bean 'frameDispatcherController' while setting bean property 'dispatcher'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'frameDispatcherController' defined in ServletContext resource [/WEB-INF/baltraddex-servlet.xml]: Cannot resolve reference to bean 'bltmanager' while setting bean property 'bltMessageManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bltmanager' defined in ServletContext resource [/WEB-INF/baltraddex-servlet.xml]: Unsatisfied dependency expressed through bean property 'manager': : Error creating bean with name 'adaptormanager' defined in ServletContext resource [/WEB-INF/baltraddex-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adaptormanager' defined in ServletContext resource [/WEB-INF/baltraddex-servlet.xml]: Invocation of init method failed; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) java.security.AccessController.doPrivileged(Native Method) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402) org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316) org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282) org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126) javax.servlet.GenericServlet.init(GenericServlet.java:212) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) java.lang.Thread.run(Thread.java:722) Что делать??? Порты все проверяла! Подскажите, я совсем не могу найти в ошибку, где искать!!!! ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.10.2012, 17:13:32 |
|
||
|
ошибка работы xmlrpcserver
|
|||
|---|---|---|---|
|
#18+
Приложение не может подключиться к сконфигуренному датасорсу - может быть всякое(тупо сервис выключен, файрвол, ошибка в параметрах подключения). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.10.2012, 17:18:03 |
|
||
|
ошибка работы xmlrpcserver
|
|||
|---|---|---|---|
|
#18+
Ну там не получилось подключиться к серверу БД, видимо он не запущен или слушает другой порт. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.10.2012, 17:21:46 |
|
||
|
ошибка работы xmlrpcserver
|
|||
|---|---|---|---|
|
#18+
Лагман, спс за ответ. Тогда возникает второй вопрос если он не может подключиться к бд (она не запущена) - он будет работать если запустить БД?! ...забыл ник, такая штука произошла после того как веб-сервер работал после перезапуска и все отображал в браузере, и человек нажал logout на странице?! Порты вроде везде одинаковые. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.10.2012, 18:05:15 |
|
||
|
ошибка работы xmlrpcserver
|
|||
|---|---|---|---|
|
#18+
Polly_LOЛагман, спс за ответ. Тогда возникает второй вопрос если он не может подключиться к бд (она не запущена) - он будет работать если запустить БД?! ...забыл ник, такая штука произошла после того как веб-сервер работал после перезапуска и все отображал в браузере, и человек нажал logout на странице?! Порты вроде везде одинаковые. реальный сценарий - Человек жмет логаут, приложение пытается доступиться к базе данных, но у него исчерпан лимит коннекшенов и каким-то образом БД уходит в даун или стопается. Да мало ли тупо кул хацкер Вася зашел на ваш сервер и вырубил процесс БД. Ну и еще вариант что у вас в методе логаут стоит kill mysql:) Кстати по логам очевидно что этот эксепшн происходит как раз во время перезапуска, так что вы что-то недоговариваете. П,С датасорс = БД. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.10.2012, 19:14:22 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=37982471&tid=2130799]: |
0ms |
get settings: |
9ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
37ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
67ms |
get tp. blocked users: |
2ms |
| others: | 325ms |
| total: | 476ms |

| 0 / 0 |
