linux azure web app not showing my reactjs app - reactjs

I created a Reactjs web app using the npx create-react-app and created an azure ci/cd pipeline to push the build folder to my Linux web app instance.
i also specified startup command:
pm2 serve /home/site/wwwroot --no-daemon --spa
I verified that the build folder content is in the wwwroot folder but my Linux web app shows nothing.
my web app url: https://linux--dev.azurewebsites.net/
my web app content:
$ ls /home/site/wwwroot -al
total 37
drwxrwxrwx 2 nobody nogroup 4096 Mar 16 10:21 .
drwxrwxrwx 2 nobody nogroup 0 Mar 16 10:21 ..
-rwxrwxrwx 1 nobody nogroup 1092 Mar 16 10:21 asset-manifest.json
-rwxrwxrwx 1 nobody nogroup 3870 Mar 16 10:21 favicon.ico
-rwxrwxrwx 1 nobody nogroup 3010 Mar 16 10:21 index.html
-rwxrwxrwx 1 nobody nogroup 5347 Mar 16 10:21 logo192.png
-rwxrwxrwx 1 nobody nogroup 9664 Mar 16 10:21 logo512.png
-rwxrwxrwx 1 nobody nogroup 492 Mar 16 10:21 manifest.json
-rwxrwxrwx 1 nobody nogroup 67 Mar 16 10:21 robots.txt
drwxrwxrwx 2 nobody nogroup 0 Mar 16 10:21 static
2021-03-16T11:23:14.156072674Z _____
2021-03-16T11:23:14.156107475Z / _ \ __________ _________ ____
2021-03-16T11:23:14.156112975Z / /_\ \___ / | \_ __ \_/ __ \
2021-03-16T11:23:14.156116975Z / | \/ /| | /| | \/\ ___/
2021-03-16T11:23:14.156120475Z \____|__ /_____ \____/ |__| \___ >
2021-03-16T11:23:14.156124075Z \/ \/ \/
2021-03-16T11:23:14.156127375Z A P P S E R V I C E O N L I N U X
2021-03-16T11:23:14.156130575Z
2021-03-16T11:23:14.156133676Z Documentation: http://aka.ms/webapp-linux
2021-03-16T11:23:14.156136776Z NodeJS quickstart: https://aka.ms/node-qs
2021-03-16T11:23:14.156139976Z NodeJS Version : v14.15.1
2021-03-16T11:23:14.156143076Z Note: Any data outside '/home' is not persisted
2021-03-16T11:23:14.156146376Z
2021-03-16T11:23:14.318873080Z Cound not find build manifest file at '/home/site/wwwroot/oryx-manifest.toml'
2021-03-16T11:23:14.318893181Z Could not find operation ID in manifest. Generating an operation id...
2021-03-16T11:23:14.318897181Z Build Operation ID: 9baf36d5-1dca-413f-929a-d66115f66772
2021-03-16T11:23:14.845130025Z Environment Variables for Application Insight's IPA Codeless Configuration exists..
2021-03-16T11:23:15.173100881Z Writing output script to '/opt/startup/startup.sh'
2021-03-16T11:23:15.352933180Z Running #!/bin/sh
2021-03-16T11:23:15.369142014Z
2021-03-16T11:23:15.369169414Z # Enter the source directory to make sure the script runs where the user expects
2021-03-16T11:23:15.369175515Z cd "/home/site/wwwroot"
2021-03-16T11:23:15.369179015Z
2021-03-16T11:23:15.369182315Z export NODE_PATH=/usr/local/lib/node_modules:$NODE_PATH
2021-03-16T11:23:15.369185715Z if [ -z "$PORT" ]; then
2021-03-16T11:23:15.369189115Z export PORT=8080
2021-03-16T11:23:15.369192715Z fi
2021-03-16T11:23:15.369195915Z
2021-03-16T11:23:15.369200215Z PATH="$PATH:/home/site/wwwroot" pm2 serve /home/site/wwwroot --no-daemon --spa
2021-03-16T11:23:15.381752696Z /opt/startup/startup.sh: 11: /opt/startup/startup.sh: pm2: not found
did I miss something?

Try to use npx serve -s in your startup command.
It works for me.

Related

what is the .stt file used for in TDengine database?

what is the .stt file used for in TDengine database ?
under the dataDir some of the file is called .stt like this :
ssn#TDengine:/var/lib/taos/vnode/vnode14$ cd ..
ssn#TDengine:/var/lib/taos/vnode$ ls -ltR | grep -i stt
-rwxrwxrwx 1 root root 4096 Jan 11 10:19 v18f1736ver22.stt
-rwxrwxrwx 1 root root 4096 Jan 11 10:19 v19f1736ver16.stt
-rwxrwxrwx 1 root root 4096 Jan 10 20:00 v16f1736ver18.stt
-rwxrwxrwx 1 root root 4096 Jan 10 20:01 v17f1736ver27.stt
may I know what is it for ?
a specific description for this file ,what is it used ,does it impact the database performance,etc.
the .sst file is equivalent to the .last file in the TDengine database 2.0
it is used to store the data fragment that smaller than minrows configuration .

How to destine the configure generated files to special path?

How to destine the configure output files path?
in some case I only can configure like this:
/root/src/my_software-1.8.2/configure
in my case, I can not cd into /root/src/my_software-1.8.2/.
I will generate these files to /:
2 00:06 ..
-rwxr-xr-x. 1 root root 0 Sep 27 07:32 .dockerenv
-rw-r--r--. 1 root root 24790 Oct 2 00:06 Makefile
drwxr-xr-x. 2 root root 53 Sep 28 11:24 att
lrwxrwxrwx. 1 root root 7 May 11 2019 bin -> usr/bin
-rw-r--r--. 1 root root 3934 Oct 2 00:06 config.h
-rw-r--r--. 1 root root 31584 Oct 2 00:06 config.log
-rwxr-xr-x. 1 root root 33874 Oct 2 00:06 config.status
I want destine these generated files to special output path(/root/src/my_software-1.8.2/)? how?
EDIT-01
In fact, I use the command to execute script:
docker exec -it centos-03 "my command"
but I can not execute the compound command like this:
docker exec -it centos-03 "cd /root/src/my_software-1.8.2/;./configure"
so I want use one command to do that.

Choose BSD or sys5 style when creating file in linux

When I create file in linux default group owner becomes gid of process which creates file. If I add SGID to parent directory file will inherit parent directory owner group. Also I can change fs mount options to behave either like sys5 or like BSD.
What if I want to choose this option regardless directory permissions and fs mount options? Is there c function option or syscall parameter which allows you to choose group owner?
$ find . -ls
262 4 drwxrwxr-x 4 devops devops 4096 Apr 24 18:01 .
999 4 drwxrwxr-x 2 devops root 4096 Apr 24 18:03 ./dir1
6093 4 drwxrwsr-x 2 devops root 4096 Apr 24 18:03 ./dir2
$ touch dir1/file dir2/file
$ find . -ls
262 4 drwxrwxr-x 4 devops devops 4096 Apr 24 18:01 .
999 4 drwxrwxr-x 2 devops root 4096 Apr 24 18:04 ./dir1
5576 0 -rw-rw-r-- 1 devops devops 0 Apr 24 18:04 ./dir1/file
6093 4 drwxrwsr-x 2 devops root 4096 Apr 24 18:04 ./dir2
6094 0 -rw-rw-r-- 1 devops root 0 Apr 24 18:04 ./dir2/file
$
And I wish to have something like that:
$ mytouch -s BSD dir1/file1
$ mytouch -s sys5 dir1/file2
$ find dir1 -ls
999 4 drwxrwxr-x 2 devops root 4096 Apr 24 18:10 dir1
6213 0 -rw-rw-r-- 1 devops root 0 Apr 24 18:10 dir1/file1
6214 0 -rw-rw-r-- 1 devops devops 0 Apr 24 18:10 dir1/file2
$
Chances are, you can't.
The implementation of sticky bits exists entirely within the kernel, and there are no options to open() or creat() which control how it operates.
Your program could conceivably call chown() to manually reset the group of the file after creating it. However, this would only work reliably if your process is running as root, or as a member of the group that owns the parent directory.

Abort BGSAVE Already in process

I started saving redis-db snapshot by calling BGSAVE command in redis-cli.
It has started running but I keep getting these errors in the logs
[30853] 27 Jan 07:18:41.129 # Background saving error
[30853] 27 Jan 07:18:47.043 * 1 changes in 900 seconds. Saving...
[30853] 27 Jan 07:18:47.058 * Background saving started by pid 13204
[13204] 27 Jan 07:18:47.058 # Failed opening .rdb for saving: Permission denied
[30853] 27 Jan 07:18:47.158 # Background saving error
[30853] 27 Jan 07:18:53.070 * 1 changes in 900 seconds. Saving...
[30853] 27 Jan 07:18:53.085 * Background saving started by pid 13207
[13207] 27 Jan 07:18:53.085 # Failed opening .rdb for saving: Permission denied
[30853] 27 Jan 07:18:53.186 # Background saving error
[30853] 27 Jan 07:18:59.098 * 1 changes in 900 seconds. Saving...
[30853] 27 Jan 07:18:59.113 * Background saving started by pid 13210
[13210] 27 Jan 07:18:59.114 # Failed opening .rdb for saving: Permission denied
[30853] 27 Jan 07:18:59.213 # Background saving error
looks like the redis BGSAVE command is running indefinitely. How to stop this.
Also I tried checking for process pid by ps -aux| grep redis command.
13196 pts/11 S+ 0:00 grep --color=auto redis
30853 ? Ssl 1292:57 /usr/bin/redis-server *:6379
There is no process to kill.
EDIT: These are the permissions to redis folder and dump.rdb file
f: /var/lib/redis
drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root lib
drwxr-xr-x redis redis redis
f: /var/lib/redis/dump.rdb
drwxr-xr-x root root /
drwxr-xr-x root root var
drwxr-xr-x root root lib
drwxr-xr-x redis redis redis
-rw-rw-rw- redis redis dump.rdb
EDIT2: Got the answer. The problem was somehow the config parameters are changed. The dbfilename and dir values are changed.
Set these values to original through CONFIG SET command and now its working fine. Adding in-case somebody has same problem.
But the question is how did they change. Did this happen to anybody else?
Help me
Thanks
You can either try and fix the file permissions error (does the default save location exist and does redis have permission to write to it?) or you can disable saving with:
config set save ""

/cygdrive/c and C:\ are different

I'm trying to run batch scripts via OpenSSH on Windows 8.1 but I'm getting this message:
bash: /cygdrive/c/Windows/System32/boot8.bat: No such file or directory
Somehow, the cygwin environment doesn't map C:\ to /cydrive/c correctly
Just to make sure, this is what mount says:
$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
So, using cygwin shell I get this result:
$ ls -Al /cygdrive/c/Windows/System32 | grep boot
-rwxrwx---+ 2 TrustedInstaller TrustedInstaller 3072 Aug 22 06:14 api-ms-win-base-bootconfig-l1-1-0.dll
-rwxrwx---+ 2 TrustedInstaller TrustedInstaller 3170304 Jun 18 14:43 boot.sdi
-rwxrwx---+ 2 TrustedInstaller TrustedInstaller 79360 Aug 22 05:49 bootcfg.exe
If I however use the cmd window I can see the file:
C:\Windows\System32>dir | findstr boot
22/08/2013 12:21 165,376 bcdboot.exe
18/06/2013 16:08 3,170,304 boot.sdi
01/08/2013 15:24 290 boot7.bat
04/11/2013 16:00 298 boot8.bat
22/08/2013 12:15 87,040 bootcfg.exe
22/08/2013 10:17 13,312 bootim.exe
22/08/2013 13:45 109,408 bootsect.exe
22/08/2013 12:44 2,560 bootstr.dll
22/08/2013 10:07 3,311,616 bootux.dll
19/11/2013 16:42 307 bootxp.bat
Using the windows explorer, I can see the boot8.bat too.
It works under Windows XP and Windows 7. It doesn't matter whether or not you use capital letters for the Windows and system32 directory . I had this problem before, where I would edit files with notepad++ and when I later opened them with notepad they didn't change.
Any ideas?
try
ls -Al /cygdrive/c/Windows/sysnative | grep boot

Resources