-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when running rooter start --debug, rabbitmq crashes #9
Comments
Hi @mwr @cristiano-pacheco @riconeitzel @DavidLambauer Any help, much appreciated |
Hello @atlenquiryuk, I hope you're doing well. I would suggest stopping your environment and deleting the RabbitMQ folder from the Try to start the command again. Ok? Thanks, Cristiano. |
Thanks for getting back. Will try and revert back. |
I just followed your instructions and there is no rabbitmq folder (.devenv/state/rabbitmq) see screenshot Any suggestions ? Thanks |
Could you please share the content of your devenv.nix file?
…On Mon, 26 Feb 2024 at 18:36 atlenquiryuk ***@***.***> wrote:
Hi @cristiano-pacheco <https://github.com/cristiano-pacheco>
I just followed your instructions and there is no rabbitmq foleder
(.devenv/state/rabbitmq)
see screenshot
Any suggestions ?
Thanks
Screenshot.2024-02-26.at.21.34.08.png (view on web)
<https://github.com/run-as-root/rooter/assets/139079656/10803bfd-f98e-4765-a2fc-47266f2ba98d>
—
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGZOBPCIKOGASN4ZGEIURDYVT55JAVCNFSM6AAAAABDZFHM5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRVGMZTINRQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, see below. When I start the environment, I get the following { pkgs, inputs, lib, config, ... }: let
} |
Hello @atlenquiryuk, thank you for sharing it. Let's do a quick test. Please change your { pkgs, inputs, lib, config, ... }:
let
rooterBin = if builtins.getEnv "ROOTER_BIN" != "" then builtins.getEnv "ROOTER_BIN" else "rooter";
pkgs-stable = import inputs.nixpkgs-stable { system = pkgs.stdenv.system; };
composerPhar = builtins.fetchurl{
url = "https://github.com/composer/composer/releases/download/2.2.22/composer.phar";
sha256 = "1lmibmdlk2rsrf4zr7xk4yi5rhlmmi8f2g8h2izb8x4sik600dbx";
};
magerun2Phar = builtins.fetchurl{
url = "https://github.com/netz98/n98-magerun2/releases/download/7.2.0/n98-magerun2.phar";
sha256 = "0z1dkxz69r9r9gf8xm458zysa51f1592iymcp478wjx87i6prvn3";
};
in {
dotenv.enable = true;
env = {
PROJECT_NAME = "rooter-mage";
PROJECT_HOST = "rooter-mage.rooter.test";
NGINX_PKG_ROOT = pkgs.nginx;
DEVENV_STATE_NGINX = "${config.env.DEVENV_STATE}/nginx";
DEVENV_PHPFPM_SOCKET = "${config.env.DEVENV_STATE}/php-fpm.sock";
DEVENV_DB_NAME = "app";
DEVENV_DB_USER = "app";
DEVENV_DB_PASS = "app";
DEVENV_AMQP_USER = "guest";
DEVENV_AMQP_PASS = "guest";
};
# PACKAGES
packages = [
pkgs.git
pkgs.gnupatch
pkgs.curl
pkgs.yarn
pkgs.gettext
];
scripts.composer.exec = ''php ${composerPhar} $@''; # Composer 2.2.x required by Magento2 <=2.4.6
scripts.magerun2.exec = ''php ${magerun2Phar} $@''; # magerun2 without hardlock to php8.2
# process-compose
process.implementation="process-compose";
process.process-compose={
"port" = config.env.DEVENV_PROCESS_COMPOSE_PORT;
"tui" = "false";
"version" = "0.5";
};
# PHP
languages.php = {
enable = true;
package = inputs.phps.packages.${builtins.currentSystem}.php81.buildEnv {
extensions = { all, enabled }: with all; enabled ++ [ redis xdebug xsl ];
extraConfig = ''
memory_limit = -1
error_reporting=E_ALL
xdebug.mode = coverage,debug
sendmail_path = ${pkgs.mailpit}/bin/mailpit sendmail -S 127.0.0.1:${config.env.DEVENV_MAIL_SMTP_PORT}
display_errors = On
display_startup_errors = On
'';
};
fpm.phpOptions =''
memory_limit = -1
error_reporting=E_ALL
xdebug.mode = debug
sendmail_path = ${pkgs.mailpit}/bin/mailpit sendmail -S 127.0.0.1:${config.env.DEVENV_MAIL_SMTP_PORT}
display_errors = On
display_startup_errors = On
'';
fpm.pools.web = {
listen = "${config.env.DEVENV_PHPFPM_SOCKET}";
settings = {
"clear_env" = "no";
"pm" = "dynamic";
"pm.max_children" = 20;
"pm.start_servers" = 6;
"pm.min_spare_servers" = 1;
"pm.max_spare_servers" = 10;
};
};
};
# JS
languages.javascript = {
enable = true;
package = pkgs.nodejs_20;
};
# nginx
services.nginx = {
enable = true;
configFile = "${config.env.DEVENV_STATE_NGINX}/nginx.conf";
};
# DATABASE
services.mysql = {
enable = true;
package = pkgs.mariadb_106;
settings = {
mysqld = {
port = config.env.DEVENV_DB_PORT;
innodb_buffer_pool_size = "2G";
table_open_cache = "2048";
sort_buffer_size = "8M";
join_buffer_size = "8M";
query_cache_size = "256M";
query_cache_limit = "2M";
};
};
initialDatabases = [{ name = "${config.env.DEVENV_DB_NAME}"; }];
ensureUsers = [
{
name = "${config.env.DEVENV_DB_USER}";
password = "${config.env.DEVENV_DB_PASS}";
ensurePermissions = { "${config.env.DEVENV_DB_NAME}.*" = "ALL PRIVILEGES"; };
}
];
};
# mailpit
services.mailpit = {
enable = true;
uiListenAddress = "127.0.0.1:${config.env.DEVENV_MAIL_UI_PORT}";
smtpListenAddress = "127.0.0.1:${config.env.DEVENV_MAIL_SMTP_PORT}";
};
# Redis
services.redis = {
enable = true;
port = lib.strings.toInt ( config.env.DEVENV_REDIS_PORT );
};
# ElasticSearch
services.elasticsearch = {
enable = true;
port = lib.strings.toInt ( config.env.DEVENV_ELASTICSEARCH_PORT );
tcp_port = lib.strings.toInt ( config.env.DEVENV_ELASTICSEARCH_TCP_PORT );
};
# RabbitMQ
services.rabbitmq = {
package = pkgs-stable.rabbitmq-server;
enable = true;
port = lib.strings.toInt ( config.env.DEVENV_AMQP_PORT );
managementPlugin = {
enable = true;
port = lib.strings.toInt ( config.env.DEVENV_AMQP_MANAGEMENT_PORT );
};
};
} Change the content of your allowUnfree: true
inputs:
nixpkgs:
url: github:NixOS/nixpkgs/nixpkgs-unstable
nixpkgs-stable:
url: github:NixOS/nixpkgs/nixos-23.05
phps:
url: github:fossar/nix-phps
inputs:
nixpkgs:
follows: nixpkgs Change your .envrc file to:
Delete the files and folders with the command below:
After it, please, restart your terminal and start the project again with the debug mode. What have we changed? We added a stable input thought the devenv.yaml file
nixpkgs-stable:
url: github:NixOS/nixpkgs/nixos-23.05 devenv.nix file
services.rabbitmq = {
package = pkgs-stable.rabbitmq-server; Please, let me know what are the results. Thanks, Cristiano. |
I followed your steps, now after running start in debug mode and when I rus status in anther cmd tab I get the below. I checked the devenv.nix and I can see the project name is already declared here So not sure why its throwing the below error |
Hello @atlenquiryuk, the issues you are facing are very weird. How can this happen if the variable is already set? I don't know what to say 🙈 Maybe define this variable in your |
@atlenquiryuk The error you shared in your last screenshot looks like the environment variables from .env are not set in your current shell.
Running |
I finally got pass that issue. @mwr you are right, I did @cristiano-pacheco your rabbitmq changes worked. Now I'm facing a different issue when running Thanks |
@atlenquiryuk Great that it worked now. |
Hi @mwr Thank you. While I wait for PR and merge, is there a temp fix that I can put to fix this ?. Thanks |
Hello @atlenquiryuk, you can run the This is a command as an example:
Note: Don't forget to change the ports according to the values defined in your |
Just another thing to consider for the release, in the install command, I'm getting error This might need fixing . In latest version it uses |
Hello @atlenquiryuk, I'm not able to reproduce the timeout issue. According to my debug session, it will never occur because the timeout is disabled for that command.
|
@cristiano-pacheco thanks for double checking. @atlenquiryuk what is the result of the magento install command when you run it manually. |
Hi @mwr
Extremely sorry, this was my mistake, for port I had Now bin/magento setup:install has completed successfully. When using bin/magento setup:install, i dint receive a timeout error, its only when using Also note, when running Thanks |
@atlenquiryuk What magento version are you using? you can check the options by running |
Hi @mwr Im using magento 2.4.6-p4 Ok, So I ran all the setup steps successfully but now having issue accessing the site. See screenshots Wondering if there's any issue with routing. |
Just to add to the previous comment. Im able to access traffic dashboard Not able to access mailpit at https://rooter-mage-mail.rooter.test/ Update Im able to access mailpit by visiting http://127.0.0.1:18223/ as per the screenshot from traffic but not the magento website |
Thank you guys so much for your help, got it finally working. @cristiano-pacheco dint realise rooter doesn't add a host entry into the hosts file. Might be helpful to the other folks following the guide if you could add this to the it. Thanks again |
Do you plan to add varnish support for magento 2 environment ? Thanks |
rooter uses dnsmasq and does register a Maybe did you get an error during rooter installation while running:
Yes we do, I have created a public issue for this: #10 |
Hi @mwr Thanks for getting back. Yes, I did run the install command and as far as I remember everything had gone well. After adding the domains to host file, https works (see screenshot). May be there was an issue and I dint notice. Running this If I run Thanks |
Hi @mwr Just wanted to give an update incase it helps anyone else. In Thanks again for all your help |
@techguyuk Great that you got it working.
You can re-run
Not sure how it can happen that there is no port written to that file. |
Hi @mwr There were 2 files in /etc/resolver/
|
Sorry to bother you again. Im trying to setup xdebug, I followed the steps mentioned in the doc by
Page loads with no break point trigger. Any help ? |
Hi @mwr I got this working by doing some phpstorm settings as below |
This is my first time using rooter and having difficulty in getting a magento2 setup up and running
After running
rooter start --debug
,When running
rooter env:status
I see the belowrabbitmq │ 3097 │ - │ - │ 0 │ Completed
Plz help
Content from the commandline
[rabbitmq ] 2024-02-25 21:00:26.670094+00:00 [notice] <0.44.0> Application rabbitmq_prelaunch exited with reason: {{shutdown,{failed_to_start_child,prelaunch,{badmatch,{error,{{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}},{child,undefined,net_sup_dynamic,{erl_distribution,start_link,[#{clean_halt => false,name => rabbit_prelaunch_3115@localhost,name_domain => shortnames,net_tickintensity => 4,net_ticktime => 60,supervisor => net_sup_dynamic}]},permanent,false,1000,supervisor,[erl_distribution]}}}}}},{rabbit_prelaunch_app,start,[normal,[]]}} [rabbitmq ] {"Kernel pid terminated",application_controller,"{application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{badmatch,{error,{{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}},{child,undefined,net_sup_dynamic,{erl_distribution,start_link,[#{clean_halt => false,name => rabbit_prelaunch_3115@localhost,name_domain => shortnames,net_tickintensity => 4,net_ticktime => 60,supervisor => net_sup_dynamic}]},permanent,false,1000,supervisor,[erl_distribution]}}}}}},{rabbit_prelaunch_app,start,[normal,[]]}}}"} [rabbitmq ] Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{badmatch,{error,{{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}},{child,undefined,net_sup_dynamic,{erl_distribution,start_link,[#{clean_halt => false,name => rabbit_prelaunch_3115@localhost,name_domain => shortnames,net_tickintensity => 4,net_ticktime => 60,supervisor => net_sup_dynamic}]},permanent,false,1000,supervisor,[erl_distribution]}}}}}},{rabbit_prelaunch_app,start,[normal,[]]}}}) [rabbitmq ] [rabbitmq ] Crash dump is being written to: erl_crash.dump...done
Partial content from the log file
=erl_crash_dump:0.5 Sun Feb 25 21:00:28 2024 Slogan: Kernel pid terminated (application_controller) ({application_start_failure,rabbitmq_prelaunch,{{shutdown,{failed_to_start_child,prelaunch,{badmatch,{error,{{shutdown,{failed_to_start_child,net_kernel,{'EXIT',nodistribution}}},{child,undefined,net_sup_dynamic,{erl_distribution,start_link,[#{clean_halt => false,name => rabbit_prelaunch_3115@localhost,name_domain => shortnames,net_tickintensity => 4,net_ticktime => 60,supervisor => net_sup_dynamic}]},permanent,false,1000,supervisor,[erl_distribution]}}}}}},{rabbit_prelaunch_app,start,[normal,[]]}}}) System version: Erlang/OTP 25 [erts-13.2.2.6] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] Taints: crypto Atoms: 13698 Calling Thread: scheduler:1 =scheduler:1 Scheduler Sleep Info Flags: Scheduler Sleep Info Aux Work: THR_PRGR_LATER_OP Current Port: Run Queue Max Length: 0 Run Queue High Length: 0 Run Queue Normal Length: 0 Run Queue Low Length: 0 Run Queue Port Length: 0 Run Queue Flags: OUT_OF_WORK | HALFTIME_OUT_OF_WORK | NONEMPTY | EXEC Current Process: <0.0.0> Current Process State: Running Current Process Internal State: ACT_PRIO_NORMAL | USR_PRIO_NORMAL | PRQ_PRIO_NORMAL | ACTIVE | RUNNING Current Process Program counter: 0x0000000110b8c710 (init:sleep/1 + 64)
The text was updated successfully, but these errors were encountered: