mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
fix: fix this bug scripts
This commit is contained in:
parent
f3cf608e3e
commit
1b914896a9
@ -17,7 +17,6 @@ package startrpc
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/OpenIMSDK/tools/errs"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
@ -28,6 +27,8 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/OpenIMSDK/tools/errs"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"golang.org/x/sync/errgroup"
|
||||
@ -116,7 +117,7 @@ func Start(
|
||||
// Create a HTTP server for prometheus.
|
||||
httpServer := &http.Server{Handler: promhttp.HandlerFor(reg, promhttp.HandlerOpts{}), Addr: fmt.Sprintf("0.0.0.0:%d", prometheusPort)}
|
||||
if err := httpServer.ListenAndServe(); err != nil {
|
||||
log.Fatal("Unable to start a http server.")
|
||||
log.Fatal("Unable to start a http server. ", err.Error(), "PrometheusPort:", prometheusPort)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
@ -53,6 +53,7 @@ function openim::crontask::start() {
|
||||
openim::util::stop_services_with_name ${OPENIM_CRONTASK_BINARY}
|
||||
|
||||
openim::log::status "start cron_task process, path: ${OPENIM_CRONTASK_BINARY}"
|
||||
|
||||
nohup ${OPENIM_CRONTASK_BINARY} -c ${OPENIM_PUSH_CONFIG} >> ${LOG_FILE} 2> >(tee -a "${STDERR_LOG_FILE}" "$TMP_LOG_FILE") &
|
||||
openim::util::check_process_names ${SERVER_NAME}
|
||||
|
||||
|
||||
@ -125,6 +125,7 @@ function openim::rpc::start() {
|
||||
for ((i = 0; i < ${#OPENIM_RPC_SERVICE_LISTARIES[*]}; i++)); do
|
||||
# openim::util::stop_services_with_name ${OPENIM_RPC_SERVICE_LISTARIES
|
||||
openim::util::stop_services_on_ports ${OPENIM_RPC_PORT_LISTARIES[$i]}
|
||||
openim::util::stop_services_on_ports ${OPENIM_RPC_PROM_PORT_LISTARIES[$i]}
|
||||
|
||||
openim::log::info "OpenIM ${OPENIM_RPC_SERVICE_LISTARIES[$i]} config path: ${OPENIM_RPC_CONFIG}"
|
||||
|
||||
|
||||
@ -451,6 +451,7 @@ openim::util::check_process_names() {
|
||||
cat "$TMP_LOG_FILE" | awk '{print "\033[31m" $0 "\033[0m"}'
|
||||
return 1
|
||||
else
|
||||
echo ""
|
||||
openim::log::success "All processes are running."
|
||||
return 0
|
||||
fi
|
||||
@ -1690,6 +1691,7 @@ openim::util::check_process_names() {
|
||||
cat "$TMP_LOG_FILE" | awk '{print "\033[31m" $0 "\033[0m"}'
|
||||
return 1
|
||||
else
|
||||
echo ""
|
||||
openim::log::success "All processes are running."
|
||||
return 0
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user