Shiny server disconnecting apps - linux

We had shiny server running on an i686 machine under Ubuntu 16.04. After a recent upgrade server does not run the apps we were using to read and plot data from a MySQL database.
Now when we try to connect to our server the shiny app appears but in 1-2 seconds the screen goes to grey and a disconnected from server message appears
As there are no precompiled binaries for our system we have followed instructions to build from source at Rstudio github site. It apparently runs fine.
Shiny process is up and running
ps -ef | grep shiny
root 13596 1 0 10:19 ? 00:00:01 /usr/local/shiny-server/ext/node/bin/shiny-server /usr/local/shiny-server/lib/main.js --pidfile=/var/run/shiny-server.pid
status shiny-server
shiny-server start/running, process 13596
But at /var/log/shiny-server.log this error message appears
[2016-12-09 09:39:18.692][ERROR] shiny-server - Error getting worker: TypeError driver.validateOptions is not a function
Any idea of what happens with our server? Thanks in advance
Machine info:
uname -a Linux rack4tb 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26
19:39:59 UTC 2016 i686 i686 i686 GNU/Linux
EDIT
Add output from history > serverHistory.txt
meteo#rack4tb:~$ tail -n 50 serverHistory.txt
1952 $PYTHON --version
1953 cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DPYTHON="$PYTHON" ../
1954 shiny-server-1.4.2.0
1955 make
1956 mkdir ../build
1957 (cd .. && ./bin/npm --python="$PYTHON" install)
1958 (cd .. && ./bin/node ./ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js --python="$PYTHON" rebuild)
1959 sudo make install
1960 sudo ln -s /usr/local/shiny-server/bin/shiny-server /usr/bin/shiny-server
1961 ls -l /usr/local/shiny-server/bin/shiny-server
1962 ls -l /usr/bin/shiny-server
1963 rm /usr/bin/shiny-server
1964 sudo rm /usr/bin/shiny-server
1965 sudo ln -s /usr/local/shiny-server/bin/shiny-server /usr/bin/shiny-server
1966 sudo useradd -r -m shiny
1967 sudo mkdir -p /var/log/shiny-server
1968 sudo mkdir -p /srv/shiny-server
1969 sudo mkdir -p /var/lib/shiny-server
1970 sudo chown shiny /var/log/shiny-server
1971 sudo mkdir -p /etc/shiny-server
1972 cat /var/log/shiny-server
1973 cd /var/log/shiny-server
1974 ls -lrt
1975 cd ..
1976 ls
1977 ls -lrt
1978 cat shiny-server.log
1979 /etc/mysql$ shiny-server --version
1980 /etc/mysql shiny-server --version
1981 shiny-server --version
1982 uname -m
1983 uname -a
1984 ps -ef | grep shiny
1985 sudo status shiny-server
1986 status shiny-server
1987 exit
1988 cd /usr/local
1989 ls
1990 ls shiny-server/
1991 ls shiny-server/bin
1992 ls shiny-server/R
1993 cat shiny-server/VERSION
1994 cd
1995 ls
1996 ls Descargas/
1997 ls
1998 ls shiny-server*deb
1999 rm shiny-server*deb
2000 exit
2001 history > serverHistory.txt

What worked for me was to launch sudo R and install all packages the app needs:
sudo su - -c "R -e \"install.packages('package_name', repos = 'http://cran.rstudio.com/',dependencies =TRUE)\""

Related

tinyproxy: How to manually install the most recent version 1.11.0 on Ubuntu? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 11 months ago.
Improve this question
I would like to install the most recent tinyproxy version 1.11.0 on Ubuntu. How can I do that?
Unfortunetly does sudo apt update; sudo apt install tinyproxy -y; not work for me and only gives me the most recent stable version 1.10.0 from 2018.
So I tried to download and unzip the most recent version on GitHub
https://github.com/tinyproxy/tinyproxy/releases
But I couldn't get it to work properly installed yet.
What I tried so far:
sudo apt update;
... [loading the unzipped tinyproxy 1.11.0 folder via own GitHub repo]
cd OwnGitHubRepo/tinyproxy-1.11.0
sudo apt-get install build-essential -y
sudo apt install autoconf -y
autoconf
./configure
make
sudo make install
The installation seems to have been working somehow as tinyproxy -v returns: tinyproxy 1.11.0
But I now can not run following command which I would usually do:
sudo /etc/init.d/tinyproxy restart;
As there is no tinyproxy folder inside /etc/ listed yet. :/
(Also sudo lsof -i:8888 doesn't show any listing server yet)
Documentations:
http://tinyproxy.github.io/
Tried under AWS EC2 Ubuntu Server 20.04 LTS (HVM), SSD Volume Type
Make sure you update the system with the latest packages
ubuntu#ip-172-30-2-209:~$ sudo su -
root#ip-172-30-2-209:~#
root#ip-172-30-2-209:~# apt-get update
root#ip-172-30-2-209:~# apt-get dist-upgrade
You can reboot the server if a new kernel is available
root#ip-172-30-2-209:~# reboot
Install the build tools:
root#ip-172-30-2-209:~# apt-get install build-essential
root#ip-172-30-2-209:~# apt-get install autoconf
Download the source code and build the software
root#ip-172-30-2-209:~# wget https://github.com/tinyproxy/tinyproxy/releases/download/1.11.0/tinyproxy-1.11.0.tar.bz2
root#ip-172-30-2-209:~# tar -jxvf tinyproxy-1.11.0.tar.bz2
root#ip-172-30-2-209:~# cd tinyproxy-1.11.0/
root#ip-172-30-2-209:~/tinyproxy-1.11.0# ./configure
root#ip-172-30-2-209:~/tinyproxy-1.11.0# make
root#ip-172-30-2-209:~/tinyproxy-1.11.0# make install
Important directories/files to track:
/usr/bin/mkdir -p '/usr/local/bin'
/usr/bin/install -c tinyproxy '/usr/local/bin'
/usr/bin/mkdir -p '/usr/local/share/tinyproxy'
/usr/bin/install -c -m 644 debug.html default.html stats.html '/usr/local/share/tinyproxy'
/usr/bin/mkdir -p '/usr/local/etc/tinyproxy'
/usr/bin/install -c -m 644 tinyproxy.conf '/usr/local/etc/tinyproxy'
/usr/bin/mkdir -p '/usr/local/share/man/man5'
/usr/bin/install -c -m 644 tinyproxy.conf.5 '/usr/local/share/man/man5'
/usr/bin/mkdir -p '/usr/local/share/man/man8'
/usr/bin/install -c -m 644 tinyproxy.8 '/usr/local/share/man/man8'
/usr/bin/mkdir -p '/usr/local/share/doc/tinyproxy'
/usr/bin/install -c -m 644 AUTHORS NEWS README README.md '/usr/local/share/doc/tinyproxy'
Configure the software
Symlink the configuration folder
root#ip-172-30-2-209:~/tinyproxy-1.11.0# ln -s /usr/local/etc/tinyproxy /etc/
root#ip-172-30-2-209:~/tinyproxy-1.11.0# ls -la /etc/ | grep tinyproxy
lrwxrwxrwx 1 root root 24 Apr 3 09:53 tinyproxy -> /usr/local/etc/tinyproxy
Check the nobody user group
root#ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/passwd | grep nobody
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
root#ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/group | grep 65534
nogroup:x:65534:
Since nobody is assigned to the nogroup group, change the Group element in tinyproxy config from nobody group to nogroup
root#ip-172-30-2-209:~/tinyproxy-1.11.0# sed -i s/'Group nobody'/'Group nogroup'/g /etc/tinyproxy/tinyproxy.conf
Configure the rest of tinyproxy to your expectations (here is the minimal setup)
root#ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/tinyproxy/tinyproxy.conf | grep -v "^#\|^$"
User nobody
Group nogroup
Port 8888
Timeout 600
DefaultErrorFile "/usr/local/share/tinyproxy/default.html"
StatFile "/usr/local/share/tinyproxy/stats.html"
LogLevel Info
MaxClients 100
Allow 127.0.0.1
Allow ::1
ViaProxyName "tinyproxy"
Test the connection
root#ip-172-30-2-209:~/tinyproxy-1.11.0# tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
NOTICE Apr 03 09:56:13.294 [8179]: Initializing tinyproxy ...
NOTICE Apr 03 09:56:13.294 [8179]: Reloading config file
INFO Apr 03 09:56:13.294 [8179]: Setting "Via" header to 'tinyproxy'
NOTICE Apr 03 09:56:13.294 [8179]: Reloading config file finished
INFO Apr 03 09:56:13.294 [8179]: listen_sock called with addr = '(NULL)'
INFO Apr 03 09:56:13.294 [8179]: trying to listen on host[0.0.0.0], family[2], socktype[1], proto[6]
INFO Apr 03 09:56:13.294 [8179]: listening on fd [3]
INFO Apr 03 09:56:13.294 [8179]: trying to listen on host[::], family[10], socktype[1], proto[6]
INFO Apr 03 09:56:13.294 [8179]: listening on fd [4]
INFO Apr 03 09:56:13.294 [8179]: Now running as group "nogroup".
INFO Apr 03 09:56:13.294 [8179]: Now running as user "nobody".
INFO Apr 03 09:56:13.294 [8179]: Setting the various signals.
INFO Apr 03 09:56:13.294 [8179]: Starting main loop. Accepting connections.
CTRL+C
Create a service to run tinyproxy
root#ip-172-30-2-209:~/tinyproxy-1.11.0# nano /lib/systemd/system/tinyproxy.service
[Unit]
Description=tinyproxy service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=nobody
Group=nogroup
ExecStart=/usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
[Install]
WantedBy=multi-user.target
Start the service and check if everything is working fine
root#ip-172-30-2-209:~/tinyproxy-1.11.0# systemctl enable tinyproxy.service
Created symlink /etc/systemd/system/multi-user.target.wants/tinyproxy.service → /lib/systemd/system/tinyproxy.service.
root#ip-172-30-2-209:~/tinyproxy-1.11.0# systemctl status tinyproxy.service
● tinyproxy.service - tinyproxy service
Loaded: loaded (/lib/systemd/system/tinyproxy.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2022-04-03 10:00:20 UTC; 5s ago
Main PID: 8236 (tinyproxy)
Tasks: 1 (limit: 1145)
Memory: 1.0M
CGroup: /system.slice/tinyproxy.service
└─8236 /usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Setting "Via" header to 'tinyproxy'
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: NOTICE Apr 03 10:00:20.980 [8236]: Reloading config file finished
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: listen_sock called with addr = '(NULL)'
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: trying to listen on host[0.0.0.0], family[2], socktype[1], proto[6]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: listening on fd [3]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: trying to listen on host[::], family[10], socktype[1], proto[6]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: listening on fd [4]
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Not running as root, so not changing UID/GID.
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Setting the various signals.
Apr 03 10:00:20 ip-172-30-2-209 tinyproxy[8236]: INFO Apr 03 10:00:20.980 [8236]: Starting main loop. Accepting connections.
Install net-tools to check the listening ports
root#ip-172-30-2-209:~/tinyproxy-1.11.0# apt-get install net-tools
root#ip-172-30-2-209:~/tinyproxy-1.11.0# netstat -napt | grep LISTEN | grep tinyproxy
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 8236/tinyproxy
tcp6 0 0 :::8888 :::* LISTEN 8236/tinyproxy
root#ip-172-30-2-209:~/tinyproxy-1.11.0# lsof -i:8888
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tinyproxy 8236 nobody 3u IPv4 34119 0t0 TCP *:8888 (LISTEN)
tinyproxy 8236 nobody 4u IPv6 34120 0t0 TCP *:8888 (LISTEN)
Extras
a) Logging and Pid file
Prepare pid and log directories
root#ip-172-30-2-209:~/tinyproxy-1.11.0# mkdir /var/run/tinyproxy/
root#ip-172-30-2-209:~/tinyproxy-1.11.0# mkdir /var/log/tinyproxy/
root#ip-172-30-2-209:~/tinyproxy-1.11.0# chown -R nobody:nogroup /var/run/tinyproxy/
root#ip-172-30-2-209:~/tinyproxy-1.11.0# chown -R nobody:nogroup /var/log/tinyproxy/
Add pid and log parameters into tinyproxy config
root#ip-172-30-2-209:~/tinyproxy-1.11.0#
root#ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/tinyproxy/tinyproxy.conf | grep ^LogFile
LogFile "/var/log/tinyproxy/tinyproxy.log"
root#ip-172-30-2-209:~/tinyproxy-1.11.0# cat /etc/tinyproxy/tinyproxy.conf | grep ^PidFile
PidFile "/var/run/tinyproxy/tinyproxy.pid"
Restart service
root#ip-172-30-2-209:~/tinyproxy-1.11.0# systemctl restart tinyproxy.service
b) Process limits
root#ip-172-30-2-209:~# ps aux | grep tinyproxy
nobody 64427 9.8 0.5 789836 10232 ? Ssl 12:11 0:00 /usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
root 65436 0.0 0.0 7696 644 pts/0 S+ 12:11 0:00 grep --color=auto tinyproxy
root#ip-172-30-2-209:~# cat /proc/64427/limits | grep "Max processes\|Max open files"
Max processes 7151 7151 processes
Max open files 1024 524288 files
To bump up those, edit the /lib/systemd/system/tinyproxy.service file and add the following lines in the [Service] section
[Service]
...
LimitNOFILE=700000
LimitNPROC=700000
...
Then reload systemd and restart the service
root#ip-172-30-2-209:~# systemctl daemon-reload
root#ip-172-30-2-209:~# systemctl restart tinyproxy.service
Check the results
root#ip-172-30-2-209:~# ps axu | grep tinyproxy
nobody 68439 0.6 0.1 533092 3068 ? Ssl 12:13 0:00 /usr/local/bin/tinyproxy -d -c /etc/tinyproxy/tinyproxy.conf
root 68490 0.0 0.0 7696 656 pts/0 S+ 12:13 0:00 grep --color=auto tinyproxy
root#ip-172-30-2-209:~# cat /proc/68439/limits | grep "Max processes\|Max open files"
Max processes 700000 700000 processes
Max open files 700000 700000 files

MongoDB won't work as a standalone EC2 AWS instance CENTOS 7

I have been trying to setup Mongodb on one EC2 instance and want it to be used as the database for my currently functioning api on another EC2 instance. I am using Centos 7.
I tried to follow these instructions on the mongodb site for how to do exactly this but it appears that they are out of date. An obvious issue is that /dev/xvdf /dev/xvdg /dev/xvdh or the sd* equivalents do not exist. Instead I mounted my log/data/journal to /dev/xvda1.
When I run sudo service mongod start the below is output:
● mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-02-12 16:47:57 UTC; 14s ago
Docs: https://docs.mongodb.org/manual
Process: 8348 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=100)
Process: 8345 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 8343 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
Process: 8342 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal systemd[1]: Starting High-performance, schema-free document-oriented database...
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal mongod[8348]: about to fork child process, waiting until server is ready for connections.
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal mongod[8348]: forked process: 8351
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal mongod[8348]: ERROR: child process failed, exited with error number 100
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal mongod[8348]: To see additional information in this output, start without the "--fork" option.
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal systemd[1]: mongod.service: control process exited, code=exited status=100
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal systemd[1]: Failed to start High-performance, schema-free document-oriented database.
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal systemd[1]: Unit mongod.service entered failed state.
Feb 12 16:47:57 ip-111-11-4-246.us-east-2.compute.internal systemd[1]: mongod.service failed.
Based upon this article I have run mongod --storageEngine wiredTiger --dbpath /data and it will open mongo but will end with waiting for connections on port 27017 which can then be opened on another instance of mongo but that is not maintainable nor accessible to my server.
This is my full history for this application. Note (this is a new ec2 instance for the sake of trying to restart the process.)
1 lsls
2 ls
3 cd ../..
4 ls
5 cd etc
6 ls
7 cd yum.repos.d/
8 ls
9 touch mongodb-org-3.6.repo
10 sudo touch mongodb-org-3.6.repo
11 sudo vi mongodb-org-3.6.repo
12 sudo yum -y update && sudo yum install -y mongodb-org-server mongodb-org-shell mongodb-org-tools
13 ls
14 cd ../../..
15 ls
16 sudo mkdir /data /log /journal
17 sudo mkfs.xfs /dev/xvda1
18 echo '/dev/xvdf /data xfs defaults,auto,noatime,noexec 0 0
/dev/xvdg /journal xfs defaults,auto,noatime,noexec 0 0
/dev/xvdh /log xfs defaults,auto,noatime,noexec 0 0' | sudo tee -a /etc/fstab
19 sudo mount /data
20 sudo mount /dev/xvda1 /data
21 sudo mount /dev/xvda1 /log
22 sudo mount /dev/xvda1 /journal
23 sudo mount /dev/xvda1 /data
24 sudo chown mongod:mongod /data /journal /log
25 sudo ln -s /journal /data/journal
26 sudo vi etc/mongod.conf
27 cd ../..
28 ls
29 echo '* soft nofile 64000
* hard nofile 64000
* soft nproc 64000
* hard nproc 64000' | sudo tee /etc/security/limits.d/90-mongodb.conf
30 echo 'ACTION=="add|change", KERNEL=="xvda1", ATTR{bdi/read_ahead_kb}="0"' | sudo tee -a /etc/udev/rules.d/85-ebs.rules
31 sudo service mongod start --storageEngine wiredTiger
32 sudo service mongod start
33 journalctl -xe
34 systemctl status mongod.service
35 mongo
36 mongod --storageEngine wiredTiger --dbpath /data --fork --logpath
37 mongod --storageEngine wiredTiger --dbpath /data --fork --logpath /log
38 cd log
39 ls
40 cd log
41 ls
42 cd ..
43 cd log
44 sudo touch mongo.log
45 cd ..
46 mongod --storageEngine wiredTiger --dbpath /data --fork --logpath /log
47 mongod --storageEngine wiredTiger --dbpath /data --fork --logpath /log/mongo.log
48 --fork mongod --storageEngine wiredTiger --dbpath /data --logpath /log/mongo.log
49 sudo service mongod start
50 systemctl status mongod.service
51 systemctl status mongod.service --fork
52 sudo setenforce 0
53 systemctl status mongod.service --fork
54 sudo service mongod start
55 ls -Z
56 sudo chcon -Rv --type=mongod_log_t $logpath
57 sudo blockdev --setra 0 /dev/xvda1
58 echo 'ACTION=="add|change", KERNEL=="xvda1", ATTR{bdi/read_ahead_kb}="0"' | sudo tee -a /etc/udev/rules.d/85-ebs.rules
59 /dev/mapper/my_vol /var/lib/mongodb xfs noatime,noexec 0 0
60 sudo chown mongod:mongod /data /journal /log
61 sudo chmod 777 /data /journal /log
62 sudo chmod 777 /data /journal /logsudo ln -s /journal /data/journal
63 ls
64 sudo ln -s /journal /data/journal
65 sudo chmod 400 /data /journal /logsudo ln -s /journal /data/journal
66 sudo service mongod start
67 systemctl status mongod.service
68 sudo systemctl start mongod.service
69 systemctl status mongod.service
70 sudo -u mongod /usr/bin/mongod -f /etc/mongod1.conf
71 sudo vi etc/mongod.conf
72 history
I got it to work.
sudo mongod --storageEngine wiredTiger --dbpath /data --bind_ip_all runs the application.
sudo chkconfig mongod on this keeps it permanently running in the background.
To be honest, the final version is a little different than above but I cannot quite figure out what other changes made it work unfortunately.
A day savior to this issue is here: https://askubuntu.com/a/1103513/765684
Just in case anybody reached here first by google search like I did.

how to install node.js on the router Asus RT-N18U (with ARMv7l processor)

I would like to install node.js on the ASUS RT-N18U with Tomato firmware version 1.28 by Shibby (http://tomato.groov.pl/download/K26ARM/132/tomato-RT-N18U-ARM--132-AIO-64K.zip)
HW configuration
root#unknown:/# cat /proc/cpuinfo
Processor : ARMv7 Processor rev 0 (v7l)
processor : 0
BogoMIPS : 1599.07
Features : swp half thumb fastmult edsp
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc09
CPU revision : 0
Hardware : Northstar Prototype
Revision : 0000
Serial : 0000000000000000
Try 1:
root#unknown:/# cd /opt
root#unknown:/opt# wget node-v4.2.1-linux-armv7l.tar.gz
root#unknown:/opt# tar zxvf node-v4.2.1-linux-armv7l.tar.gz
root#unknown:/opt# cd node-v4.2.1-linux-armv7l/bin
root#unknown:/opt/node-v4.2.1-linux-armv7l/bin# ls -l
-rwxr-xr-x 1 root root 20958710 Sep 23 03:55 node
lrwxrwxrwx 1 root root 38 Sep 24 17:47 npm -> ../lib/node_modules/npm/bin/npm-cli.js
root#unknown:/opt/node-v4.2.1-linux-armv7l/bin# ./node
-sh: ./node: not found
Result:
File "node" in the directory exists, but the system says "not found".
Try 2:
I've downloaded and unpacked the TomatoWare (latest version 1.0.3) and then compiled the latest version node.js
root#unknown:/opt/node-v4.2.1# ./configure --prefix=/opt/node && make && make install
...
root#unknown:/opt/node/bin# ./node -v
v4.2.1
root#unknown:/opt/node/bin# ./node
Illegal instruction
When I've deleted all files of TomatoWare
root#unknown:/opt/node/bin# ./node
-sh: ./node: not found
so the same error as in the first case!
By
root#unknown:/opt# ldd /opt/node/bin/node
node requires some libraries from TomatoWare.
After these files were copied into /opt/lib:
root#unknown:/opt/lib# ls -l
-rwxr--r-- 1 root root 28701 Sep 3 18:51 ld-uClibc.so.0
-rwxr--r-- 1 root root 576031 Sep 3 18:51 libc.so.0
-rwxr--r-- 1 root root 16129 Sep 3 18:51 libdl.so.0
-rwxr--r-- 1 root root 1344500 Sep 3 18:51 libgcc_s.so.1
-rwxr--r-- 1 root root 92168 Sep 3 18:51 libm.so.0
-rwxr--r-- 1 root root 113786 Sep 3 18:51 libpthread.so.0
-rwxr--r-- 1 root root 19328 Sep 3 18:51 librt.so.0
-rwxr--r-- 1 root root 4079041 Sep 3 18:51 libstdc++.so.6
then
root#unknown:/opt/node/bin# ./node
Illegal instruction
Try 3:
I installed Optware-ng (https://www.hqt.ro/how-to-install-new-generation-optware/)
root#unknown:/# cd /opt
root#unknown:/opt# wget -c -O optware-ng-arm-setup.sh
root#unknown:/opt# chmod +x ./optware-ng-arm-setup.sh
root#unknown:/opt# ./optware-ng-arm-setup.sh
root#unknown:/opt# ipkg update
root#unknown:/opt# ipkg install gcc
root#unknown:/opt# ipkg install make
root#unknown:/opt# ipkg install python27
root#unknown:/opt# gcc --version
gcc (GCC) 5.2.0
root#unknown:/opt# wget node-v4.2.1.tar.gz
root#unknown:/opt# tar xzvf node-v4.2.1.tar.gz
root#unknown:/opt# cd node-v4.2.1
root#unknown:/opt/node-v4.2.1# ./configure --prefix=/opt/node
root#unknown:/opt/node-v4.2.1# make
result:
/opt/node-v4.2.1/out/Release/obj.target/deps/gtest/libgtest.a(gtest.o): In function `testing::UnitTest::GetInstance()':
gtest.cc:(.text._ZN7testing8UnitTest11GetInstanceEv+0x78): undefined reference to `atexit'
collect2: error: ld returned 1 exit status
cctest.target.mk:118: recipe for target '/opt/node-v4.2.1/out/Release/cctest' failed
make[1]: *** [/opt/node-v4.2.1/out/Release/cctest] Error 1
make[1]: Leaving directory '/opt/node-v4.2.1/out'
Makefile:45: recipe for target 'node' failed
make: *** [node] Error 2
Try 4:
I installed Debian, and in it nodejs
root#unknown:/# debian enter
root#unknown:/# apt-get update && apt-get upgrade
root#unknown:/# apt-get install nodejs
root#unknown:/# nodejs -v
v4.1.1
root#unknown:/# nodejs
Illegal instruction
Please can you tell me what am I doing wrong?

crontab running twice but ps ax shows only one crond process

I am trying to run a crontab which executes a bash script which triggers mail command. I have done only one entry in crontab for my user. Also doing ps ax | grep cron results only one crond process. I don't know why i am getting mails twice
Cron logs
Aug 7 14:38:10 centos crond[29299]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 85% if used.)
Aug 7 14:38:11 centos crond[29299]: (CRON) INFO (running with inotify support)
Aug 7 14:38:11 centos crond[29299]: (CRON) INFO (#reboot jobs will be run at computer's startup.)
Aug 7 14:40:01 centos CROND[29376]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Aug 7 14:50:01 centos CROND[29940]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Aug 7 14:59:01 centos CROND[30388]: (test_user) CMD (bash /home/test_user/dev/mail_test_user.sh)
Aug 7 15:00:01 centos CROND[30585]: (test_user) CMD (bash /home/test_user/dev/mail_test_user.sh)
Aug 7 15:00:01 centos CROND[30586]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Aug 7 15:01:01 centos CROND[30775]: (root) CMD (run-parts /etc/cron.hourly)
Aug 7 15:01:01 centos run-parts(/etc/cron.hourly)[30775]: starting 0anacron
Aug 7 15:01:01 centos run-parts(/etc/cron.hourly)[30787]: finished 0anacron
Aug 7 15:01:01 centos run-parts(/etc/cron.hourly)[30775]: starting 0yum-hourly.cron
Aug 7 15:01:01 centos run-parts(/etc/cron.hourly)[30795]: finished 0yum-hourly.cron
Crontab list
#reboot autossh -M 8000 -f -N -R 9000:localhost:22 remote_user#192.168.0.3
#reboot autossh -M 8002 -f -N -R 9001:localhost:5901 remote_user#192.168.0.3
#reboot autossh -M 8004 -f -N -R 9002:localhost:80 remote_user#192.168.0.3
0,59 * * * * bash /home/vikas/dev/mail_test_user.sh
Contents of mail_test_user.sh
echo "I am up :)))" | mail -s "Notification : test_user#centos.localdomain [STAG]" foobaar22#gmail.com
ps aux | grep cron results
root 29299 0.0 0.0 126300 1692 ? Ss 14:38 0:00 /usr/sbin/crond -n
test_user 31650 0.0 0.0 112640 964 pts/0 S+ 15:13 0:00 grep --color=auto cron
Any luck why the hack this is happening ?
I also tried rebooting and restarting crond but not working.
The second line is result of your grep command. This is process of grep command not your cronjob process. Because it matches your search criteria.
The error is in setting up cronjob it should be */59 instead of 0/59.

Linux permissions issue on sftp server

Good day!
I have a linux sftp server located in VM. This VM has access to a GlusterFS storage, where sftp directories are located. Sftp works via OpenSSH server and chroots sftpusers group to sftp directories on GlusterFS storage. All worked well... After one moment I had got an issue...
Trying to create user:
# useradd -d /mnt/cluster-data/repositories/masters/test-user -G masters,sftpusers -m -s /bin/nologin test-user
Checking:
# cat /etc/passwd | grep test-user
test-user:x:1029:1032::/mnt/cluster-data/repositories/masters/test-user:/bin/nologin
# cat /etc/group | grep test-user
masters:x:1000:test-user
sftpusers:x:1005:test-user
test-user:x:1032:
Doing chown and chmod for home dir by hand:
# chown -R test-user:test-user /mnt/cluster-data/repositories/masters/test-user
# chmod -R 770 /mnt/cluster-data/repositories/masters/test-user
Checking:
# ls -la /mnt/cluster-data/repositories/masters/test-user
итого 16
drwxrwx--- 2 test-user test-user 4096 Окт 27 2013 .
drwxr-xr-x 13 root masters 4096 Окт 27 2013 ..
Adding another user to test-user's group:
# usermod -G test-user -a tarasov-af
# cat /etc/passwd | grep tarasov-af
tarasov-af:x:1028:1006::/mnt/cluster-data/repositories/lecturers/tarasov-af/:/bin/nologin
# cat /etc/group | grep tarasov-af
masters:x:1000:tarasov-af,test-user
sftpusers:x:1005:tarasov-af,test-user
lecturers:x:1006:tarasov-af
specialists:x:1008:tarasov-af
test-user:x:1032:tarasov-af
Login as tarasov-af:
sftp> cd masters/test-user
sftp> ls
remote readdir("/masters/test-user"): Permission denied
sftp> ls -la ..
drwxr-xr-x 13 0 1000 4096 Oct 26 21:30 .
drwxr-xr-x 6 0 0 4096 Oct 2 15:53 ..
drwxrwx--- 2 1029 1032 4096 Oct 26 21:53 test-user
I tried to login as tarasov-af into bash (usermod -s /bin/bash tarasov-af):
$ id
uid=1028 gid=1006
groups=1000,1005,1006,1008,1032
p.s. I guess this issue began after VM disk failed and I've got /etc/passwd and /etc/group broken, I've restored them from backups and all previous accounts works well, I have this issue only with new accounts.
I've found the reason of this issue: user tarasov-af has more than 16 secondary groups, first 15 groups work good, other -- don't work. I've set kernel.ngroups_max = 65535 in sysctl.conf on every computer in cluster (GlusterFS) and on sftp VM but nothing changed.
This issue goes to glusterfs client, it can't manipulate with more than 15 secondary groups.
# glusterfs --version
glusterfs 3.2.7 built on Sep 29 2013 03:28:05

Resources