GithubHelp home page GithubHelp logo

Comments (22)

mariohuang avatar mariohuang commented on September 28, 2024

Please make sure you have the permission to create file in /usr/phxsql/etc/.
And could you please offer us the version of Python you are using?

from phxsql.

theseusyang avatar theseusyang commented on September 28, 2024

也就是说 etc/my.cnf 这些文件是在安装的时候在 /usr/phxsql/目录下创建出来的, 而不是本来已经有的文件?

from phxsql.

theseusyang avatar theseusyang commented on September 28, 2024

python 的版本是 Python 2.7.6

from phxsql.

mariohuang avatar mariohuang commented on September 28, 2024

是的,我们会根据tools/etc_template/my.cnf的文件生成一份文件放到etc/下,如果执行无法成功,你可以尝试手动复制该文件并修改其中的ip端口等参数。

from phxsql.

theseusyang avatar theseusyang commented on September 28, 2024

试了一下, 执行 install.py 脚本时还是有错误.

不知道拷贝../etc_template下面的配置文件到/etc下, 之后执行什么脚本命令?

from phxsql.

theseusyang avatar theseusyang commented on September 28, 2024

config_generator.py 脚本中的 cp.write()中路径有问题,
cp.write(open('%s/etc/my.cnf' % self.m_args.base_dir,'w'))中.'%s/etc/my.cnf' 显示的是 '/xxx/xxx//etc/my.cnf'的文件路径, 显然这个路径是错误的.

from phxsql.

mariohuang avatar mariohuang commented on September 28, 2024

请问你的安装包放在哪个目录下?
如果是/usr/phxsql,那么我们将会生成/usr/phxsql/etc/my.cnf文件。

from phxsql.

theseusyang avatar theseusyang commented on September 28, 2024

是放在/usr/phxsql目录下, 安装脚本的路径是错的

IOError: [Errno 2] No such file or directory: '/usr/phxsql//etc/my.cnf'

from phxsql.

theseusyang avatar theseusyang commented on September 28, 2024

在config_generator.py 脚本中把路径补全之后继续执行 install.py 命令得到如下的错误:

generate all configs success....
mkdir: cannot create directory ‘/tmp/data//log’: No such file or directory
/tmp/data//phxbinlogsvr
mkdir: cannot create directory ‘/tmp/data//phxbinlogsvr’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//phxbinlogsvr/phxbinlogsvr’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//phxbinlogsvr/phxbinlogsvr/event_data’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//phxbinlogsvr/phxbinlogsvr/paxoslog’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//log’: No such file or directory
/tmp/data//percona.workspace
mkdir: cannot create directory ‘/tmp/data//percona.workspace’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//percona.workspace/data’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//percona.workspace/tmp’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//percona.workspace/binlog’: No such file or directory
mkdir: cannot create directory ‘/tmp/data//percona.workspace/innodb’: No such file or directory
chown: invalid user: ‘user:mysql’
cd /usr/phxsql//percona.src; ./scripts/mysql_install_db --defaults-file=/usr/phxsql//etc/my.cnf --user=mysql
Use of uninitialized value in chown at ./scripts/mysql_install_db line 700.
Use of uninitialized value in chown at ./scripts/mysql_install_db line 700.
Use of uninitialized value in chown at ./scripts/mysql_install_db line 700.
Use of uninitialized value in chown at ./scripts/mysql_install_db line 700.
Use of uninitialized value in chown at ./scripts/mysql_install_db line 700.
Use of uninitialized value in chown at ./scripts/mysql_install_db line 700.
Installing MySQL system tables..../bin/mysqld: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ./bin/mysqld) ./bin/mysqld: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: versionGLIBCXX_3.4.20' not found (required by ./bin/mysqld)
FATAL ERROR: Error closing mysqld pipe: Broken pipe
install mysql failed, ret 256
install failed, exit......

from phxsql.

theseusyang avatar theseusyang commented on September 28, 2024

调试了一下, 已经解决目录错误的问题.
在 install.py中设置路径的时候多了一个"/", 如/tmp/data/, 正确设置方式是 /tmp/data

from phxsql.

mariohuang avatar mariohuang commented on September 28, 2024

好的,谢谢,我们会尽力改善并做好其中的兼容工作:)

from phxsql.

toontong avatar toontong commented on September 28, 2024

这个情况算是一个python 脚本 中的bug阿,$BASE_DIR/etc 目录确实没自动创建,都没代码提交,不应该close吧。

from phxsql.

mariohuang avatar mariohuang commented on September 28, 2024

Sorry for the problem. Github ignore the empty directory phxrpc_package_config/etc in our first release. And we fixed it now!

from phxsql.

hzlpy avatar hzlpy commented on September 28, 2024
2016-09-01 17:16:54 0 [Note] ./bin/mysqld (mysqld 5.6.31-77.0-log) starting as process 15248 ...
FATAL ERROR: Error closing mysqld pipe: Broken pipe
install mysql failed, ret 256
install failed, exit......

出现了这个问题,有人遇到过吗?要怎么解决?

from phxsql.

mariohuang avatar mariohuang commented on September 28, 2024

你好,请把etc/my.cnf中的innodb_buffer_pool_size和innodb_log_file_size调小为你的内存可接受的范围然后再试试

from phxsql.

hzlpy avatar hzlpy commented on September 28, 2024

不行。
而且,经过我的测试,发现改过之后再执行
sudo python install.py -i localhost -p 54321 -g 6000 -y 11111 -P 17000 -a 8001 -f/tmp/data/
改过的两个参数又会被恢复修改之前的默认值。

from phxsql.

mariohuang avatar mariohuang commented on September 28, 2024

你好,请修改tools/etc_template/my.cnf内这两个选项的值。在install时,我们会根据该模版生成最终使用的my.cnf。

from phxsql.

hzlpy avatar hzlpy commented on September 28, 2024

分别改到了 100 M 和 50 M,还是同样的问题。
不修改参数,换一台电脑是可以执行的-_-#。

from phxsql.

toontong avatar toontong commented on September 28, 2024

先是取代码使用recurse-submodule选项的,3个phx***又各自有相同的submodule,取了不少时间。
再试在在centos-7下试编译,又各种问题,最终放弃。

改用docker吧,上传的 bin文件使用的是gcc4.8编译的, 我想制作一个Dockerfile,发现各种坑。
hub.docker.io使用的镜像并不是4.8。解决了4.8问题,还有install.py脚本的bug。
docker pull gcc:4.8后,又莫名发现mysql_install_db有perl的语法错~ 直了~又是镜像问题。
好吧,我暂时放弃了跑phxsql起来。
#8

from phxsql.

xinxinyixx avatar xinxinyixx commented on September 28, 2024

我用python2.7 install.py -i IP -p 54321 -g 6000 -y 11111 -P 17000 -a 8001 -f/tmp/data/ -s1会报错
FATAL ERROR: Error closing mysqld pipe: Broken pipe
install mysql failed, ret 256
install failed, exit......
如果不加最后的-s1就可以正常启动phxsql。请问要怎么解决才能保留迁移过来的数据

from phxsql.

wodesuck avatar wodesuck commented on September 28, 2024

@fushengyxx 麻烦贴一下详细日志。

from phxsql.

zhgypg avatar zhgypg commented on September 28, 2024

碰到类似的问题,不知道作者还在维护这个代码吗?

[root@phx02 tools]# python2.7 install.py -i "192.168.1.56" -p 54321 -g 6000 -y 11111 -P 17000 -a 8001 -f /home/phxsql/data/
Namespace(agent_port=6000, base_dir='/home/phxsql/', data_dir='/home/phxsql/data/', inner_ip='192.168.1.56', ip_list='192.168.1.56', module_name='test', mysql_port=11111, paxos_port=8001, phxbinlogsvr_port=17000, phxsqlproxy_port=54321, process_name='all', skip_data=0)
kill all binaries success....
mkdir: cannot create directory ‘/home/phxsql/etc’: File exists
generate all configs success....
mkdir: cannot create directory ‘/home/phxsql/data/log’: File exists
/home/phxsql/data/phxbinlogsvr
skip data 0
mkdir: cannot create directory ‘/home/phxsql/data/log’: File exists
/home/phxsql/data/percona.workspace
cd /home/phxsql/percona.src; ./scripts/mysql_install_db --defaults-file=/home/phxsql/etc/my.cnf --user=mysql --rpl_phx_sync_master=OFF
Installing MySQL system tables...2020-01-09 17:07:21 0 [Warning] 'THREAD_CONCURRENCY' is deprecated and will be removed in a future release.
2020-01-09 17:07:21 0 [Note] ./bin/mysqld (mysqld 5.6.31-77.0-log) starting as process 28784 ...
FATAL ERROR: Error closing mysqld pipe: Broken pipe
install mysql failed, ret 256
install failed, exit......

from phxsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.