Skip to main content

Posts

Showing posts with the label linux

MongoDB Failed to start lsb an object/document-oriented database

After long gap I'm going to post new blog. Due to the work load and research I have little time.  MongoDB could not started after installation of 3.6 version, However downgrade to the 3.4, still the Mongodb couldn't start and show below error message. Search don't help to resolved the issue. After so much hit and trail nothing work. One Chinese forum posted this command and its works for me.  cd /var/lib sudo rm -rf ./mongodb sudo mkdir mongodb sudo chown -R mongodb mongodb/ sudo serivce mongodb restart

UBUNTU Files not Opening

Suddenly My Ubuntu 16.04 LTS giving me a issue, I can't open files manger as well as screenshots app.  So I dig into the problem and found this temporary solution for file manager. Still searching for permanent solution. Ubuntu is very buggy since and then, not stable any way. Step 1 : @jpudasaini:~$ nautilus -q (nautilus:6210): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed (nautilus:6210): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed (nautilus:6210): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed (nautilus:6210): GLib-GObject-WARNING **: invalid (NULL) pointer instance (nautilus:6210): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed Step 2 : jpudasaini@jpudasaini:~$ nautilus Nautilus-S

IOS XR GNS3 QEMU

This time lets have tutorial on Cisco XR 9k series router image running on the GNS3. Please don't ask for the XR image. Your are smart enough to get it. My system configuration: Ubuntu 16.04 GNS3 1.4 RAM 8Gig i7 processor Used XR Image iosxrv-k9-demo-6.0.1.qcow2 This image is VIRL extracted image. You need to convert this image into QEMU image, follow this link I strongly recommend you to run it on the Linux system. Now you have converted image, then go to the GNS3>Edit>Preferences>QEMU>Qemu VMs>New then follow the onscreen procedure. Setting for QEMU XR Image. RAM:- 4Gig CPU:- 1 Adapters at lest 4.  -enable-kvm Here you can see I can run the XR on my system. Interface is up and system is already booted.  I have run 3 XR router  here is my system RAM CPU usages. RP/0/0/CPU0:XR3(config)#int gi0/0/0/0 RP/0/0/CPU0:XR3(config-if)#ip add 192.168.13.2 255.255.255.252 RP/0/0/CPU0:XR3(config-if)#co

Unit vpnagentd service not loaded.

Somebody ask me to run Cisco EPIC VPN lab test provide by the Cisco. I just try it done but Anyconnect client doesn't seems to work on ubuntu system. The error message was How to resolved the issue??  First of all install the following packages. sudo apt-get install lib32z1 lib32ncurses5 Then try to install the AnyConnect client, if its still show the same error message. Used below command.... sudo apt-get install network-manager-openconnect Reload the changes using this command.... sudo systemctl daemon-reload Now AnyConnect should be installed. 

Perl Can't Locate in @inc

Recently I try to install  SmokePing (tar ball) on Centos 7, for my company to check Network latency, but   same error re-occur. Multiple Errors: Then I search a lot, try to install the packages but the problem still appear, then after I found  a simple solution. Solution: # perl -MCPAN -eshell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help. cpan[1]> install Net::OpenSSH Reading '/root/.cpan/Metadata'   Database was generated on Sat, 03 Sep 2016 21:53:30 GMT Running install for module 'Net::OpenSSH' Running make for S/SA/SALVA/Net-OpenSSH-0.73.tar.gz Fetching with LWP: http://cpan.communilink.net/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz Fetching with LWP: http://cpan.communilink.net/authors/id/S/SA/SALVA/CHECKSUMS Checksum for /root/.cpan/sources/authors/id/S/SA/SALVA/Net-OpenSSH-0.73.tar.gz ok Scanning cache /root/.cpan/build for sizes .............

No Matching Host Key Type Found. Their Offer: ssh-rsa

After upgrading the Laptop OS when I try to login to my old machine I got this error message.... jay@jay:~$ ssh -p 2222 jay@jpudasaini.com.np Unable to negotiate with 192.168.156.101 port 2222: no matching host key type found. Their offer: ssh-dss I can't access the system, here is the solution jay@jay:~$ ssh -oHostKeyAlgorithms=+ssh-dss -p 2222 jay@jpudasaini.com.npThe authenticity of host '[jpudasaini.com.np]:2222 ([192.168.156.101]:2222)' can't be established. DSA key fingerprint is SHA256:J#$/zFpzr05gdfrshufHHOQvss6NQcEpPMgKlibTc. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[jpudasaini.com.np]:2222,[192.168.156.101]:2222' (DSA) to the list of known hosts. Password: Now Just type the password 

nslookup Command

A Network Administrator command  which help diagnosis DNS related issue. However to understand this,  you should better to know how DNS works. How to troubleshoot DNS related issue. 1. NSLOOKUP example display "A Record" (IP Adress) of the domain C:\Users\jpudasaini>nslookup jpudasaini.com.np 8.8.8.8 Server:  google-public-dns-a.google.com Address:  8.8.8.8 Non-authoritative answer: Name:    jpudasaini.com.np Address:  216.239.32.21 A Non-Authoritative Answer is a response from Cache. A DNS server is authoritative for zones actually holds it. The above output shows "A Records" (IP Adress) of the domain " jpudasaini.com.np ". Which is actually query to the public Google DNS. If you don't put DNS after the domain, it will used your default DNS, in my case I have used public DNS. 2. MX Record using -query=mx MX (Mail Exchange) record maps for the specific domain name to verify mail exchaing servers on that domain.

The-requested-url-nagioscgi-binstatusmap-cgi-was-not-found-on-this-server

Everything goes well while installing the Nagios 4.0.8 into Ubuntu 10.04 LTS. However Nagios Map section doesn't plotted the maps of the device. Displayed error like this way G for god and G for google, found the solution like   Install the package apt-get install libgd2-xpm install libgd2-xpm-dev cd /home/jpudasaini/nagios-4.0.8/ Configure the package for installation ./configure -with-gd-lib=/usr/local/lib/ make cgis Then copy it into the sbin directory  cp /home/jpudasaini/nagios-4.0.8/cgi/*.cgi /usr/local/nagios/sbin/ Change the permission for that files. chown nagios:nagios /usr/local/nagios/sbin/*.cgi

vSphere Client Displays Empty Inventory

Suddenly my home datacenter  vsphere lab show empty inventory in vSphere client. There was no any host at all. I have three ( Cisco IOU, CentOS 7, Ubuntu server) host configure for lab  purpose. So I must recover those host to complete my lab because I almost completed all labs.  Thus here is process how to retrieve those lost host from vSphere client in vSphere 6 database. Step 1: Login to the vSphere client choose your database from Configuration Tab > right click database and choose "Browse Dababase". Step 2: Now next window open the database page. From here open your host folder then choose ".vmx" right click and choose "Add to inventory" then follow the onscreen instruction. Next window  Select the database Next click to finish Now your server is in the inventory list, you can run the server. In my case its my CentOS 7 server, it will run smoothly. 

Table Already Exists SQL Server

Somehow I have created or you can say I have imported database into SQL and try to continue installation, but error "table already exists sql server" occur then installation has been interrupted. Meanwhile, another error "SQL=Duplicate entry 'add_user' for key 'PRIMARY':" also appear. In this case I had deleted those tables and modified dbsetup file. CREATE TABLE logs (         id bigint unsigned NOT NULL AUTO_INCREMENT, to CREATE TABLE logs (         id bigint(20) unsigned NOT NULL AUTO_INCREMENT, On sql I have used this command to delete tables MariaDB [(none)]> use syslog Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [syslog]> drop table {YourTableName};

PERL can't locate module in @ INC

Hi, recently when I'm trying to install some linux daemon in CentOS 7 I have encountered a PERL issue, indicating that some module are missing e.g. Can't locate sys/syslog.pm in @INC It means it can't find the pear-sys-syslog. So I have to install this daemon to continue my installation. In my case its syslog.pm but you may encounter different than this. I mean the module name is different, but the error code is same. You need to search that package and install it. In my case I have just used this module root@localhost#yum install -y perl-sys-syslog Now the installation has been working. 

PEAR Succeeded but it is not a valid package archive

Recently I encounter following problem while installing PEAR in Ubuntu 14.04 server, after long search I found that, it is a bug already reported a long before. Solution at bottom of the page. root@dns:~# pear install DB WARNING: "pear/DB" is deprecated in favor of "pear/MDB2" WARNING: "pear/Console_Getopt" is deprecated in favor of "pear/Console_GetoptPlus" downloading DB-1.8.2.tgz ... Starting to download DB-1.8.2.tgz (131,693 bytes) .............................done: 131,693 bytes could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/DB-1.8.2.tgz" Download of "pear/DB" succeeded, but it is not a valid package archive Error: cannot download "pear/DB" downloading PEAR-1.9.5.tgz ... Starting to download PEAR-1.9.5.tgz (290,006 bytes) ...done: 290,006 bytes could not extract the package.xml file from "/build/buildd/php5-5.5.9+dfsg/pear-build-download/PEAR-1

Host Key Verification Failed

Most of the time we may encounter following error. Such a error may occur if remote host may change or regenerated the RSA key. So how to solved the issue. jpudasaini@Gnome:~/Downloads$ ssh root@10.0.2.37 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the ECDSA key sent by the remote host is f3:30:b1:66:ea:0d:e4:06:2e:10:8b:ca:df:33:fa:34. Please contact your system administrator. Add correct host key in /home/jpudasaini/.ssh/known_hosts to get rid of this message. Offending ECDSA key in /home/jpudasaini/.ssh/known_hosts:17   remove with: ssh-keygen -f "/home/jpudasaini/.ssh/known_hosts" -R 10.0.2.37 ECDSA host key for 10.0.

Ubuntu Password Reset

Often I've forgotten Ubuntu password, this is the most occurring issue with me. Every-time I have to search Google how to reset the password on Ubuntu. So I decide to make notes for myself. Here is the step how I reset the password. First of all reboot Ubuntu and choose recovery mode from console. After that you may see "Recovery menu", just choose "root Drop to root shell prompt". Now you are in a shell prompt, then use following command to change the password.  #ls /home (this will show your home directory's username) #mount -rw -o remount / #passwd (username) Enter new UNIX password: Retype new UNIX password: passwd Password updated successfully #reboot After wards you can use new password to login to ubuntu. Tested in Ubuntu server 14.04.

Linux Tools to see What Process consume Bandwidth

I have to day to day network troubleshoot and I need such a tool which shows what program consume the network bandwidth. So the Nethogs tool is small net top tool which fit exactly under my requirements. Here is the process to install and use of the tool. The tool monitors traffic going to and from a machine, by per process basis. jpudasaini@jpudasaini:~$ sudo apt-get install nethogs   *****Output******* [sudo] password for jpudasaini: Reading package lists... Done Building dependency tree       Reading state information... Done The following packages were automatically installed and are no longer required:   kde-l10n-engb linux-image-generic Use 'apt-get autoremove' to remove them. The following NEW packages will be installed:   nethogs 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 28.3 kB of archives. After this operation, 105 kB of additional disk space will be used. Get:1 http://np.archive.ubuntu.com/ubuntu/ saucy/universe

Powerpoint Problem on Linux

I like Some features of Microsoft office, so I install office 2007 into kali linux. Everything work perfect but when I try to run power-point, it never run. Then I search for fixed and found one solution. This trick has been posted in ubuntuforum and works perfect to me. Step 1. Got the Application>System tool>Wine configuration Setp 2. Under Library tab Add these two overrides "riched20" and "usp10". Setp 3. Apply and ok. Now you can run the power-point with out error.

Install MS office Kali Linux

Dear reader, you may think Why I install MS office rather than LibreOffice because I really like some feature on MS Office. Lets start to install MS office in Kali Linux or any other linux distro. For this I'm going to use wine.  In this blog post I install MS Office under kali linux, kali linux have wine installed by default. If you are going to install MS Office other than Kali Linux you may have to install WINE first.  Insert your MS Office disk into DVD drive or mount your image under any linux. After that just open setup.exe with wine.  Now your setup is began. Then you can type your product key. Chose your installation option.  Finally you got install MS Office under linux distro. Enjoy !

WINEon64Bit Kali Linux

When I install kali 1.0.5 amd64 then I realize WINE is not working at all, I tried to apt-get purge wine  and re-install it, but still there is no sign of wine . So here the process which make WINE worked under amd64 kali linux. This command works under other Linux as well. Please note their no WINE icon under Application>system. After following below setups you can see WINE configuration ICON and run windows program. root@kali:~# dpkg --add-architecture i386 root@kali:~# apt-get update root@kali:~# root@kali:~# apt-get install wine-bin:i386 ####output#### Need to get 77.6 MB of archives. After this operation, 233 MB of additional disk space will be used. Do you want to continue [Y/n]? yes ####output omitted##### Wait for packages to install. Now you can run windows program.

Remove Old Kernel packages Debian linux

Few days back I compile new kernel for kali linux to install driver. But that doesn't work and I have to remove new kernel packages. Here is command to remove old kernel packages form kali or any debian base linux root@kali:~# dpkg --purge linux-image-xxxx Remove xxxx with your image version, revision number

Kali linux Device not manage

Recently I upgrade Kali linux 1.0.4 to 1.0.5, all goes well but when I try to up eth0 it didn't up and show message "Device Not Manage". I did everything to get it up but no command avail to up it. like: root@kali:~#service networking restart root@kali:~#service networking start root@kali:~#ifconfig eth0 down root@kali:~#ifconfig eth0 up  Then after googling I found one solution root@kali:~# vi /etc/NetworkManager/NetworkManager.conf Network manager will opened and you can see following line on that file. [main] plugins=ifupdown,keyfile [ifupdown] managed=false Now edit and change  false to true [main] plugins=ifupdown,keyfile [ifupdown] managed=true Now use this command to restart Network manager root@kali:~# service network-manager restart Then you can see your LAN is working.