system service is not started on fedora - linux

Using the below code, I created a service
Code snippet from agentInstaller.sh
fileAgentController="agent_controller.sh"
if [[ "$os" = "debian" ]] ;then
update-rc.d $fileAgentController defaults
else
chkconfig --add /etc/init.d/$fileAgentController
fi
export start="start"
export command="/etc/init.d/$fileAgentController"
sh $command ${start}
Above code successfully start the service 'agent_controller.sh' on Amazon Linux AMI 2017.03 - amzn rhel fedora and Ubuntu 16.04.2 LTS
But give error with following machine details :-
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="7.3"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.3 (Maipo)"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.3:GA:server"
Red Hat Enterprise Linux Server release 7.3 (Maipo)
I encountered following error on above machine :-
Reloading systemd: [ OK ]
Starting agent_controller.sh (via systemctl): Failed to start
agent_controller.sh.service: Unit not found.
[FAILED]

Related

How to create an x server with Singularity

Overall, I am trying to render images using Unity on a remote cluster.
The cluster does not have an X server; I don't have sudo permissions, or can start a Docker container, but I can start a Singularity container.
My plan is to create a container that would simulate the X Server. I created the following Singularity definition file:
Bootstrap: docker
From: nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
%post
# xvfb for rendering in headless mode
apt-get update
apt-get install -y xvfb mesa-utils xorg
echo "allowed_users = anybody" > /etc/X11/Xwrapper.config
I started the container with the option --containall. From the container, I launched the command /usr/bin/X :0, but it failed with the following error:
Singularity xvfb.sif:~> /usr/bin/X :0
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root
X.Org X Server 1.19.6
Release Date: 2017-12-20
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-140-generic x86_64 Ubuntu
Current Operating System: Linux cooper 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.8.0-50-generic root=/dev/mapper/vgubuntu-root ro quiet splash vt.handoff=7
Build Date: 08 April 2021 01:57:21PM
xorg-server 2:1.19.6-1ubuntu4.9 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.34.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/pierre-louis/.local/share/xorg/Xorg.0.log", Time: Wed May 26 09:17:05 2021
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (No such file or directory)
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/home/pierre-louis/.local/share/xorg/Xorg.0.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
Not any /dev/tty* exist. Then I tried to launch startx, but only to get the same message error.
How can I launch an X Server using a Singularity image?
As mentioned in a separate discussion, Xvfb is not supposed to be start through startx or /usr/bin/X but rather with the supplied run script.

Failed to connect to containerd: failed to dial

Just installed Docker CE following official instructions with the repository in Ubuntu 14.04
Installation went successfully, the daemon is running
$ ps aux | grep docker
[...] /usr/bin/dockerd --raw-logs [...]
My user is in the docker group:
$ groups
[...] docker
The cli can't seem to communicate (same with sudo)
$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
The socket seems to have the correct permissions:
$ ls -l /var/run/docker.sock
srw-rw---- 1 root docker 0 Feb 4 16:21 /var/run/docker.sock
The log seems to claim about some issues though
$ sudo tail -f /var/log/upstart/docker.log
Failed to connect to containerd: failed to dial "/var/run/docker/containerd/docker-containerd.sock": dial unix:///var/run/docker/containerd/docker-containerd.sock: timeout
/var/run/docker.sock is up
time="2018-02-04T16:22:21.031459040+01:00" level=info msg="libcontainerd: started new docker-containerd process" pid=17147
INFO[0000] starting containerd module=containerd revision=89623f28b87a6004d4b785663257362d1658a729 version=v1.0.0
INFO[0000] setting subreaper... module=containerd
containerd: invalid argument
time="2018-02-04T16:22:21.056685023+01:00" level=error msg="containerd did not exit successfully" error="exit status 1" module=libcontainerd
Any advice to make this work ?
Relog and Docker restart already done of course
As #bobbear suggested and is actually mentioned in the official doc one of the prerequisites is:
Version 3.10 or higher of the Linux kernel. The latest version of the kernel available for you platform is recommended.
After having checked my Kernel version:
$ uname -a
Linux [...] 3.2.[...]-generic [...]-Ubuntu [...] x86_64
I searched for candidates:
$ apt-cache search linux-image
And installed my new_kernel:
$ sudo apt-get install \
linux-image-new_kernel \
linux-headers-new_kernel \
linux-image-extra-new_kernel
Same situation happend on me. IS because your linux kernel version too low !!! check it use command "uname -r" , if the version below "3.10" (for example: debian 7 whezzy default version is 3.2 ) ,even you install docker-ce suceessfully, you will still can not start docker daemon success.That why! All most answers on the web tell you to 'restart' bla bla bla... but they did not consider this problem.

JBOSS not running

I'm from Linux server background and very new to JBOSS. I'm trying to setup a IoT application server which requires JBOSS service to provide
a web interface for the application server.
But when i check the JBOSS server state it is showing 'starting', i need this to be 'running'.
# /opt/cgms/bin/jboss-cli.sh --connect controller=127.0.0.1 ":read- attribute(name=server-state)"
{
"outcome" => "success",
"result" => "starting"
}
I can see that the deployment is getting failed when i start JBOSS using the script standalone.sh. I've increased the deployment-timeout
up to 6000 seconds in standalone.xml, still the deployment is failing with the following message in /opt/cgms/standalone/deployments/cgms.ear.failed,
""JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [6000 seconds].
Check the server configuration file and the server logs to find more about the status of the deployment."
Here is my JBOSS setup details,
[root#app-server ~]# /opt/cgms/bin/jboss-cli.sh --connect
[standalone#localhost:9999 /] version
JBoss Admin Command-line Interface
JBOSS_HOME: /opt/cgms
JBoss AS release: 7.3.0.Final-redhat-14 "Janus"
JBoss AS product: EAP 6.2.0.GA
JAVA_HOME: null
java.version: 1.8.0_65
java.vm.vendor: Oracle Corporation
java.vm.version: 25.65-b01
os.name: Linux
os.version: 3.10.0-229.el7.x86_64
When i check the server.log, it is stuck at,
# tailf /opt/cgms/server/cgms/log/server.log
624: app-server: Aug 12 2017 05:45:01.506 +0000: %IOTFND-6-UNSPECIFIED: %[ch=StdSchedulerFactory][sev=INFO][tid=MSC service thread 1-1]: Quartz scheduler 'CgnmsQuartz' initialized from an externally provided properties instance.
625: app-server: Aug 12 2017 05:45:01.506 +0000: %IOTFND-6-UNSPECIFIED: %[ch=StdSchedulerFactory][sev=INFO][tid=MSC service thread 1-1]: Quartz scheduler version: 2.2.1
It will not go further from here.
I've tried with java 1.7, but the script standalone.sh failed with a java error,
java.lang.UnsupportedClassVersionError: com/cisco/cgms/loglayout/LogHandler : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)
Here are my server details,
OS - Red Hat Enterprise Linux Server release 7.1 (Maipo) - runs on Oracle VM VirtualBox
kernel - app-server 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux
When i check netstat, port 80 and 443 are listening.
Please help to fix this problem.

Missing "kernel: Firewall" messages

Where are my iptables logging Blocked messages? I wonder if this is an OpenVZ issue or something from the scripted install. Note, I'm highly technical, but not a server admin. Could the OpenVZ host be blocking and logging outside of my VSP?
I have two newly installed machines running running text-mode CentOS 7 x64, yum up to date packages, and with iptables/CSF.
Also, I ensured machine #2 has all the packages that are on machine #1, though #2 has some extras.
OpenVZ VPS (installed with their image of CentOS 7 x64)
VMware VM (installed with official CentOS 7 x64 minimal mode)
I performed my extra installs/configs exactly the same on both machines, and I have these lines in /etc/csf/csf.conf
TESTING = "0"
TCP_IN = "22,80,443"
UDP_IN = ""
On the VM, I'm getting these /var/log/messages when I nmap scan it:
Apr 12 17:25:23 mach kernel: Firewall: *UDP_IN Blocked* IN=ens192 OUT= ...
Apr 12 17:25:55 mach kernel: Firewall: *TCP_IN Blocked* IN=ens192 OUT= ...
On the VPS, I'm NOT getting any Firewall /var/log/messages when I nmap scan it... but I think it is properly blocking traffic.
How do I even proceed/diagnose this?

Segmentation Fault when using isql for ODBC connection to Progress Openedge database 10.2B

OS: Red Hat 4.1.2-54
Linux 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686 i386 GNU/Linux
Progress OpenEdge Database Release 10.2B on Linux 32 bit
ODBC Driver: pgoe1023.so (which was available with the database package)
export LD_LIBRARY_PATH=/usr/dlc/odbc/lib:/usr/dlc/lib
export ODBCINI=/etc/odbc.ini
isql -v Progress
I am receiving "Segmentation fault" error when trying to use ODBC connection to progress database using isql command.
I have followed the required steps mentioned in this article and installed missing library libstdc++-libc6.2-2.so.3 (with yum install compat-libstdc++-296.i386).
How can I fix it?
I do not see any indication in the kbase article, nor in your post, that a db is running and accepting SQL connections. The kbase is assuming "testdb", port 5555 and a user named "sysprogress" (password "sysprogress" too).
Assuming that you have a "testdb" and that you setup the user you also need to start a server to accept SQL connections. For instance:
proserve testdb -m3 -Ma 5 -Mpb 5 -S 5555 -ServerType SQL -minport 9000 -maxport 9100
Before you try to use it with your isql stuff you can test that this is working with Progress' "sqlexp" command:
sqlexp -user sysprogress -password sysprogress -db testdb -S 5555
If that doesn't work then you have not correctly configured the db to accept SQL connections and downstream utilities, like isql, will not work.

Resources