IP address is
192.168.16.171
password is
faRa!1401#D@1
user is
fara
service directory
pscp command to transfer
pscp -r IR_SFARA_beta_backend_for_chapar fara@192.168.16.171:/home/fara/srv
faRa!1401#D@1
timedatectl list-timezones
![[Pasted image 20220712201746.png]]
sudo timedatectl set-timezone Asia/Tehran
sudo timedatectl set-timezone Etc/UTC
timedatectl set-time '09:55:00'
Failed to set time: Automatic time synchronization is enabled
sudo timedatectl set-ntp 0
then use the set time command again
and use set time command
this command will also work
date --set="14 SEP 2022 07:56:00"
is the next step
getting core count for task execution
int cores = Runtime.getRuntime().availableProcessors();
no database is configured and it just downloads the file
for not having the Internet on the servers of the v refah I use a new way of deployment of the server
creating a ref id which is
webservice type
1
for send
2
for inquiry
identifier_id which is a unique number for v refah
1011
current_unix_time_stamp
15:31:37.1575
but only time numbers just connected
there is an error in the spring boot when using h2 with foreign key
changing linux server time by hand change time zone in linux
{"status_code":"125","message_fa":".تولید شده، که شامل 10 کاراکتر عددی می باشد، خارج از بازه ی زمانی مجاز-اختلاف ده دقیقه ای- می باشد RefID استفاده شده در timestamp برچسب زمانی"}
server ip
192.168.16.171
server user name
fara
server password
faRa!1401#D@1
file directory is
/home/fara/Chapar_4558
service runner shell project file directory
/home/fara/Chapar_4558/
service runner shell file
includings
cd /home/fara/Chapar_4558
java -jar chapar-0.0.1-SNAPSHOT.jar
*hint dont use source for running like *
source java -jar
use
java -jar
shell file directory
creating
/usr/bin/chapar_runner.sh
permission granting for shell file
for the shell file to be able to run
sudo chmod +x /usr/bin/chapar_runner.sh
it is runnable
running the test file once step
sh /usr/bin/chapar_runner.sh
test is ok
*service file path will be *
/lib/systemd/system/chapar.service
command to craete service file
sudo nano /lib/systemd/system/chapar.service
faRa!1401#D@1
internals of the file
[Unit]
Description= service runner for chapar port 4558
[Service]
ExecStart=sh /usr/bin/chapar_runner.sh
Restart=always
[Install]
WantedBy=multi-user.target
reloading the service now
sudo systemctl daemon-reload
sudo systemctl enable chapar.service
sudo systemctl start chapar.service
sudo systemctl status chapar.service
sudo systemctl restart chapar.service
sudo systemctl stop chapar.service
sudo journalctl -f -u chapar
faRa!1401#D@1
journalctl --since "2022-04-04 00:00:00" --until "2022-04-05 16:12:00" -f -u fwd_srv_runner
faRa!1401#D@1
mxm5/IR_SFARA_beta_backend_for_chapar (github.com)
opened endpoints new update on chapar but not pushed on the server // now the server is running