Unable to setup multi node cluster - snappydata

I am trying to setup multi node cluster of snappy data
locator config :
a.com -dir=/snappydatafiles/server1 -heap-size=7096m -locators=b.com:8888,a.com:9999
b.com -dir=/snappydatafiles/server2 -heap-size=7096m -locators=b.com:8888,a.com:9999
server config:
a.com -dir=/snappydatafiles/server1 -heap-size=7096m -locators=b.com:8888,a.com:9999
b.com -dir=/snappydatafiles/server2 -heap-size=7096m -locators=b.com:8888,a.com:9999
lead config :
a.com -heap-size=2096m -spark.ui.port=9090 -locators=b.com:8888,a.com:9999 -spark.executor.cores=8
It is giving this error when I run using /sbin/snappy-start-all.sh or bash /sbin/snappy-start-all.sh:
a.com: Warning: untrusted X11 forwarding setup failed: xauth key data not generated
a.com: export: Command not found.
a.com: perl: warning: Setting locale failed.
a.com: perl: warning: Please check that your locale settings:
a.com: LANGUAGE = (unset),
a.com: LC_ALL = (unset),
a.com: LC_CTYPE = "UTF-8",
a.com: LANG = "en_US.UTF-8"
a.com: are supported and installed on your system.
a.com: perl: warning: Falling back to the standard locale ("C").
a.com: opendir(/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh/..): Not a directory at -e line 1
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 33: ./snappy-config.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 34: ./spark-config.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 37: /bin/load-spark-env.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 38: /bin/load-snappy-env.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 44: /bin/snappy: No such file or directory
b.com: Warning: untrusted X11 forwarding setup failed: xauth key data not generated
b.com: export: Command not found.
b.com: export: Command not found.
b.com: opendir(/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh/..): Not a directory at -e line 1
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 33: ./snappy-config.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 34: ./spark-config.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 37: /bin/load-spark-env.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 38: /bin/load-snappy-env.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-locator.sh: line 44: /bin/snappy: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
a.com: Warning: untrusted X11 forwarding setup failed: xauth key data not generated
a.com: export: Command not found.
a.com: perl: warning: Setting locale failed.
a.com: perl: warning: Please check that your locale settings:
a.com: LANGUAGE = (unset),
a.com: LC_ALL = (unset),
a.com: LC_CTYPE = "UTF-8",
a.com: LANG = "en_US.UTF-8"
a.com: are supported and installed on your system.
a.com: perl: warning: Falling back to the standard locale ("C").
a.com: opendir(/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh/..): Not a directory at -e line 1
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 33: ./snappy-config.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 34: ./spark-config.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 36: /bin/load-spark-env.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 37: /bin/load-snappy-env.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 43: /bin/snappy: No such file or directory
b.com: Warning: untrusted X11 forwarding setup failed: xauth key data not generated
b.com: export: Command not found.
b.com: export: Command not found.
b.com: perl: warning: Setting locale failed.
b.com: perl: warning: Please check that your locale settings:
b.com: LANGUAGE = (unset),
b.com: LC_ALL = (unset),
b.com: LC_CTYPE = "UTF-8",
b.com: LANG = "en_US.UTF-8"
b.com: are supported and installed on your system.
b.com: perl: warning: Falling back to the standard locale ("C").
b.com: opendir(/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh/..): Not a directory at -e line 1
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 33: ./snappy-config.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 34: ./spark-config.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 36: /bin/load-spark-env.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 37: /bin/load-snappy-env.sh: No such file or directory
b.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-server.sh: line 43: /bin/snappy: No such file or directory
a.com: opendir(/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-lead.sh/..): Not a directory at -e line 1
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-lead.sh: line 33: ./snappy-config.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-lead.sh: line 34: ./spark-config.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-lead.sh: line 36: /bin/load-spark-env.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-lead.sh: line 37: /bin/load-snappy-env.sh: No such file or directory
a.com:/snappydata/snappydata-1.0.2.1-bin/sbin/snappy-lead.sh: line 43: /bin/snappy: No such file or directory
Note: when I replace hostname with localhost and run after set this path variable ( setenv SPARK_LOCAL_IP 127.0.0.1 ) it is running fine and all memebers are started.
Default environment is csh
echo $SHELL
/bin/csh
Bash installation
ls -l /bin/bash
-rwxr-xr-x 1 root root 941880 Mar 22 2016 /bin/bash
ls -l /usr/bin/env
lrwxrwxrwx. 1 root root 13 Dec 13 2017 /usr/bin/env -> ../../bin/env
export command is not working if run in normal terminal
But in root terminal export command works.

Related

Errors while trying to install Chrome using terminal

I want to use Selenium to scrape some data and I am working in AWS EC2. In order to run Selenium Webdriver with Python on an AWS EC2 Instance, I have to install chrome. So, I tried to run this command in terminal to install chrome:
curl https://intoli.com/install-google-chrome.sh | bash
Then what I am getting is:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 9526 100 9526 0 0 930k 0 --:--:-- --:--:-- --:--:-- 930k
Working in /tmp/google-chrome-installation
/tmp/google-chrome-installation /tmp
Configuring the Google Chrome repo in /etc/yum.repos.d/google-chrome.repo
bash: line 17: /etc/yum.repos.d/google-chrome.repo: No such file or directory
bash: line 18: /etc/yum.repos.d/google-chrome.repo: No such file or directory
bash: line 19: /etc/yum.repos.d/google-chrome.repo: No such file or directory
bash: line 20: /etc/yum.repos.d/google-chrome.repo: No such file or directory
bash: line 21: /etc/yum.repos.d/google-chrome.repo: No such file or directory
bash: line 22: /etc/yum.repos.d/google-chrome.repo: No such file or directory
bash: line 26: yum: command not found
--2023-02-06 06:53:47-- https://dl.google.com/linux/linux_signing_key.pub
Resolving dl.google.com (dl.google.com)... 172.253.63.190, 172.253.63.91, 172.253.63.136, ...
Connecting to dl.google.com (dl.google.com)|172.253.63.190|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12415 (12K) [application/octet-stream]
Saving to: ‘linux_signing_key.pub’
linux_signing_key.pub 100%[=============================================================>] 12.12K --.-KB/s in 0s
2023-02-06 06:53:47 (95.4 MB/s) - ‘linux_signing_key.pub’ saved [12415/12415]
bash: line 28: rpm: command not found
Attempting a direction installation with yum.
bash: line 40: yum: command not found
bash: line 54: yum: command not found
Downloading the Google Chrome RPM file.
bash: line 59: yum: command not found
bash: line 63: yumdownloader: command not found
--2023-02-06 06:53:47-- https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Resolving dl.google.com (dl.google.com)... 172.253.63.190, 172.253.63.91, 172.253.63.136, ...
Connecting to dl.google.com (dl.google.com)|172.253.63.190|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 98165972 (94M) [application/x-rpm]
Saving to: ‘google-chrome-stable_current_x86_64.rpm’
google-chrome-stable_current_x86_ 100%[=============================================================>] 93.62M 418MB/s in 0.2s
2023-02-06 06:53:47 (418 MB/s) - ‘google-chrome-stable_current_x86_64.rpm’ saved [98165972/98165972]
Downloaded google-chrome-stable_current_x86_64.rpm
bash: line 70: rpm: command not found
Installing the required font dependencies.
bash: line 76: yum: command not found
main: line 100: repoquery: command not found
http://: Invalid host name.
Extracting glibc...
main: line 107: rpm2cpio: command not found
main: line 100: repoquery: command not found
http://: Invalid host name.
Extracting util-linux...
main: line 107: rpm2cpio: command not found
main: line 100: repoquery: command not found
http://: Invalid host name.
Extracting libmount...
main: line 107: rpm2cpio: command not found
main: line 100: repoquery: command not found
http://: Invalid host name.
Extracting libblkid...
main: line 107: rpm2cpio: command not found
main: line 100: repoquery: command not found
http://: Invalid host name.
Extracting libuuid...
main: line 107: rpm2cpio: command not found
main: line 100: repoquery: command not found
http://: Invalid host name.
Extracting libselinux...
main: line 107: rpm2cpio: command not found
main: line 100: repoquery: command not found
http://: Invalid host name.
Extracting pcre...
main: line 107: rpm2cpio: command not found
Finding dependency for ldd.sh
main: line 176: repoquery: command not found
Finding dependency for ldd.sh
main: line 176: repoquery: command not found
Finding dependency for ldd.sh
main: line 176: repoquery: command not found
Finding dependency for ldd.sh
main: line 176: repoquery: command not found
Finding dependency for ldd.sh
main: line 176: repoquery: command not found
Finding dependency for ldd.sh
main: line 176: repoquery: command not found
Finding dependency for ldd.sh
main: line 176: repoquery: command not found
And these last 2 lines are repeating infinitely.
What should I do to move on?

Can't install "DBD-mysql" on Mac

When running this command: perl -MCPAN -e 'install DBD::mysql' I get a really long output of different errors:
Reading '/Users/philipjoss/.cpan/Metadata'
Database was generated on Tue, 07 Sep 2021 21:29:03 GMT
Running install for module 'DBD::mysql'
Checksum for /Users/philipjoss/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok
Configuring D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz with Makefile.PL
Can't exec "mysql_config": No such file or directory at Makefile.PL line 89.
Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'philipjoss' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'philipjoss'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
Can't exec "mysql_config": No such file or directory at Makefile.PL line 603.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 603.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 603.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
I will use the following settings for compiling and testing:
cflags (guessed) = -I/usr/local/mysql/include
embedded (guessed) =
libs (guessed) = -L/usr/local/mysql/lib -lmysqlclient -lz -lm -lcrypt -lnsl
mysql_config (guessed) = mysql_config
nocatchstderr (default) = 0
nofoundrows (default) = 0
nossl (default) = 0
testdb (default) = test
testhost (default) =
testpassword (default) =
testport (default) =
testsocket (default) =
testuser (guessed) = philipjoss
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
dyld: Library not loaded: #rpath/libmysqlclient.21.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-5/assertlib3PEYQc80
Reason: image not found
Can't link/include C library 'crypt', 'nsl', aborting.
Warning: No success on command[/usr/bin/perl Makefile.PL]
DVEEDEN/DBD-mysql-4.050.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
There seems to be quite a few posts and articles on this kind of error but the solutions all seem to be Linux focussed. I think the key part of this is that I need a mysql_config file but I have no idea where to start on this!
MacOS is 11.5.2. Perl is 5.30.2. MySQL is 8.0.26.
Thanks in advance!
Update:
Adding the specific mysql directory to my path as suggested in the comments below has got me a little further along but I'm getting a whole different set of errors now:
Reading '/Users/philipjoss/.cpan/Metadata'
Database was generated on Tue, 07 Sep 2021 21:29:03 GMT
Running install for module 'DBD::mysql'
Checksum for /Users/philipjoss/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok
Configuring D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz with Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'philipjoss' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'philipjoss'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/mysql-8.0.26-macos11-x86_64/include
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/mysql-8.0.26-macos11-x86_64/lib -lmysqlclient -lssl -lcrypto -lresolv
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = philipjoss
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
dyld: Library not loaded: #rpath/libmysqlclient.21.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-6/assertlib3PoRLEqr
Reason: image not found
dyld: Library not loaded: libssl.1.1.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-6/assertlib_CG2WA4d
Reason: image not found
dyld: Library not loaded: libcrypto.1.1.dylib
Referenced from: /Users/philipjoss/.cpan/build/DBD-mysql-4.050-6/assertlib0lH0wftp
Reason: image not found
wrong result: 'mysqlclient', 'ssl', 'crypto'
Warning: No success on command[/usr/bin/perl Makefile.PL]
DVEEDEN/DBD-mysql-4.050.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Update 2:
Following advice from the comments below I've switched to perlbrew and after one failure I've now finally got it installed (it took about 45 mins each time). Running my script now using perlbrew exec perl oncourt_update.pl now returns the original error: install_driver(mysql) failed: Can't locate DBD/mysql.pm in #INC. I've tried an installation using perlbrew use perl-5.34.0; cpan DBD::mysql however I get the following output:
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/Users/philipjoss/.cpan/Metadata'
Database was generated on Tue, 07 Sep 2021 21:29:03 GMT
Running install for module 'DBD::mysql'
Checksum for /Users/philipjoss/.cpan/sources/authors/id/D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring D/DV/DVEEDEN/DBD-mysql-4.050.tar.gz with Makefile.PL
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user 'philipjoss' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to 'philipjoss'#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/Cellar/mysql/8.0.26/include/mysql
embedded (guessed ) =
ldflags (guessed ) =
libs (mysql_config) = -L/usr/local/Cellar/mysql/8.0.26/lib -lmysqlclient -lz -lzstd -lssl -lcrypto -lresolv
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
nossl (default ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) = philipjoss
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if libs are available for compiling...
Can't link/include C library 'ssl', 'crypto', aborting.
Warning: No success on command[/Users/philipjoss/perl5/perlbrew/perls/perl-5.34.0/bin/perl Makefile.PL]
DVEEDEN/DBD-mysql-4.050.tar.gz
/Users/philipjoss/perl5/perlbrew/perls/perl-5.34.0/bin/perl Makefile.PL -- NOT OK
Looking at the output the line mysql> grant all privileges on test.* to 'philipjoss'#'localhost' looks strange as philipjoss isn't the username for localhost. Could this be something to do with the error? I note that the output states:
database user 'philipjoss' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.```

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.

perl mysql module installed fail on Windows

I'm trying to install mysql using:
cpanm DBD::mysql
I got output error like this: Set up gcc environment - 3.4.5 (mingw-vista special r3)
--> Working on DBD::mysql
Fetching http: //www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.025.tar.gz ... OK
Configuring DBD-mysql-4.025 ... OK
Building and testing DBD-mysql-4.025 ... FAIL
! Installing DBD::mysql failed. See C:\Users\myuser\cpanm\work\1384776992.9536\build.log for details. Retry with --force to force install it
When I opened the log file to check the detail, it's as bellows. Is there anyone help me out:
cpanm (App::cpanminus) 1.7001 on perl 5.012004 built for MSWin32-x86-multi-thread
Work directory is C:\Users\myuser/.cpanm/work/1384776992.9536
You have make C:\Perl\site\bin\dmake.exe
You have LWP 6.02
Falling back to Archive::Tar 1.76
Searching DBD::mysql on cpanmetadb ...
--> Working on DBD::mysql
Fetching http://www.cpan.org/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.025.tar.gz
-> OK
Unpacking DBD-mysql-4.025.tar.gz
Entering DBD-mysql-4.025
Checking configure dependencies from META.yml
Checking if you have DBI 1.08 ... Yes (1.616)
Configuring DBD-mysql-4.025
Running Makefile.PL
Set up gcc environment - 3.4.5 (mingw-vista special r3)
mysql_config.pl, and an associated bat file, has been
successfully created under
C:\PROGRA~1\MySQL\MYSQLS~1.1\bin
Unknown option: testdb
Unknown option: testhost
Unknown option: testuser
PLEASE NOTE:
For 'make test' to run properly, you must ensure that the
database user '' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.
mysql> grant all privileges on test.* to ''#'localhost' identified by 's3kr1t';
You can also optionally set the user to run 'make test' with:
perl Makefile.PL --testuser=username
Unknown option: testpassword
Unknown option: testsocket
Unknown option: testport
Unknown option: nocatchstderr
Unknown option: ssl
Unknown option: nofoundrows
Unknown option: force-embedded
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I"C:\PROGRA~1\MySQL\MYSQLS~1.1\include"
embedded (mysql_config) =
ldflags (mysql_config) =
libs (mysql_config) = -LC:\PROGRA~1\MySQL\MYSQLS~1.1\lib\opt -lmysqlclient -lzlib
mysql_config (guessed ) = mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testport (default ) =
testsocket (default ) =
testuser (guessed ) =
To change these settings, see 'perl Makefile.PL --help' and
'perldoc DBD::mysql::INSTALL'.
Checking if your kit is complete...
Warning: the following files are missing in your kit:
META.json
t/mem_leak.pl
Please inform the author.
Note (probably harmless): No library found for -lmysqlclient
Note (probably harmless): No library found for -lzlib
Using DBI 1.616 (for perl 5.012004 on MSWin32-x86-multi-thread) installed in C:/Perl/lib/auto/DBI/
Writing Makefile for DBD::mysql
-> OK
Finding PREREQ from Makefile ...
Checking if you have Test::More 0 ... Yes (0.98)
Checking if you have Data::Dumper 0 ... Yes (2.128)
Checking if you have Test::Deep 0 ... Yes (0.110)
Checking if you have DBI 1.08 ... Yes (1.616)
Building and testing DBD-mysql-4.025
cp lib/DBD/mysql.pm blib\lib\DBD\mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib\lib\DBD\mysql\GetInfo.pm
cp README.pod blib\lib\DBD\README.pod
cp lib/DBD/mysql/INSTALL.pod blib\lib\DBD\mysql\INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib\lib\Bundle\DBD\mysql.pm
C:/Perl/site/bin/gcc.exe -c -IC:\Perl\lib\auto\DBI -I"C:\PROGRA~1\MySQL\MYSQLS~1.1\include" - DDBD_MYSQL_INSERT_ID_IS_GOOD -g -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-strict-aliasing -mms-bitfields -O2 -DVERSION=\"4.025\" -DXS_VERSION=\"4.025\" "-IC:\Perl\lib\CORE" dbdimp.c
In file included from dbdimp.c:18:
dbdimp.h:21:49: mysql.h: No such file or directory
dbdimp.h:22:45: mysqld_error.h: No such file or directory
dbdimp.h:24:49: errmsg.h: No such file or directory
In file included from dbdimp.c:18:
dbdimp.h:157: error: syntax error before "MYSQL"
dbdimp.h:157: warning: no semicolon at end of struct or union
dbdimp.h:180: error: syntax error before '}' token
dbdimp.h:255: error: syntax error before "MYSQL_RES"
dbdimp.h:255: warning: no semicolon at end of struct or union
dbdimp.h:258: error: syntax error before "row_num"
dbdimp.h:258: warning: data definition has no type or storage class
dbdimp.h:263: error: syntax error before "insertid"
dbdimp.h:263: warning: data definition has no type or storage class
dbdimp.h:267: error: conflicting types for 'use_mysql_use_result'
dbdimp.h:165: error: previous declaration of 'use_mysql_use_result' was here
dbdimp.h:274: error: syntax error before '}' token
...............................................
-> FAIL Installing DBD::mysql failed. See C:\Users\wangw35\.cpanm\work\1384776992.9536\build.log for details. Retry with --force to force install it.
These are the two important lines.
Note (probably harmless): No library found for -lmysqlclient
Note (probably harmless): No library found for -lzlib
You need to install the mysqlclient (and also zlib) on your system.