cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Moody <j...@fifthecho.com>
Subject Re: cloudstack usage seems not to work - need help
Date Mon, 29 Feb 2016 20:08:14 GMT
I had this same issue. It's an issue with the systemd Unit file for
cloudstack-usage.

Edit /usr/lib/systemd/system/cloudstack-usage.service to look like:
# 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.

[Unit]
Description=CloudStack Usage Server
Documentation=http://www.cloudstack.org/
Wants=network.target network-online.target
After=network.target network-online.target

[Service]
Type=simple
Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=JAVA_HEAP_INITIAL=256m
Environment=JAVA_HEAP_MAX=2048m
Environment=JAVA_CLASS=com.cloud.usage.UsageServer
Environment=JAVA_PID=$$
ExecStart=/bin/sh -ec '\
    export UCP=`ls /usr/share/cloudstack-usage/cloud-usage-*.jar
/usr/share/cloudstack-usage/lib/*.jar | tr "\\n" ":"`; \
    export CLASSPATH="$UCP:/etc/cloudstack/usage:/usr/share/java/mysql-
connector-java.jar"; \
    ${JAVA_HOME}/bin/java -Dpid=${JAVA_PID} -Xms${JAVA_HEAP_INITIAL}
-Xmx${JAVA_HEAP_MAX} -cp "$CLASSPATH" $JAVA_CLASS'
Restart=always
RestartSec=10s

[Install]
WantedBy=multi-user.target

And then run "systemctl daemon-reload" and "systemctl stop cloudstack-
usage.service && systemctl start cloudstack-usage.service" and then
everything should start working.

There is an open pull request (https://github.com/apache/cloudstack/pul
l/1409) to resolve this issue.


On Mon, 2016-02-29 at 20:51 +0100, Vladislav Nazarenko wrote:
> Hi Everybody,
> 
> need you help trying to start with the cloudstack usage ...
> 
> used these instructions: 
> http://docs.cloudstack.apache.org/projects/cloudstack-administration/
> en/4.8/usage.html
> 
> I see in logs no errors and the following lines are written every 10
> seconds
> 
> DEBUG [cloud.usage.UsageManagerImpl] (main:null) (logid:) Checking
> to 
> see if usage.vmops.pid exists.
> INFO  [cloud.usage.UsageManagerImpl] (main:null) (logid:)
> Implementation 
> Version is 4.7.1
> DEBUG [cloud.usage.UsageManagerImpl] (main:null) (logid:) Usage
> stats 
> aggregation time zone: GMT
> DEBUG [cloud.usage.UsageManagerImpl] (main:null) (logid:) Execution 
> Time: Mon Feb 29 20:40:00 CET 2016
> DEBUG [cloud.usage.UsageManagerImpl] (main:null) (logid:) Current
> Time: 
> Mon Feb 29 20:45:45 CET 2016
> INFO  [cloud.usage.UsageServer] (main:null) (logid:) UsageServer
> ready...
> 
> But still nothing in cloud_usage.cloud_usage on the mysql side ...
> 
> Please advise
> 
> Kind regards
> Vlad

Mime
View raw message