# הפריסה נכשלת - exec\_command.rb:117:in \`spawn

**URL:** <https://meta.discourse.org/t/deployment-fails-exec-command-rbin-spawn/269039>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [20 ביוני,‏ 2023,‏ 2:35pm UTC](https://meta.discourse.org/t/deployment-fails-exec-command-rbin-spawn/269039 "2023-06-20T14:35:47Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![lejeczek](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lejeczek](https://meta.discourse.org/u/lejeczek)\
**Post date:** [20 ביוני,‏ 2023,‏ 2:35pm UTC](https://meta.discourse.org/t/deployment-fails-exec-command-rbin-spawn/269039/1 "2023-06-20T14:35:48Z")

</div>

Hi guys.  
Before I clutter here with long logs I pasted that below.  
Deployment fails each time this very way. Anybody can share any suggestion on what is the issue & how to fix I’ll appreciate very much.  
…

```plaintext
I, [2023-06-20T14:08:40.997134 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'LOAD_PLUGINS=0 bundle exec rake plugin:pull_compatible_all'
I, [2023-06-20T14:08:43.104608 #1] INFO -- : docker_manager is already at latest compatible version

I, [2023-06-20T14:08:43.104825 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
Redis::CommandError: READONLY You can't write against a read only replica. script: bcec1d9b3bbcfb089dc0b7316771be9f011872b6, on @user_script:8.
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/client.rb:162:in `call'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rack-mini-profiler-3.1.0/lib/mini_profiler/profiling_methods.rb:85:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis.rb:270:in `block in send_command'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis.rb:269:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis.rb:269:in `send_command'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/commands/scripting.rb:110:in `_eval'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/redis-4.8.1/lib/redis/commands/scripting.rb:97:in `evalsha'
/var/www/discourse/lib/discourse_redis.rb:273:in `eval'
/var/www/discourse/lib/distributed_mutex.rb:82:in `get_lock'
/var/www/discourse/lib/distributed_mutex.rb:50:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize'
/var/www/discourse/lib/tasks/db.rake:221:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
I, [2023-06-20T14:08:45.555646 #1] INFO -- : 

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 687 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

```

---

_[View the full topic](https://meta.discourse.org/t/deployment-fails-exec-command-rbin-spawn/269039)._
