nimetu / docky

ryzom shard in docker
6 stars 3 forks source link

Enormous amount of errors #2

Closed tgwaste closed 2 years ago

tgwaste commented 2 years ago

So, I've been trying this just for fun. I followed the instructions, but the amount of errors after running docker-compose up is insane.. Way to many to post here. So ill start with some.

Nginx should this install nginx? cause it doesnt but it seems to need it?

web_1      | rm: can't remove '/etc/nginx/certs/server.crt': No such file or directory
web_1      | genrsa: Can't open "/etc/nginx/certs/docky-root.key" for writing, Permission denied
web_1      | rm: can't remove '/etc/nginx/certs/docky-root.crt': No such file or directory
web_1      | rm: can't remove '/etc/nginx/certs/docky-issuer.crt': No such file or directory
web_1      | rm: can't remove '/etc/nginx/certs/server.crt': No such file or directory
web_1      | genrsa: Can't open "/etc/nginx/certs/docky-root.key" for writing, Permission denied
web_1      | Checking certificates for 'localhost shard01.ryzomcore.local'

Then shard01_1 | touch: cannot touch '/srv/ryzom/shards/shard01/log.log': Permission denied there is nothing in /srv. should there be?

DB Stuff:

db_1       | 2022-08-30 18:00:53+00:00 [Note] [Entrypoint]: Initializing database files
db_1       | 2022-08-30 18:00:53 140681570035392 [Warning] Can't create test file /var/lib/mysql/f16e58c470ec.lower-test
db_1       | 2022-08-30 18:00:53 140681570035392 [ERROR] InnoDB: Operating system error number 13 in a file operation.
db_1       | 2022-08-30 18:00:53 140681570035392 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
db_1       | 2022-08-30 18:00:53 140681570035392 [ERROR] InnoDB: Operating system error number 13 in a file operation.
db_1       | 2022-08-30 18:00:53 140681570035392 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
db_1       | 2022-08-30 18:00:53 140681570035392 [ERROR] InnoDB: Cannot open datafile './ibdata1'

MYSQL

db_1       | Warning: Memory not freed: 520
db_1       |
db_1       | Installation of system tables failed!  Examine the logs in
db_1       | /var/lib/mysql/ for more information.
db_1       |
db_1       | The problem could be conflicting information in an external
db_1       | my.cnf files. You can ignore these by doing:
db_1       |
db_1       |     shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
db_1       |
db_1       | You can also try to start the mysqld daemon with:
db_1       |
db_1       |     shell> /usr/sbin/mysqld --skip-grant-tables --general-log &
db_1       |
db_1       | and use the command line tool /usr/bin/mysql
db_1       | to connect to the mysql database and look at the grant tables:
db_1       |
db_1       |     shell> /usr/bin/mysql -u root mysql
db_1       |     mysql> show tables;
db_1       |
db_1       | Try 'mysqld --help' if you have problems with paths.  Using
db_1       | --general-log gives you a log in /var/lib/mysql/ that may be helpful.
db_1       |
db_1       | The latest information about mysql_install_db is available at
db_1       | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
db_1       | You can find the latest source at https://downloads.mariadb.org and
db_1       | the maria-discuss email list at https://launchpad.net/~maria-discuss
db_1       |
db_1       | Please check all of the above before submitting a bug report
db_1       | at http://mariadb.org/jira
nimetu commented 2 years ago

These look like permission issues on shard-data directory.

Its expected that shard-data has uid=1000;gid=1000 permissions as each container will add new user which is used to run things and by default they uid/gid will be that.

Remove your current shard-data, copy template to shard-data to try again. You could also edit Dockerfile on each container and remove the 'USER ryzom' lines so that processes will run as root.

tgwaste commented 2 years ago

Changing perms helped for sure. Here's what im getting now

shard01_1  | touch: cannot touch '/srv/ryzom/shards/shard01/log.log': Permission denied
shard01_1  | touch: cannot touch '/srv/ryzom/shards/shard01/log.log': Permission denied
shard01_1  | touch: cannot touch '/srv/ryzom/shards/shard01/log.log': Permission denied
shard01_1  | Cloning into '/srv/ryzom/src/ryzom-core.git'...
shard01_1  | Compiling shard...
shard01_1  | /srv/ryzom/src/build-core-static /srv/ryzom
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
shard01_1  | Compiling shard...
shard01_1  | /srv/ryzom/src/build-core-static /srv/ryzom
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
shard01_1  | Compiling shard...
shard01_1  | /srv/ryzom/src/build-core-static /srv/ryzom
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
shard01_1  | Compiling shard...
shard01_1  | /srv/ryzom/src/build-core-static /srv/ryzom
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
shard01_1  | Compiling shard...
shard01_1  | /srv/ryzom/src/build-core-static /srv/ryzom
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
shard01_1  | Compiling shard...
shard01_1  | /srv/ryzom/src/build-core-static /srv/ryzom
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
docky_shard01_1 exited with code 1
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
docky_shard01_1 exited with code 1
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
docky_shard01_1 exited with code 1
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
docky_shard01_1 exited with code 1
shard01_1  | CMake Error: The source directory "/srv/ryzom/src/ryzom-core.git/code" does not exist.
shard01_1  | Specify --help for usage, or press the help button on the CMake GUI.
docky_shard01_1 exited with code 1
nimetu commented 2 years ago

Compiling should be fixed, but running shard from atys repo is having some issues still.

For me it crashes after char creation, so I need check that next.

tgwaste commented 2 years ago

still doesnt seem to work docky_shard01_1 exited with code 2 docker-compose exec shard01 bash doesnt seem to do anything

you cant access the web stuff if its running in a VM because it attaches to an internal IP thats only available from the machine so headless servers are out.

tgwaste commented 2 years ago

got it start building.. but it bailed out

shard01_1  | [ 30%] Built target make_alias_file
shard01_1  | [ 31%] Built target make_anim_by_race
shard01_1  | [ 31%] Built target make_anim_melee_impact
shard01_1  | [ 31%] Linking CXX executable ../../../bin/pd_parser
shard01_1  | [ 32%] Built target assoc_mem
shard01_1  | /usr/bin/ld: CMakeFiles/pd_parser.dir/parser.cpp.o: file not recognized: file truncated
shard01_1  | collect2: error: ld returned 1 exit status
shard01_1  | make[2]: *** [ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/build.make:144: bin/pd_parser] Error 1
shard01_1  | make[1]: *** [CMakeFiles/Makefile2:2170: ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/all] Error 2
shard01_1  | make[1]: *** Waiting for unfinished jobs....
nimetu commented 2 years ago

file not recognized: file truncated error seems like the file is corrupt (possibly 0 size).

nimetu commented 2 years ago

It should now be possible to compile and run shard, and connect to it using live atys client.

You do need to rebuild the shard01 with docker-compose build and then relaunch it.

Easiest is to delete old shard-data and copy template to shard-data again.

If keeping old shard-data, then make sure to delete content of shard-data/src and shard-data/server, copy over clone-and-compile.sh and build.sh scripts and alter nel.permissions table with ClientApplication field.

tgwaste commented 2 years ago

It just doesnt work

shard01_1  | compilation terminated.
shard01_1  | make[2]: *** [ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/build.make:76: ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/parser.cpp.o] Error 1
shard01_1  | make[2]: *** Deleting file 'ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/parser.cpp.o'
shard01_1  | make[1]: *** [CMakeFiles/Makefile2:2170: ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/all] Error 2
shard01_1  | make[1]: *** Waiting for unfinished jobs....
shard01_1  | [ 31%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/net_log.cpp.o
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/service.cpp.o
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/sock.cpp.o
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/stdin_monitor_thread.cpp.o
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/stdnet.cpp.o
shard01_1  | [ 32%] Linking CXX executable ../../../../bin/mp_generator
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/tcp_sock.cpp.o
shard01_1  | [ 32%] Built target mp_generator
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/transport_class.cpp.o
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/udp_sim_sock.cpp.o
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/udp_sock.cpp.o
shard01_1  | [ 32%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/unified_network.cpp.o
shard01_1  | [ 33%] Building CXX object ryzom/tools/leveldesign/mission_compiler_lib/CMakeFiles/ryzom_mission_compiler_lib.dir/step_content.cpp.o
shard01_1  | [ 33%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/unitime.cpp.o
shard01_1  | [ 34%] Building CXX object nel/src/net/CMakeFiles/nelnet.dir/varpath.cpp.o
shard01_1  | [ 34%] Building CXX object ryzom/tools/leveldesign/mission_compiler_lib/CMakeFiles/ryzom_mission_compiler_lib.dir/steps.cpp.o
shard01_1  | [ 34%] Building CXX object ryzom/tools/leveldesign/mission_compiler_lib/CMakeFiles/ryzom_mission_compiler_lib.dir/variables.cpp.o
shard01_1  | [ 34%] Linking CXX static library ../../../lib/libnelnet.a
shard01_1  | [ 34%] Built target nelnet
shard01_1  | [ 34%] Linking CXX static library ../../../../lib/libryzom_mission_compiler_lib.a
shard01_1  | [ 34%] Built target ryzom_mission_compiler_lib
shard01_1  | make: *** [Makefile:152: all] Error 2

shard01_1  | [ 56%] Building CXX object ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_animation_module.cpp.o
shard01_1  | [ 56%] Building CXX object nel/src/3d/CMakeFiles/nel3d.dir/mesh_mrm_skin_template.cpp.o
shard01_1  | [ 57%] Building CXX object nel/src/3d/CMakeFiles/nel3d.dir/mesh_mrm_skinned.cpp.o
shard01_1  | [ 58%] Building CXX object ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_edition_module.cpp.o
shard01_1  | c++: fatal error: Killed signal terminated program cc1plus
shard01_1  | compilation terminated.
shard01_1  | make[2]: *** [ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/build.make:1519: ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_admin_module.cpp.o] Error 1
shard01_1  | make[2]: *** Deleting file 'ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_admin_module.cpp.o'
shard01_1  | make[2]: *** Waiting for unfinished jobs....
shard01_1  | [ 58%] Building CXX object nel/src/3d/CMakeFiles/nel3d.dir/mesh_mrm_skinned_instance.cpp.o
shard01_1  | [ 58%] Building CXX object nel/src/3d/CMakeFiles/nel3d.dir/mesh_mrm_skinned_template.cpp.o
shard01_1  | [ 58%] Building CXX object nel/src/3d/CMakeFiles/nel3d.dir/mesh_multi_lod.cpp.o
shard01_1  | [ 58%] Building CXX object nel/src/3d/CMakeFiles/nel3d.dir/mesh_multi_lod_instance.cpp.o
shard01_1  | [ 58%] Building CXX object nel/src/3d/CMakeFiles/nel3d.dir/meshvp_per_pixel_light.cpp.o
shard01_1  | [ 65%] Building CXX object ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_animation_module.cpp.o
shard01_1  | [ 66%] Building CXX object ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_edition_module.cpp.o
shard01_1  | [ 66%] Building CXX object nel/src/gui/CMakeFiles/nelgui.dir/lua_helper.cpp.o
shard01_1  | c++: fatal error: Killed signal terminated program cc1plus
shard01_1  | compilation terminated.
shard01_1  | make[2]: *** [nel/src/gui/CMakeFiles/nelgui.dir/build.make:921: nel/src/gui/CMakeFiles/nelgui.dir/lua_helper.cpp.o] Error 1
shard01_1  | make[2]: *** Deleting file 'nel/src/gui/CMakeFiles/nelgui.dir/lua_helper.cpp.o'
shard01_1  | make[1]: *** [CMakeFiles/Makefile2:912: nel/src/gui/CMakeFiles/nelgui.dir/all] Error 2
shard01_1  | make[1]: *** Waiting for unfinished jobs....
shard01_1  | c++: fatal error: Killed signal terminated program cc1plus
shard01_1  | compilation terminated.
shard01_1  | make[2]: *** [ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/build.make:1545: ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_edition_modul
e.cpp.o] Error 1
shard01_1  | make[2]: *** Deleting file 'ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_edition_module.cpp.o'
shard01_1  | make[2]: *** Waiting for unfinished jobs....
shard01_1  | {standard input}: Assembler messages:
shard01_1  | {standard input}:226684: Warning: end of file not at end of a line; newline inserted
shard01_1  | {standard input}:227611: Error: unknown pseudo-op: `.lc220'
shard01_1  | c++: fatal error: Killed signal terminated program cc1plus
shard01_1  | compilation terminated.
shard01_1  | make[2]: *** [ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/build.make:1532: ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/server_animation_mod
ule.cpp.o] Error 1
shard01_1  | make[1]: *** [CMakeFiles/Makefile2:1832: ryzom/common/src/game_share/CMakeFiles/ryzom_gameshare.dir/all] Error 2
shard01_1  | {standard input}: Assembler messages:
shard01_1  | {standard input}:4649818: Warning: end of file not at end of a line; newline inserted
shard01_1  | {standard input}:4651130: Error: unknown pseudo-op: `.qua'
shard01_1  | c++: fatal error: Killed signal terminated program cc1plus
shard01_1  | compilation terminated.
shard01_1  | make[2]: *** [ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/build.make:76: ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/parser.cpp.o] Error 1
shard01_1  | make[1]: *** [CMakeFiles/Makefile2:2170: ryzom/tools/pd_parser/CMakeFiles/pd_parser.dir/all] Error 2
shard01_1  | make: *** [Makefile:152: all] Error 2
docky_shard01_1 exited with code 0
nimetu commented 2 years ago

Might be out of memory issue on compiling?

I see that I have JOBS set to 4 in docker-compose.yml, which I now removed as it really should not of been there. Build script already uses nproc to set jobs based of cpu cores and JOBS env variable just overrides that.

tgwaste commented 2 years ago

I doubled the resources. Definately better. Things seem to have started. I cant access the web via https://192.168.0.35:8481/tcp and when I click new user it just takes me to ryzoms site. maybe this needs to be changed?

CreateAccountURL = "https://me.ryzom.com";
EditAccountURL   = "https://me.ryzom.com";
ForgetPwdURL     = "https://me.ryzom.com/?forget_password=1";

But I also remember you mentioned char creation is broke still.

nimetu commented 2 years ago

By default it only listens to localhost ip. You need to override ports in shard01 and web containers. You can use 0.0.0.0 where 127.0.0.1 is used.

Docker does not play well with linux ufw firewall by default, so all of those ports will be available for outside.

For client, you only need to override StartupHost and Application lines in client.cfg (check README.md). You can then use username testuser with password testuser for ingame login.

As for creating new users (not characters), edit shard-data/www/public/config.php and set $ALLOW_UNKNOWN=true; That will create new user on first login (just put in username/password), and then login.

AMS interface in port 8481 does not create ingame user (I'm sure I probably just have it setup wrong). Use testuser/testuser to login into ingame.

tgwaste commented 2 years ago

Almost got it but the game crashes with 2022/09/01 13:53:45 Ryzom ERR 06912600 connection.cpp 691 : connection : FS refused the connection (Socket error: Hostname resolution failed for shard01.ryzomcore.local (0)). when I try to change that address to my address in docker compose the game says its in maint mode.

nimetu commented 2 years ago

You need to edit /etc/hosts (or c:/windows/system32/drivers/etc/hosts on windows) and add the shard01.ryzomcore.local IP to there.

tgwaste commented 2 years ago

Thanks that helped. I'm not getting any errors or crashes anymore but unfortunately all I see is a black screen after signing in and the test character I create never seems to save. I do hear sound though.

nimetu commented 2 years ago

With black screen you probably have EGS crash.

Make sure you have updated shard-data files from template, namely shards/common/data_common/database.xml, shards/common/data_common/msg.xml, and translations in shards/data_shard/language.