Hi Team,
I am trying to install temporal server through docker file in an ECS.
The docker is not coming with pre-installed systemd so i am using following steps and config props to install systemd and then temporal but it is failing with connection refused.
Caused by: io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedConnectException: finishConnect(…) failed: Connection refused: /127.0.0.1:7233
Received exception while starting application, exception=[io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:271), io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:252), io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:165), io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$WorkflowServiceBlockingStub.getSystemInfo(WorkflowServiceGrpc.java:4645), io.temporal.serviceclient.SystemInfoInterceptor.getServerCapabilitiesOrThrow(SystemInfoInterceptor.java:132), io.temporal.serviceclient.SystemInfoInterceptor.lambda$getServerCapabilitiesWithRetryOrThrow$0(SystemInfoInterceptor.java:118), io.temporal.internal.retryer.GrpcSyncRetryer.retry(GrpcSyncRetryer.java:69), io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:60), io.temporal.serviceclient.SystemInfoInterceptor.getServerCapabilitiesWithRetryOrThrow(SystemInfoInterceptor.java:117), io.temporal.serviceclient.ChannelManager.lambda$getServerCapabilities$3(ChannelManager.java:324), io.temporal.internal.retryer.GrpcRetryer.retryWithResult(GrpcRetryer.java:60), io.temporal.serviceclient.ChannelManager.connect(ChannelManager.java:298), io.temporal.serviceclient.WorkflowServiceStubsImpl.connect(WorkflowServiceStubsImpl.java:161), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source), java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source), java.base/java.lang.reflect.Method.invoke(Unknown Source), io.temporal.internal.WorkflowThreadMarker.lambda$protectFromWorkflowThread$1(WorkflowThreadMarker.java:83), jdk.proxy3/jdk.proxy3.$Proxy174.connect(Unknown Source), io.temporal.worker.WorkerFactory.start(WorkerFactory.java:213), com.*.temporalpoc.Application.main(Application.java:32), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method), java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source), java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source), java.base/java.lang.reflect.Method.invoke(Unknown Source), org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49), org.springframework.boot.loader.Launcher.launch(Launcher.java:108), org.springframework.boot.loader.Launcher.launch(Launcher.java:58), org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)]
Docker start command
docker run -d -v /sys/fs/cgroup/:/sys/fs/cgroup:ro --cap-add SYS_ADMIN -p 7289:80 -v /webpages/:/var/www/html -v “$(pwd)”/build:/tmp-build debian:8 /sbin/init << COMMANDS
docker start script
mkdir -p /etc/temporal
sudo chmod 777 /etc/temporal
cd /etc/temporal
pwd
ls -lrt
curl -O -L curl -OL https://github.com/temporalio/temporal/releases/download/v1.24.2/temporal_1.24.2_linux_amd64.tar.gz
chmod 777 temporal_1.24.2_linux_amd64.tar.gz
tar -xzf temporal_1.24.2_linux_amd64.tar.gz
ls -lrt
chmod 777 ui-server_2.28.0_linux_amd64.tar.gz
tar -xzf ui-server_2.28.0_linux_amd64.tar.gz
ls -lrt
sudo mv temporal-server /usr/bin/temporal-server
sudo chmod +x /usr/bin/temporal-server
ls -lrt
sudo mv ui-server /usr/bin/temporal-ui-server
sudo chmod +x /usr/bin/temporal-ui-server
sudo useradd temporal
sudo chown temporal /etc/temporal
cp /app/temporalconfig/temporal-server.yaml /etc/temporal/temporal-server.yaml
cp /app/temporalconfig/temporal-ui-server.yaml /etc/temporal/temporal-ui-server.yaml
echo “before systemd”
ls -lrt /etc/systemd/
echo “after systemd”
ls -lrt /etc/systemd/system/
echo “after systemd system”
sudo dpkg -l | grep systemd
sudo chmod 777 /etc/systemd/system/
echo “before usr bin”
ls -lrt /usr/bin/
echo “after usr bin”
ls -lrt /usr/local/bin/
echo “after local usr bin”
lscpu
echo “before install”
sudo cat /etc/wsl.conf
echo “cat before install”
echo “before systemd version”
#sudo apt-get update
sudo apt-get install -y init
sudo apt-get install apt-utils
sudo apt-get install systemd -y
echo “before reboot version”
sudo cat /etc/sudoers
echo “before sudoers version”
#sudo reboot -f
echo “after reboot version”
echo “before whoami”
sudo whoami
echo “after whoami”
sudo systemd --version
echo “after systemd version”
echo “after find systemctl”
cp /app/temporalconfig/temporal.service /etc/systemd/system/temporal.service
cp /app/temporalconfig/temporal-ui.service /etc/systemd/system/temporal-ui.service
chmod 777 /etc/systemd/system/temporal.service
chmod 777 /etc/systemd/system/temporal-ui.service
echo “after copy /etc/systemd/system”
ls -lrt /etc/systemd/system
sudo systemctl start temporal &
echo “after start temporal”
sudo systemctl enable temporal &
echo “after enable temporal”
#sudo vim /etc/systemd/system/temporal-ui.service &
sudo systemctl status temporal
echo “after systemctl status”
sudo apt install procps -y
ps -eaf| grep temporal
config files same as documented here How to Configure a Temporal Service without a Proxy | Learn Temporal
temporal-ui-server.yaml
temporalGrpcAddress: domain:7233
host: 0.0.0.0
port: 8233
enableUi: true
cors:
allowOrigins:
- http://localhost:8233
- https://domain:8080
- https://domain:7233
defaultNamespace: default
temporal-ui.service
[Unit]
Description=Temporal UI Server
After=network.target
[Service]
User=temporal
Group=temporal
ExecStart=temporal-ui-server -r / -c etc/temporal/ -e temporal-ui-server start
[Install]
WantedBy=multi-user.target
temporal-server.yaml
log:
stdout: true
level: info
persistence:
numHistoryShards: 4
default:
driver: “sql”
sql:
pluginName: “mysql”
databaseName: “temporal”
connectAddr: “domain”
connectProtocol: “tcp”
user: “temporal”
password: “domain”
port: 3306
connectAttributes:
cache: “private”
setup: true
visibility:
driver: “sql”
sql:
pluginName: “mysql”
databaseName: “temporal”
connectAddr: “domain”
connectProtocol: “tcp”
user: “temporal”
password: “domain”
port: 3306
connectAttributes:
cache: “private”
setup: true
global:
membership:
maxJoinDuration: 30s
broadcastAddress: “127.0.0.1”
pprof:
port: 7936
services:
frontend:
rpc:
grpcPort: 7233
membershipPort: 6933
bindOnIP: ‘0.0.0.0’
httpPort: 7243
matching:
rpc:
grpcPort: 7235
membershipPort: 6935
bindOnLocalHost: true
history:
rpc:
grpcPort: 7234
membershipPort: 6934
bindOnLocalHost: true
worker:
rpc:
membershipPort: 6939
clusterMetadata:
enableGlobalNamespace: false
failoverVersionIncrement: 10
masterClusterName: “active”
currentClusterName: “active”
clusterInformation:
active:
enabled: true
initialFailoverVersion: 1
rpcName: “frontend”
rpcAddress: “domain”
httpAddress: “localhost:7243”
dcRedirectionPolicy:
policy: “noop”
temporal.service
[Unit]
Description=Temporal Service
After=network.target
[Service]
User=root
Group=root
ExecStart=temporal-server -r / -c etc/temporal/ -e temporal-server start
[Install]
WantedBy=multi-user.target
can you tell me whats going wrong?