You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/04/21 16:13:45 UTC
[1/2] airavata git commit: AIRAVATA-2352 Redirect stdout/stderr to
log file
Repository: airavata
Updated Branches:
refs/heads/master 8be77fd37 -> eadbdba5b
AIRAVATA-2352 Redirect stdout/stderr to log file
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/64fb9df0
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/64fb9df0
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/64fb9df0
Branch: refs/heads/master
Commit: 64fb9df0f81b730e6dbb70ee5a21740a02699261
Parents: 8be77fd
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Apr 21 11:46:24 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Fri Apr 21 11:46:24 2017 -0400
----------------------------------------------------------------------
.../main/resources/bin/airavata-server-start.sh | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/64fb9df0/modules/distribution/src/main/resources/bin/airavata-server-start.sh
----------------------------------------------------------------------
diff --git a/modules/distribution/src/main/resources/bin/airavata-server-start.sh b/modules/distribution/src/main/resources/bin/airavata-server-start.sh
index f44661b..382e091 100644
--- a/modules/distribution/src/main/resources/bin/airavata-server-start.sh
+++ b/modules/distribution/src/main/resources/bin/airavata-server-start.sh
@@ -18,6 +18,8 @@
# under the License.
. `dirname $0`/setenv.sh
+# Capture user's working dir before changing directory
+CWD="$PWD"
cd ${AIRAVATA_HOME}/bin
LOGO_FILE="logo.txt"
@@ -29,6 +31,8 @@ IS_DAEMON_MODE=false
LOGO=true
IS_SUBSET=false
SUBSET=""
+DEFAULT_LOG_FILE="${AIRAVATA_HOME}/logs/output.log"
+LOG_FILE=$DEFAULT_LOG_FILE
# parse command arguments
for var in "$@"
@@ -64,6 +68,15 @@ do
LOGO=false
shift
;;
+ -log)
+ shift
+ LOG_FILE="$1"
+ shift
+ # If relative path, expand to absolute path using the user's $CWD
+ if [ -z "`echo "$LOG_FILE" | egrep "^/"`" ]; then
+ LOG_FILE="${CWD}/${LOG_FILE}"
+ fi
+ ;;
-h)
echo "Usage: airavata-server-start.sh [server-name/s] [command-options]"
echo "Server names:"
@@ -80,6 +93,7 @@ do
echo " -nologo Do not show airavata logo"
echo " -security Enable Java 2 security"
echo " --<key>[=<value>] Server setting(s) to override or introduce (overrides values in airavata-server.properties)"
+ echo " -log <LOG_FILE> Where to redirect stdout/stderr (defaults to $DEFAULT_LOG_FILE)"
echo " -h Display this help and exit"
shift
exit 0
@@ -114,8 +128,9 @@ fi
if ${IS_DAEMON_MODE} ; then
echo "Starting airavata server/s in daemon mode..."
+ echo "Redirecting output to $LOG_FILE"
nohup java ${JAVA_OPTS} -classpath "${AIRAVATA_CLASSPATH}" \
- org.apache.airavata.server.ServerMain ${AIRAVATA_COMMAND} $* > /dev/null 2>&1 &
+ org.apache.airavata.server.ServerMain ${AIRAVATA_COMMAND} $* >> $LOG_FILE 2>&1 &
else
java ${JAVA_OPTS} -classpath "${AIRAVATA_CLASSPATH}" \
org.apache.airavata.server.ServerMain ${AIRAVATA_COMMAND} $*
[2/2] airavata git commit: AIRAVATA-2352 Log error when RabbitMQ
client connection is shut down
Posted by ma...@apache.org.
AIRAVATA-2352 Log error when RabbitMQ client connection is shut down
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/eadbdba5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/eadbdba5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/eadbdba5
Branch: refs/heads/master
Commit: eadbdba5be540557efd67645d109eded756054d0
Parents: 64fb9df
Author: Marcus Christie <ma...@apache.org>
Authored: Fri Apr 21 12:10:42 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Fri Apr 21 12:10:42 2017 -0400
----------------------------------------------------------------------
.../org/apache/airavata/messaging/core/impl/RabbitMQSubscriber.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/eadbdba5/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQSubscriber.java
----------------------------------------------------------------------
diff --git a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQSubscriber.java b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQSubscriber.java
index 3eb4d33..4a4413b 100644
--- a/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQSubscriber.java
+++ b/modules/messaging/core/src/main/java/org/apache/airavata/messaging/core/impl/RabbitMQSubscriber.java
@@ -149,6 +149,7 @@ public class RabbitMQSubscriber implements Subscriber {
private void addShutdownListener() {
connection.addShutdownListener(new ShutdownListener() {
public void shutdownCompleted(ShutdownSignalException cause) {
+ log.error("RabbitMQ connection " + connection + " for " + properties.getExchangeName() + " has been shut down", cause);
}
});
}