You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Vivek Kumar <vi...@indiqus.com.INVALID> on 2022/08/03 13:23:09 UTC

Re: Usage service issue on Ubuntu

Hello Folks,

Can anyone help me on this ?


Vivek Kumar
Sr. Manager - Cloud & DevOps
TechOps | Indiqus Technologies

vivek.kumar@indiqus.com <ma...@indiqus.com>
	www.indiqus.com <https://www.indiqus.com/>




> On 28-Jul-2022, at 10:55 PM, Vivek Kumar <vi...@indiqus.com> wrote:
> 
> Hello Wei, 
> 
> Any suggestion on below issue ?
> 
> Vivek Kumar
> Sr. Manager - Cloud & DevOps
> TechOps | Indiqus Technologies
> 
> vivek.kumar@indiqus.com <ma...@indiqus.com>
> 	www.indiqus.com <https://www.indiqus.com/>
> 
> 
> 
> 
>> On 22-Jul-2022, at 1:52 PM, Vivek Kumar <vivek.kumar@indiqus.com <ma...@indiqus.com>> wrote:
>> 
>> Hello Wei, 
>> 
>> Thanks for the response..! Please find the content below - 
>> 
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--
>> 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 <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.
>> -->
>> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>> 
>> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/ <http://jakarta.apache.org/log4j/>" debug="false">
>> 
>>    <!-- ============================== -->
>>    <!-- Append messages to the console -->
>>    <!-- ============================== -->
>> 
>>    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
>>       <param name="Target" value="System.out"/>
>>       <param name="Threshold" value="INFO"/>
>> 
>>       <layout class="org.apache.log4j.EnhancedPatternLayout">
>>          <param name="ConversionPattern" value="%d{ABSOLUTE}{GMT} %5p %c{1}:%L - %m%n"/>
>>       </layout>
>>    </appender>
>> 
>>    <!-- ================================ -->
>>    <!-- Append messages to the usage log -->
>>    <!-- ================================ -->
>> 
>>    <!-- A time/date based rolling appender -->
>>    <appender name="USAGE" class="org.apache.log4j.rolling.RollingFileAppender">
>>       <param name="Append" value="true"/>
>>       <param name="Threshold" value="DEBUG"/>
>>       <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
>>         <param name="FileNamePattern" value="/var/log/cloudstack/usage/usage.log.%d{yyyy-MM-dd}{GMT}.gz"/>
>>         <param name="ActiveFileName" value="/var/log/cloudstack/usage/usage.log"/>
>>       </rollingPolicy>
>> 
>>       <layout class="org.apache.log4j.EnhancedPatternLayout">
>>          <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) (logid:%X{logcontextid}) %m%n"/>
>>       </layout>
>>    </appender>
>> 
>>    <!-- ================ -->
>>    <!-- Limit categories -->
>>    <!-- ================ -->
>> 
>>    <category name="com.cloud">
>>      <priority value="DEBUG"/>
>>    </category>
>> 
>>    <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
>>    <category name="org.apache">
>>       <priority value="INFO"/>
>>    </category>
>> 
>>    <category name="org">
>>       <priority value="INFO"/>
>>    </category>
>> 
>>    <category name="net">
>>      <priority value="INFO"/>
>>    </category>
>> 
>>    <!-- ======================= -->
>>    <!-- Setup the Root category -->
>>    <!-- ======================= -->
>> 
>>    <root>
>>       <level value="INFO"/>
>>       <appender-ref ref="CONSOLE"/>
>>       <appender-ref ref="USAGE"/>
>>    </root>
>> 
>> </log4j:configuration>
>> 
>> 
>> Vivek Kumar
>> Sr. Manager - Cloud & DevOps
>> TechOps | Indiqus Technologies
>> 
>> vivek.kumar@indiqus.com <ma...@indiqus.com>
>> 	www.indiqus.com <https://www.indiqus.com/>
>> 
>> 
>> 
>> 
>>> On 22-Jul-2022, at 1:47 PM, Wei ZHOU <ustcweizhou@gmail.com <ma...@gmail.com>> wrote:
>>> 
>>> Hi Vivek,
>>> 
>>> Can you share the log4j conf file `/etc/cloudstack/usage/log4j-cloud.xml` ?
>>> 
>>> -Wei
>>> 
>>> On Fri, 22 Jul 2022 at 08:31, Vivek Kumar <vivek.kumar@indiqus.com.invalid <ma...@indiqus.com.invalid>>
>>> wrote:
>>> 
>>>> Hello Folks,
>>>> 
>>>> Can anyone help me on this ?
>>>> 
>>>> 
>>>> Vivek Kumar
>>>> Sr. Manager - Cloud & DevOps
>>>> TechOps | Indiqus Technologies
>>>> 
>>>> vivek.kumar@indiqus.com <ma...@indiqus.com> <mailto:vivek.kumar@indiqus.com <ma...@indiqus.com>>
>>>>        www.indiqus.com <http://www.indiqus.com/> <https://www.indiqus.com/ <https://www.indiqus.com/>>
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On 14-Jul-2022, at 12:41 PM, Vivek Kumar <vivek.kumar@indiqus.com <ma...@indiqus.com>>
>>>> wrote:
>>>>> 
>>>>> Hello Folks,
>>>>> We have deployed cloudstack 4.16.1 on ubuntu OS. Management service is
>>>> working fine but getting error with cloudstack-usage. This is a clean new
>>>> installation. Can someone help me out ? Pasting the details below -
>>>>> 
>>>>> 
>>>>> 
>>>>> root@SPRPVTCLDACS02:~# systemctl status cloudstack-usage
>>>>> ● cloudstack-usage.service - CloudStack Usage Server
>>>>>     Loaded: loaded (/lib/systemd/system/cloudstack-usage.service;
>>>> enabled; vendor preset: enabled)
>>>>>     Active: activating (auto-restart) (Result: exit-code) since Thu
>>>> 2022-07-14 11:17:16 IST; 3s ago
>>>>>       Docs: http://www.cloudstack.org/ <http://www.cloudstack.org/> <http://www.cloudstack.org/ <http://www.cloudstack.org/>>
>>>>>    Process: 294817 ExecStart=/bin/sh -ec /usr/bin/java
>>>> -Dpid=${JAVA_PID} $JAVA_OPTS $JAVA_DEBUG -cp $CLASSPATH $JAVA_CLASS
>>>> (code=exited, status=1/FAILURE)
>>>>>   Main PID: 294817 (code=exited, status=1/FAILURE)
>>>>> 
>>>>> Jul 14 11:17:27 SPRPVTCLDACS02 systemd[1]: cloudstack-usage.service:
>>>> Scheduled restart job, restart counter is at 4970.
>>>>> Jul 14 11:17:27 SPRPVTCLDACS02 systemd[1]: Stopped CloudStack Usage
>>>> Server.
>>>>> Jul 14 11:17:27 SPRPVTCLDACS02 systemd[1]: Started CloudStack Usage
>>>> Server.
>>>>> Jul 14 11:17:27 SPRPVTCLDACS02 sh[294878]: log4j:WARN No appenders could
>>>> be found for logger (com.cloud.utils.LogUtils).
>>>>> Jul 14 11:17:27 SPRPVTCLDACS02 sh[294878]: log4j:WARN Please initialize
>>>> the log4j system properly.
>>>>> Jul 14 11:17:27 SPRPVTCLDACS02 sh[294878]: log4j:WARN See
>>>> http://logging.apache.org/log4j/1.2/faq.html#noconfig <http://logging.apache.org/log4j/1.2/faq.html#noconfig> <
>>>> http://logging.apache.org/log4j/1.2/faq.html#noconfig <http://logging.apache.org/log4j/1.2/faq.html#noconfig>> for more info.
>>>>> Jul 14 11:17:28 SPRPVTCLDACS02 sh[294878]: SLF4J: Failed to load class
>>>> "org.slf4j.impl.StaticLoggerBinder".
>>>>> Jul 14 11:17:28 SPRPVTCLDACS02 sh[294878]: SLF4J: Defaulting to
>>>> no-operation (NOP) logger implementation
>>>>> Jul 14 11:17:28 SPRPVTCLDACS02 sh[294878]: SLF4J: See
>>>> http://www.slf4j.org/codes.html#StaticLoggerBinder <http://www.slf4j.org/codes.html#StaticLoggerBinder> <
>>>> http://www.slf4j.org/codes.html#StaticLoggerBinder <http://www.slf4j.org/codes.html#StaticLoggerBinder>> for further details.
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]: WARNING: An illegal
>>>> reflective access operation has occurred
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]: WARNING: Illegal reflective
>>>> access by net.sf.cglib.core.ReflectUtils$1
>>>> (file:/usr/share/cloudstack-usage/lib/cglib-nodep-3.3.0.jar) to me>
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]: WARNING: Please consider
>>>> reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]: WARNING: Use
>>>> --illegal-access=warn to enable warnings of further illegal reflective
>>>> access operations
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]: WARNING: All illegal access
>>>> operations will be denied in a future release
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]: Exception in thread "main"
>>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>>> bean with name 'usageVMSnapshotOnPrima>
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.jav>
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:>
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java>
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:85)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> com.cloud.usage.UsageServer.start(UsageServer.java:52)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> com.cloud.usage.UsageServer.main(UsageServer.java:41)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]: Caused by:
>>>> net.sf.cglib.core.CodeGenerationException:
>>>> java.lang.ExceptionInInitializerError-->null
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:298)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> net.sf.cglib.proxy.Enhancer$EnhancerFactoryData.newInstance(Enhancer.java:448)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> net.sf.cglib.proxy.Enhancer.nextInstance(Enhancer.java:700)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:298)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:480)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> net.sf.cglib.proxy.Enhancer.create(Enhancer.java:305)
>>>>> Jul 14 11:17:30 SPRPVTCLDACS02 sh[294878]:         at
>>>> com.cloud.utils.component.ComponentInstantiationPostProcessor.postProcessBeforeInstantiation(ComponentInstantiationPostProcess>
>>>>> 
>>>>> 
>>>>> In logs - we are getting this only.
>>>>> 
>>>>> 
>>>>> root@SPRPVTCLDACS02:~# tail -f /var/log/cloudstack/usage/usage.log
>>>>> 2022-07-14 11:27:39,905 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:27:54,535 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:28:08,927 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:28:23,309 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:28:37,518 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:28:51,143 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:29:05,381 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:29:19,548 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:29:33,964 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:29:48,543 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 2022-07-14 11:30:02,650 DEBUG [utils.crypt.EncryptionSecretKeyChecker]
>>>> (main:null) (logid:) Encryption Type: file
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Vivek Kumar
>>>>> Sr. Manager - Cloud & DevOps
>>>>> TechOps | Indiqus Technologies
>>>>> 
>>>>> vivek.kumar@indiqus.com <ma...@indiqus.com> <mailto:vivek.kumar@indiqus.com <ma...@indiqus.com>>
>>>>>      www.indiqus.com <http://www.indiqus.com/> <https://www.indiqus.com/ <https://www.indiqus.com/>>
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> This message is intended only for the use of the individual or entity to
>>>> which it is addressed and may contain confidential and/or privileged
>>>> information. If you are not the intended recipient, please delete the
>>>> original message and any copy of it from your computer system. You are
>>>> hereby notified that any dissemination, distribution or copying of this
>>>> communication is strictly prohibited unless proper authorization has been
>>>> obtained for such action. If you have received this communication in
>>>> error,
>>>> please notify the sender immediately. Although IndiQus attempts to sweep
>>>> e-mail and attachments for viruses, it does not guarantee that both are
>>>> virus-free and accepts no liability for any damage sustained as a result
>>>> of
>>>> viruses.
>>>> 
>> 
> 


-- 
This message is intended only for the use of the individual or entity to 
which it is addressed and may contain confidential and/or privileged 
information. If you are not the intended recipient, please delete the 
original message and any copy of it from your computer system. You are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited unless proper authorization has been 
obtained for such action. If you have received this communication in error, 
please notify the sender immediately. Although IndiQus attempts to sweep 
e-mail and attachments for viruses, it does not guarantee that both are 
virus-free and accepts no liability for any damage sustained as a result of 
viruses.