problema sonar (tomcat+sonar) [RESOLVIDO]

13. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 22/04/2013 - 09:22h

amarildosertorio escreveu:

Comecei a criar uma documentação com o a colaboração do @saitam. DEBIAN6 + APACHE + MYSQL + TOMCAT + REDMINE + JENKINS + NEXUS + SONAR. Me passa seu e-mail que eu te mando a documentação.


opaaaa, se puder me ajudar ai amarildo, marca meus contatos:

gtalk/mail : jsoares.cps@gmail.com
skype : juliansoaress


  


14. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 22/04/2013 - 10:04h

Pelo que percebi nesse log que é do localhost, podemos que ele tenta criar a tabela ja existente.. log do localhost:

at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:184)
at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:59)
at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:27)
... 25 more
Caused by: org.jruby.exceptions.RaiseException: (StandardError) An error has occurred, all later migrations canceled:

ActiveRecord::ActiveRecordError: Table 'users' already exists: CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `login` varchar(40), `name` varchar(200), `email` varchar(100), `crypted_password` varchar(40), `salt` varchar(40), `created_at` datetime, `updated_at` datetime, `remember_token` varchar(500), `remember_token_expires_at` datetime) ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin
22/04/2013 09:30:58 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
22/04/2013 09:30:58 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
22/04/2013 09:33:29 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextDestroyed()
22/04/2013 09:33:29 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextDestroyed()
22/04/2013 09:33:52 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
22/04/2013 09:33:52 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
22/04/2013 09:53:34 org.apache.catalina.core.ApplicationContext log
GRAVE: unable to create shared application instance
org.jruby.rack.RackInitializationException: closed stream
from file:/opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/lib/jruby-complete-1.6.1.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in `require_or_load'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:224:in `depend_on'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:136:in `require_dependency'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/railties/lib/initializer.rb:414:in `load_application_classes'
from org/jruby/RubyArray.java:1602:in `each'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/railties/lib/initializer.rb:413:in `load_application_classes'
from org/jruby/RubyArray.java:1602:in `each'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/railties/lib/initializer.rb:411:in `load_application_classes'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/railties/lib/initializer.rb:197:in `process'
from org/jruby/RubyKernel.java:2052:in `send'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/vendor/rails/railties/lib/initializer.rb:113:in `run'
from /opt/apache-tomcat-6.0.36/webapps/sonar/WEB-INF/config/environment.rb:8:in `(root)'



A


15. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/04/2013 - 10:18h

Assim que chegar em casa eu te envio. Deixei a documentação no not. Eu só não postei como artigo porque ele ainda não está terminado, mas vai te servir para montar o ambiente e instalar o sonar.


16. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 22/04/2013 - 14:35h

filippec escreveu:

O banco de dados tá configurado certo?

dá uma olhada na doc do sonar.


filip aonde eu acho a documentação dele?

o banco eu criei um novo agora com nome de sonarteste, coloquei dentro de sonar.properties :

sonar.jdbc.url: jdbc:mysql://mysql:3306/sonar?useUnicode=true&characterEncoding=utf8
sonar.jdbc.driverClassName: com.mysql.jdbc.Driver
sonar.jdbc.validationQuery: select 1
sonar.jdbc.username: sonarteste
sonar.jdbc.password: sonarPWD


reiniciei o tomcat e nada ainda!!


17. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Filippe
spolti

(usa Fedora)

Enviado em 22/04/2013 - 15:25h

http://www.sonarsource.org/support/documentation/


18. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 22/04/2013 - 15:57h



ja vi isso, nao serve pra muita coisa, so ensina a instalar, coisa que eu ja fiz, mas ainda estou tendo problemas com sonar, tomcat rodando normal, mas o sonar sempre na msg :

Sonar is under maintenance. Please check back later.
Whilst waiting, you might want to check new plugins to extend the current functionality.
If you are an administrator and have no idea why this message is showing, you should read the upgrade guide.


19. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 22/04/2013 - 17:08h



Filip como inicio o sonar com modo debug, tem algum jeito?

o que seria esse sonar runner?
http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+Sonar+Runner




20. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Filippe
spolti

(usa Fedora)

Enviado em 22/04/2013 - 17:10h

procura nos arquivos do sonar algum arquivo log4j.properties.
Se achar procura por algo log facility.


21. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 22/04/2013 - 17:12h

filippec escreveu:

procura nos arquivos do sonar algum arquivo log4j.properties.
Se achar procura por algo log facility.

tipo eu nao estou rodando o sonar sozinho, roda junto com o tomcat, então o log com debug fica no apache-tomcat ou na pasta sonar?

tem isso no sonar : /opt/sonar-2.6/conf/logback.xml

<?xml version="1.0" encoding="UTF-8" ?>

<configuration debug="true">

<!-- appender used when deploying Sonar WAR on a JEE server -->
<appender name="SONAR_WAR" class="ch.qos.logback.core.ConsoleAppender">
<!-- avoid to log 404 file not found messages from the rails file servlet -->
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator name="mavenRepoFileNotFound">
<expression>message.startsWith("files: File not found: /maven")</expression>
</evaluator>
<OnMismatch>NEUTRAL</OnMismatch>
<OnMatch>DENY</OnMatch>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>
%d{yyyy.MM.dd HH:mm:ss} %-5level %logger{20} %X %msg%n
</pattern>
</layout>
</appender>

<!-- SONAR_STANDALONE/ -->
<!-- do not edit/remove the previous comment -->
<appender name="SONAR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>../../logs/sonar.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<param name="FileNamePattern" value="../../logs/sonar.%i.log"/>
<param name="MinIndex" value="1"/>
<param name="MaxIndex" value="3"/>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<param name="MaxFileSize" value="5MB"/>
</triggeringPolicy>
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator name="mavenRepoFileNotFound">
<expression>message.startsWith("files: File not found: /maven")</expression>
</evaluator>
<OnMismatch>NEUTRAL</OnMismatch>
<OnMatch>DENY</OnMatch>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>
%d{yyyy.MM.dd HH:mm:ss} %-5level %logger{20} %X %msg%n
</pattern>
</layout>
</appender>

<!-- appender used to profile Sonar Server -->
<appender name="PROFILING_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>../../logs/profiling.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<param name="FileNamePattern" value="../../logs/profiling.%i.log"/>
<param name="MinIndex" value="1"/>
<param name="MaxIndex" value="3"/>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<param name="MaxFileSize" value="5MB"/>
</triggeringPolicy>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>
%d{yyyy.MM.dd HH:mm:ss} %-5level %logger{20} %X %msg%n
</pattern>
</layout>
</appender>

<!-- do not edit/remove the following comment -->
<!-- /SONAR_STANDALONE -->


<!--
Profiling of JRuby on Rails requests . Uncomment in order to log HTTP and SQL requests.
Execute the following command to get the HTTP requests with execution time > 10s :
grep 'rails Completed in [0-9]\{5,\}ms' < profiling.log
-->
<!--
<logger name="rails" additivity="false">
<level value="DEBUG"/>
<appender-ref ref="PROFILING_FILE"/>
</logger>
-->


<logger name="org.hibernate.cache.ReadWriteCache">
<!-- removing "An item was expired by the cache while it was locked (increase your cache timeout)" msg -->
<level value="ERROR"/>
</logger>
<logger name="org.hibernate.cache.EhCacheProvider">
<!-- removing "org.hibernate.cache.EhCacheProvider - Could not find configuration)" message -->
<level value="ERROR"/>
</logger>

<!-- set DEBUG to activate Hibernate SQL logs. NOT RECOMMENDED -->
<logger name="org.hibernate.SQL">
<level value="ERROR"/>
</logger>

<!-- set INFO to activate Hibernate SQL statistics. NOT RECOMMENDED -->
<logger name="org.sonar.DBSTATISTICS">
<level value="ERROR"/>
</logger>

<logger name="org.sonar.INFO">
<level value="INFO"/>
</logger>

<logger name="org.sonar.plugins.core.i18n.I18nManager">
<level value="INFO"/>
</logger>

<root>
<level value="WARN"/>
<appender-ref ref="SONAR_FILE"/>
</root>

</configuration>


22. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Filippe
spolti

(usa Fedora)

Enviado em 22/04/2013 - 17:18h

<root>
<level value="WARN"/>
<appender-ref ref="SONAR_FILE"/>
</root>


Troca WARN para DEBUG

Deve funcionar.


23. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Julian Soares
juliansoares

(usa Debian)

Enviado em 22/04/2013 - 17:23h

filippec escreveu:

<root>
<level value="WARN"/>
<appender-ref ref="SONAR_FILE"/>
</root>


Troca WARN para DEBUG

Deve funcionar.

troquei,mas e o log fica aonde? eu geralmente vejo por este : tail -f /opt/apache-tomcat-6.0.36/logs/catalina.out
e nele está tudo normal :

22/04/2013 17:25:36 org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6.
22/04/2013 17:25:36 org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
22/04/2013 17:25:37 org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized with version OpenSSL 1.0.1c 10 May 2012
22/04/2013 17:25:37 org.apache.coyote.http11.Http11AprProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
22/04/2013 17:25:37 org.apache.coyote.ajp.AjpAprProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
22/04/2013 17:25:37 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 500 ms
22/04/2013 17:25:37 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22/04/2013 17:25:37 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
22/04/2013 17:25:37 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor manager.xml
22/04/2013 17:25:37 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor sonar.xml
22/04/2013 17:25:37 org.apache.catalina.startup.HostConfig deployDescriptor
AVISO: A docBase /opt/apache-tomcat-6.0.36/webapps/sonar inside the host appBase has been specified, and will be ignored
2013.04.22 17:25:38 INFO org.sonar.INFO Creating JDBC datasource
2013.04.22 17:25:38 INFO org.sonar.INFO Database dialect class org.sonar.jpa.dialect.MySql
JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
22/04/2013 17:25:50 org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
22/04/2013 17:25:50 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
22/04/2013 17:25:50 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
22/04/2013 17:25:51 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
22/04/2013 17:25:51 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
22/04/2013 17:25:51 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
22/04/2013 17:25:51 org.apache.catalina.startup.Catalina start
INFO: Server startup in 13978 ms



24. Re: problema sonar (tomcat+sonar) [RESOLVIDO]

Filippe
spolti

(usa Fedora)

Enviado em 22/04/2013 - 17:31h

o log é <appender name="SONAR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>../../logs/sonar.log</File>



  
01 02 03



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts