Sphinx - loading pickled environment... failed: [Errno 2] No such file or directory - pickle

When I'm generating the documentation I got the following error:
loading pickled environment... failed: [Errno 2] No such file or directory: '/home/me/project/.doctrees/environment.pickle'
The thing is that file do exists:
[me#server project]$ ls -al /home/me/project/.doctrees/environment.pickle
-rw-rw-r-- 1 me group 723522 Feb 28 15:52 /home/me/project/.doctrees/environment.pickle
Any ideas?

Related

Resetting mysql password results: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I keep getting the error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
When trying to connect to MySQL via terminal.
I've done both tutorials:
The official one:
https://help.ubuntu.com/community/MysqlPasswordReset
and a less official one:
https://coderwall.com/p/j9btlg/reset-the-mysql-5-7-root-password-in-ubuntu-16-04-lts
Creating the file /var/run/mysqld/mysqld.sock actually works after giving it permissions chown -R mysql /var/run/mysqld chown -R mysql /var/run/mysqld/mysqld.sock and then I can log in to mysql in the terminal and change my main user and root users the password.
After running sudo /etc/init.d/mysql start or sudo /etc/init.d/mysql restart I again - cannot connect to mysql using my user names and passwords.
service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-05-07 12:00:51 IDT; 43s ago
Process: 11057 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
Process: 11042 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 11056 (mysqld)
Tasks: 13 (limit: 4915)
Memory: 103.3M
CPU: 464ms
CGroup: /system.slice/mysql.service
└─11056 /usr/sbin/mysqld
May 07 12:00:20 asd systemd[1]: Starting MySQL Community Server...
May 07 12:00:51 asd systemd[1]: Started MySQL Community Server.
Following this post:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
Restarting mysql didn't work as mentioning at the begging of the post when running sudo /etc/init.d/mysql start again results:
sudo /etc/init.d/mysql start
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
sh: 0: getcwd() failed: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
[....] Starting mysql (via systemctl): mysql.servicejob-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
[ ok job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
.
sudo service mysql start
sh: 0: getcwd() failed: No such file or directory
completely reinstalling MySQL isn't acceptable.
One of the commenters said:
The client should be set consistent with server setting.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
which is weird because in my directory /var/run/mysqld/ the mysqld.sock file gets somehow deleted and don't have anything that looks like this in my /etc/mysql/my.cnf file:
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
#bind-address = 127.0.0.1
How do i stable my MySQL login properly?
Why is this happening?
Running:
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
In termux while using PHP v8.1.3 and MariaDB 10.6.4 l faced the same issue and l tried : telnet 127.0.0.1 3306 and l received the following response:
telnet: Unable to connect to remote host: Connection refused
And l knew that MySQL sever was not running and went further to run the following:
$PREFIX/etc/init.d/mysql stop
And received the following response:
ERROR! MariaDB server process #9102 is not running!
And l knew the problem is l haven't started the MySQL service which you may start as follows:
$PREFIX/etc/init.d/mysql start
In termux
Or
sudo /etc/init.d/mysql start
In Ubuntu
The response from termux is
Starting MariaDB.
220318 11:44:24 mysqld_safe Logging to '/data/data/com.termux/files/usr/var/lib/mysql/localhost.err'.
220318 11:44:25 mysqld_safe Starting mariadbd daemon with databases from /data/data/com.termux/files/usr/var/lib/mysql.
SUCCESS!
Good lucky!!!!
Are you still facing this issue? probably not but something similar happened to me and I realized that while the query was running OK, it was not affecting any rows...I modified the query to match only 'localhost' and that worked:
UPDATE mysql.user SET authentication_string=PASSWORD('YOURNEWPASSWORD'), plugin='mysql_native_password' WHERE User='root' AND Host='localhost';

virsh attatch-disk failed: no such file or directory

I'm using virsh attatch-disk to add a new device to a running guest under KVM:
# virsh attatch-disk <running-guest-id> --source c.raw --target vdb
the output is:
error: Failed to attach disk
error: Failed to open file 'c.raw': No such file or directory
But the new disk file is under the pwd:
ls -l
total 26653060
-rw-r--r--. 1 root root 8312913920 Jan 10 10:25 c.q
-rw-r--r--. 1 root root 53687091200 Jan 5 16:50 c.raw
-rw-r--r--. 1 root root 10759023104 Jan 6 02:14 c.VHD
why virsh open failed? I browsed libvirtd.log:
2017-01-14 15:22:00.954+0000: 2204: error : virStorageFileGetMetadataRecurse:952 : Failed to open file 'c.raw': No such file or directory
2017-01-14 15:22:08.310+0000: 2209: info : remoteDispatchAuthList:2432 : Bypass polkit auth for privileged client pid:1921,uid:0
What the log mean?
virsh --version
0.10.2
qemu-x86_64 -version
qemu-x86_64 version 2.4.1, Copyright (c) 2003-2008 Fabrice Bellard
I got the answer, you must use c.raw's Abs path, relative path are not handled by virsh.

"Can't create or write into directory" ownCloud MySql error

I installed owncloud 7.0.3 on a Raspberry Pi per instructions given in the admin manual. I then created an external folder under /media/owncloud/data on an USB drive. And moved /var/www/owncloud/data directory to this directory. Then I set up the ownership of this directory by (all after setting sudo -i at $ prompt)
chown -R www-data:www-data /media/owncloud/data/
and also did
chmod -R 0777 /media/owncloud/data/
But
stat ./data
reports
File: `./data'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 72 Links: 1
Access: (0700/drwx------) Uid: ( 1000/ pi) Gid: ( 1000/ pi)
Access: 2014-11-29 14:06:05.328198000 -0500
Modify: 2014-11-29 13:27:25.436161000 -0500
Change: 2014-11-29 13:27:25.436161000 -0500
Therefore when I try to login to owncloud on my browser I get
"Can't create or write into the data directory /media/owncloud/data
How can I make the ./data directory writable so that owncloud starts successfully?
Thank you.

Nagios NDOUtils installation - can't load mysql.so error

Hi I m very new to Linux & mysql...while I m installing ndoutils for nagios ,I have to execute this command from Db folder---
./installdb -u root -p root -h localhost -d nagios
while executing this command m getting this error-
install_driver(mysql) failed: Can't load
'/usr/lib/perl5/auto/DBD/mysql/mysql.so' for module DBD::mysql:
libmysqlclient.so.16: cannot open shared object file: No such file or
directory at /usr/lib/perl5/DynaLoader.pm line 200. at (eval 7) line
3 Compilation failed in require at (eval 7) line 3. Perhaps a required
shared library or dll isn't installed where expected at ./installdb
line 41
What should I do to remove this error? Help me
Looks like you need to install DRD::mysql for perl.
http://metacpan.org/pod/DBD::mysql

How to enable MySQL support in Qt SDK for Windows

I am trying to build a driver in order to connect Qt with MySQL
I followed the steps in this weblink
http://www.pikopong.com/blog/2010/04/11/how-to-enable-mysql-support-in-qt-sdk-for-windows/
but I got an error when I typed the command mingw32-make
The errors are :
C:\Qt\2009.04\qt\src\plugins\sqldrivers\mysql>mingw32-make
mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory `C:/Qt/2009.04/qt/src/plugins/sqldrivers/mys
ql'
g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB -
DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"..\..\..\..\include\QtCore" -I"..\..\..\..\i
nclude\QtSql" -I"..\..\..\..\include" -I"c:\MySQL\MySQL" -I"Server" -I"5.5\inclu
de" -I"..\..\..\..\include\ActiveQt" -I"debug" -I"..\..\..\..\mkspecs\win32-g++"
-o debug\main.o main.cpp
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.h:52:19: mysql.h: No such file or director
y
In file included from main.cpp:44:
../../../sql/drivers/mysql/qsql_mysql.h:107: error: expected `)' before '*' toke
n
mingw32-make[1]: *** [debug/main.o] Error 1
mingw32-make[1]: Leaving directory `C:/Qt/2009.04/qt/src/plugins/sqldrivers/mysq
l'
mingw32-make: *** [debug] Error 2
C:\Qt\2009.04\qt\src\plugins\sqldrivers\mysql>mingw32-make
*******************
Please help me with this problem.How could I solve this errors ?
Thanks in advance!
Wally!
IIANM, you shouldn't have set the %mySQLDIR% to a path that contains space. It should be something such as set %mySQLDIR%=C:\MySQL\MYSQLS~1.1. You can check the correct short path by using dir /x.
For an example:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>cd MySQL
C:\MySQL>dir /x
Volume in drive C is BOOTCAMP
Volume Serial Number is 785F-A9E4
Directory of C:\MySQL
07/11/2011 07:23 PM <DIR> .
07/11/2011 07:23 PM <DIR> ..
07/11/2011 07:23 PM <DIR> MYSQLS~1.1 MySQL Server 5.1
0 File(s) 0 bytes
3 Dir(s) 46,921,265,152 bytes free
C:\MySQL>cd MYSQLS~1.1
C:\MySQL\MYSQLS~1.1>