satori-com / mzbench

MZ Benchmarking
BSD 3-Clause "New" or "Revised" License
269 stars 78 forks source link

Error on starting the server #149

Open Abby1096 opened 5 years ago

Abby1096 commented 5 years ago

Hi

I pulled the commit '02be2684655cde94d537c322bb0611e258ae9718' and I'm using the Erlang OTP release 18. Facing Issue on starting the server ./bin/mzbench start_server

===> Compiling mzbench_api ===> Compiling src/mzb_k8s_plugin.erl failed src/mzb_k8s_plugin.erl:26: syntax error before: ':='

src/mzb_k8s_plugin.erl:34: type plugin_opts() undefined

make: *** [.make/compilation-up-to-date] Error 1 make: Leaving directory/home/centos/mzbench/server'`

Can anyone help me with this !?

parsifal-47 commented 5 years ago

Hi, unfortunately, it looks like the release 18 is no longer supported, you may see the versions that it is currently checked against here: https://github.com/mzbench/mzbench/blob/master/.travis.yml

The place it breaks is a type-hint, it is not critical, but I'm not completely sure that the rest of the code is OK with erl18, you may try to remove lines 26-29 and see what happened if you can't upgrade to 19 or 20. Otherwise, consider upgrading

also please check this branch: https://github.com/mzbench/mzbench it has some updates regarding k8 plugin

Thanks!

Abby1096 commented 5 years ago

Now , I could able to run the server . I changed the syntax := to => And it runs. [Abby@ip-172-31-33-167 mzbench]$ ./bin/mzbench start_server Executing make -C /home/centos/mzbench/bin/../server generate Waiting for server application start ..Webserver is started at http://127.0.0.1:4800 No config file is used, to create one run: cp ~/.config/mzbench/server.config.example ~/.config/mzbench/server.config ok

But however I couldn't view it on browser .Anything I need to change ?

parsifal-47 commented 5 years ago

is it running on the same host as your browser? the reason I ask is: by default it is not opened for external connections, you need to change bind address from "127.0.0.1" to "0.0.0.0" if you need to connect from outside

Abby1096 commented 5 years ago

Nope..I am running mzbench server in an instance..Then , Is it possible to view in my Local Browser ? Is there any configuration changes to allow the external connections in MzBench Server ?

parsifal-47 commented 5 years ago

yes, you need to copy config file as it suggests:

cp ~/.config/mzbench/server.config.example ~/.config/mzbench/server.config

and then change "127.0.0.1" to "0.0.0.0" in it, please let me know if it works

parsifal-47 commented 5 years ago

more precisely, it should be {network_interface, "127.0.0.1"},

and you need to change it to 0.0.0.0

Abby1096 commented 5 years ago

[centos@ip-172-31-32-208 mzbench]$ ./bin/mzbench restart_server --config=~/.config/mzbench/server.config Executing make -C /home/centos/mzbench/bin/../server generate Executing /home/centos/mzbench/bin/../server/_build/default/rel/mzbench_api/bin/mzbench_api stop . Executing make -C /home/centos/mzbench/bin/../server generate Waiting for server application start ..............................Server has failed to start, timeout Check /home/centos/mzbench/bin/../server/log/error.log for details

I am getting the above mentioned lines ..Can I know the path of the Log Files ?

Abby1096 commented 5 years ago

I found the log files in the path mzbench/server/log/error.log(Is the path is right ?)

And the logs are 05:23:28.580 [error] <0.149.0> CRASH REPORT Process <0.149.0> with 0 neighbours exited with reason: {config_read_error,"/home/centos/mzbench/~/.config/mzbench/server.config",enoent} in mzb_api_app:load_config/2 line 111 in application_master:init/4 line 134 05:23:35.993 [error] <0.149.0> CRASH REPORT Process <0.149.0> with 0 neighbours exited with reason: {config_read_error,"/home/centos/mzbench/~/.config/mzbench/server.config",enoent} in mzb_api_app:load_config/2 line 111 in application_master:init/4 line 134 05:23:39.405 [error] <0.149.0> CRASH REPORT Process <0.149.0> with 0 neighbours exited with reason: {config_read_error,"/home/centos/mzbench/~/.config/mzbench/server.config",enoent} in mzb_api_app:load_config/2 line 111 in application_master:init/4 line 134 05:23:46.824 [error] <0.149.0> CRASH REPORT Process <0.149.0> with 0 neighbours exited with reason: {config_read_error,"/home/centos/mzbench/~/.config/mzbench/server.config",enoent} in mzb_api_app:load_config/2 line 111 in application_master:init/4 line 134 05:23:50.235 [error] <0.149.0> CRASH REPORT Process <0.149.0> with 0 neighbours exited with reason: {config_read_error,"/home/centos/mzbench/~/.config/mzbench/server.config",enoent} in mzb_api_app:load_config/2 line 111 in application_master:init/4 line 134 05:23:57.644 [error] <0.149.0> CRASH REPORT Process <0.149.0> with 0 neighbours exited with reason: {config_read_error,"/home/centos/mzbench/~/.config/mzbench/server.config",enoent} in mzb_api_app:load_config/2 line 111 in application_master:init/4 line 134

parsifal-47 commented 5 years ago

enoent could indicate that server has no privileges to open the config file, please check access rights

Abby1096 commented 5 years ago

You are mentioning the server.config file ...Right ? [centos@ip-172-31-32-208 ~]$ ll ~/.config/mzbench/ -rw-rw-r--. 1 centos centos 1334 Dec 7 05:13 server.config -rw-rw-r--. 1 centos centos 1336 Dec 7 05:03 server.config.example

Both Files have the same access rights

timofey-barmin commented 5 years ago

It complains about "/home/centos/mzbench//.config/mzbench/server.config" but your config is in ~/.config/mzbench/ I guess you need to move it to /home/centos/mzbench//.config/mzbench/ :)

Abby1096 commented 5 years ago

/home/centos/mzbench//.config/mzbench/ I couldn't Get this path in my folder...

Tilde(~) signs are formatted to Text with line Over it ..Now I have modified the Logs..Can U pls Look over once again

parsifal-47 commented 5 years ago

interesting, it could be a bug while resolving "~", just to make sure I understand you: there is no path /home/centos/mzbench//.config/mzbench/ in your system, so it tries to find config there and fails, what if you create it? I understand that generally it is maybe not a good idea, but just to make sure we diagnose it correctly