Can't connect to Sybase server - linux

I just successfully installed Sybase ASE 16.02 Dev Edition on my Gentoo box. According to this command, the server is running:
igor#IgorReinCloud /opt $ /opt/sap/ASE-16_0/install/showserver
F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME CMD
0 S igor 20774 20773 0 80 0 - 9270 poll_s Dec14 ? 00:00:00 /opt/sap/ASE-16_0/bin/backupserver -e/opt/sap/data/ASE-16_0/install/IGORREINCLOUD_BS.log -N25 -C20 -I/opt/sap/data/interfaces -M/opt/sap/ASE-16_0/bin/sybmultbuf -SIGORREINCLOUD_BS
0 S igor 20655 20654 1 80 0 - 694197 futex_ Dec14 ? 00:47:25 /opt/sap/ASE-16_0/bin/dataserver -sIGORREINCLOUD -d/opt/sap/data/data/master.dat -e/opt/sap/data/ASE-16_0/install/IGORREINCLOUD.log -c/opt/sap/data/ASE-16_0/IGORREINCLOUD.cfg -M/opt/sap/data/ASE-16_0 -N/opt/sap/data/ASE-16_0/sysam/IGORREINCLOUD.properties -i/opt/sap/data
However, when I try to connect, I get this error:
igor#IgorReinCloud /opt $ /opt/sap/OCS-16_0/bin/isql64 -Usa -SIGORREINCLOUD
Password:
CT-LIBRARY error:
ct_connect(): directory service layer: internal directory control layer error: Requested server name not found.
What am I missing?

Verify that your ASE server "IGORREINCLOUD" is defined in the file $SYBASE/interfaces (with $SYBASE your SYBASE home folder defined in your Linux user)
Vince

Related

MinIO HTTPConnectionPool [Errno -2] Name or service not known

Goal: run Python program with MinIO access.
I can login via. Browser, and can upload/ edit files and am disconnected from VPN.
Ubuntu WSL can't see any sockets, such as my VPN when connected.
Powershell:
PS C:\> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 1
Terminal:
(sdg) me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ poetry run python -m sdg healthcare
Program started
Getting categories from Minio. Bucket: my-bucket
An exception of type MaxRetryError occurred. Arguments:
("HTTPConnectionPool(host='CENSORED.com', port=9000): Max retries exceeded with url: /my-bucket?location= (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fa1083cca00>: Failed to establish a new connection: [Errno -2] Name or service not known'))",)
Make sure to pass in a valid path or an array of categories
(sdg) me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ wget CESNORED.com
--2022-02-17 13:15:39-- http://CENSORED.com:9001/
Resolving CENSORED.com (CENSORED.com)... failed: Name or service not known.
wget: unable to resolve host address ‘CENSORED.com’
(sdg) me#PF2DCSXD:/mnt/c/Users/me/Documents/GitHub/foo$ ss -s
ss: get_sockstat: No such file or directory
ss: get_snmpstat: No such file or directory
Total: 0
TCP: 0 (estab 0, closed 0, orphaned 0, timewait 0)
Transport Total IP IPv6
RAW 0 0 0
UDP 0 0 0
TCP 0 0 0
INET 0 0 0
FRAG 0 0 0
It fails to connect.
"Make sure to pass in a valid path or an array of categories"
Updated wsl.conf:
$ cat etc/wsl.conf
[network]
generateResolvConf = false
Powershell:
PS C:\Users\me> ipconfig /all
Windows IP Configuration
DNS Servers . . . . . . . . . . . : X.X.X.X
Copy the DNS IPv4.
Bash:
sudo nano /etc/resolv.conf
Type in nameserver X.X.X.X and save.
Powershell:
PS C:\Users\me> wsl.exe --shutdown
Open up Bash again:
wget <url>
Sources:
WSL2 - VPN Fix
Write to resolv.conf

How can we check if our mongodb is running on EC2 linux server?

I have installed and started the MongoDB on EC2 Linux instance. How can I verify whether it is running or not?
1 way I got to know how to verify whether it is started or not is:
By checking the contents of the file at /var/log/mongodb/mongod.log for a line reading: [initandlisten] waiting for connections on port which I have not got.
What can be more ways to check?
You can check whether using a third party tool such as Mongoclient to check if you're able to connect your database. Or use one of the below methods:
Check processes that are working on:
ps -efl | grep mongo
ps -efl returns a list of processes that are being worked on your system right now, and you can use a pipe and grep to select only processes you wish, in this situation mongo.
This should return something like:
1 S sandsto+ 6997 6992 0 80 0 - 193376 - May22 ? 00:13:27 /bin/mongod --fork --bind_ip 127.0.0.1 --port 6081 --dbpath /var/mongo --logpath /var/log/mongo.log --pidfilepath /var/pid/mongo.pid --auth --nohttpinterface --noprealloc --nopreallocj --smallfiles --replSet ssrs --oplogSize 16
0 S sercan 8857 8827 0 80 0 - 85041 - May22 ? 00:20:58 mongod --storageEngine=wiredTiger
0 S sercan 29511 29471 2 80 0 - 67236 futex_ 13:41 pts/21 00:00:00 ./mongod --dbpath /home/sercan/mongo_data/
0 S sercan 29547 29529 0 80 0 - 3907 pipe_w 13:41 pts/22 00:00:00 grep --color=auto mongo
You can see there's a script ./mongod here that's working right now.
Either you can check ports that are being used by the system with command:
netstat -an | grep 27017
netstat -an returns all the allocated ports currently in the system and if you know your mongodb's port you can easily grep it from here. And this will return:
unix 2 [ ACC ] STREAM LISTENING 4184968 /tmp/mongodb-27017.sock
If you see LISTENING here, it means it's currently working.
But best way is adding mongodb to a system service manager such as supervisord, therefore you can simply check if your mongod is running with a single command:
sudo supervisorctl status
p.s. supervisor is just an example, there're a lot of process managers in linux that you can use, even mongodb documents have explanations about them.
You could check with this command
systemctl status mongod
and then you would see either of these results
1,
If it is inactive rung this command
systemctl start mongod
2,

Docker service process zombie holding a Device Mapper managed device

I'm running RHEL (kernel 4.1.12) with Docker (1.12.1) and my docker service dockerd became a zombie [dockerd] <defunct> with PID 412
# ps -a | grep dockerd
1 412 412 412 ? -1 Zsl 0 23:28 [dockerd] <defunct>
and it holds resources, in particular a device 251:4 (/dev/dm-4) which is a Device Mapper managed:
# dmsetup ls
docker-251:0-6815748-pool (251:1)
docker-251:0-6815748-e97dd950.......59a691feaf6 (251:4)
# lsof | grep 251,4
dockerd 412 6844 root 1257u BLK 251,4 0t0 2439769 /dev/dm-4
as a result, removing the thin entry docker-251:0-6815748-e97dd950.......59a691feaf6 fails
# dmsetup remove docker-251:0-6815748-e97dd950.......59a691feaf6
device-mapper: remove ioctl on docker-251:0-6815748-e97dd950.......59a691feaf6 failed: Device or resource busy
Command failed
Any suggestions how to cleanup the leftovers of the docker service (e.g., all the DM entries) besides restarting the whole system?
Is it really possible that a zombie process holds resources?

Failed to restart redis-server.service: Unit redis-server.service not found

Tried to start redis-server but got:
26195:C 27 Aug 17:05:11.684 # Warning: no config file specified, using
the default config. In order to specify a config file use redis-server
/path/to/redis.conf
26195:M 27 Aug 17:05:11.684 * Increased maximum number of open files
to 10032 (it was originally set to 1024).
26195:M 27 Aug 17:05:11.685 # Creating Server TCP listening socket
*:6379: bind: Address already in use
Ran lsof -wni tcp:3000 and killed the local host and tried restarting redis-server again and got the same above error.
Tried: ps -aux | grep redis (output below), then sudo kill -9 6379
nick4896 12238 0.0 0.1 41432 9048 ? Sl Aug26 0:14
redis-server *:6379
nick4896 26304 0.0 0.0 21300 984 pts/21 S+ 17:08 0:00 grep
--color=auto redis
And ran sudo service redis-server restart, and got:
Failed to restart redis-server.service: Unit redis-server.service not
found.
Any ideas?
The problem is that symlink redis-server.service to redis.service was deleted.
Command
sudo systemctl enable redis-server
creates the symlink:
Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.
Came across this, I would suggest systemctl daemon-reload
Not an answer, but to complete Igor Kavzov's answer, this is the code to enter at the terminal:
sudo ln /lib/systemd/system/redis.service /etc/systemd/system/redis-server.service

how to use procps-3.2.8 in listing all the running processes?

Does anyone know how to use procps-3.2.8 in listing all the running processes of ubuntu/linux?
And how to kill them using procps-3.2.8?
please provide the step-by-step procedure and provide useful links about procps.
procps is the package which contains the many command line utility provided. You can find the complete information about each utility option under the procpcs from the below location:
On the homepage we can get the following information about procps:
procps is the package that has a bunch of small useful utilities that give information about processes using the /proc filesystem. The
package includes the programs ps, top, vmstat, w, kill, free, slabtop,
and skill.*
http://www.linuxfromscratch.org/lfs/view/7.2/chapter06/procps.html
http://procps.sourceforge.net/
How to use procps-3.2.8 in listing all the running processes?
ps is the part of procps package and there are numerous ways to list the all running process(For detailed information do man ps).
mantosh#mantosh4u:~/practice$ ps -V
procps version 3.2.8
mantosh#mantosh4u:~/practice$ ps -AF
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
root 1 0 0 6143 2544 3 14:38 ? 00:00:00 /sbin/init
root 2 0 0 0 0 1 14:38 ? 00:00:00 [kthreadd]
.............................................................................
root 3320 2 0 0 0 0 15:13 ? 00:00:00 [kworker/u:2]
root 3334 2 0 0 0 1 15:18 ? 00:00:00 [kworker/1:0]
How to kill them using procps-3.2.8?
pkill is part of procps package which contains numerous command line option to kill a process. For detailed information man pkill on your terminal.
mantosh#mantosh4u:~/practice$ pkill -V
pkill (procps version 3.2.8)
mantosh#mantosh4u:~/practice$ pkill -f gedit
In the above example, the gedit was the process name which has been killed.

Resources