Skip to content
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

Sonic Pi Boot Error #1231

Closed
tsale0512 opened this issue May 16, 2016 · 13 comments

Comments

@tsale0512
Copy link

commented May 16, 2016

Have just update to Sonic Pi 2.10 on Mac and have this fault

Can't open UDP port 4558.

Sonic Pi Boot Error Report

System Information

  • Sonic Pi version: 2.10.0
  • OS: OS X 10.11

GUI Log

/Users/mereside/.sonic-pi/log/gui.log

[GUI] - using default editor colours
[GUI] - starting UDP OSC Server on port 4558...
[GUI] - unable to listen to UDP OSC messages on port 4558
[GUI] - shutting down any old audio servers...
[GUI] - booting live coding server
[GUI] - waiting for server to boot...
............................................................
[GUI] - Critical error! Could not boot server.

Server Errors

/Users/mereside/.sonic-pi/log/server-errors.log

Received Exception!
Address already in use - bind(2) for "127.0.0.1" port 4557
["/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/osc/udp_server.rb:30:in `bind'", "/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/osc/udp_server.rb:30:in `initialize'", "/Applications/Sonic Pi.app/Contents/MacOS/../../app/server/bin/sonic-pi-server.rb:58:in `new'", "/Applications/Sonic Pi.app/Contents/MacOS/../../app/server/bin/sonic-pi-server.rb:58:in `<main>'"]
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/osc/udp_server.rb:30:in `bind'
/Applications/Sonic Pi.app/app/server/sonicpi/lib/sonicpi/osc/udp_server.rb:30:in `initialize'
/Applications/Sonic Pi.app/Contents/MacOS/../../app/server/bin/sonic-pi-server.rb:58:in `new'
/Applications/Sonic Pi.app/Contents/MacOS/../../app/server/bin/sonic-pi-server.rb:58:in `<main>'

Server Output

/Users/mereside/.sonic-pi/log/server-output.log

Sonic Pi server booting...
Using protocol: udp

Scsynth Output

/Users/mereside/.sonic-pi/log/scsynth.log


thanks in advance!
@Factoid

This comment has been minimized.

Copy link
Collaborator

commented May 17, 2016

Most likely a copy of the sonic-pi server was still running, perhaps the gui client crashed or didn't shut down cleanly. If you try ps aux | grep sonic-pi-sever
You should get something like this.

factoid  10892  0.5  1.2 1069952 49104 pts/5   Sl+  21:58   0:01 ruby /home/factoid/src/ruby/sonic-pi/app/gui/qt/../../../app/server/bin/sonic-pi-server.rb
factoid  11010  0.0  0.0  14232   948 pts/7    S+   22:02   0:00 grep --color=auto sonic-pi-server

In which case you need to do a kill 10892 (the number I typed matches the number in the 2nd column of the "ruby /path/to/sonic-pi-server.rb") to force a shutdown of the server, which should free up that port, and you can just launch sonic-pi again.

Or, you can just try signing out and back in of your account, or rebooting your computer. Whichever you are most comfortable with.

@stuzog

This comment has been minimized.

Copy link

commented May 30, 2016

Sonic Pi 2.10 runs cleanly on my iMac OS X 10.11.5 but the above ps aux (etc.) command only returns one line, similar to the last line. I don't get the line including the path to the Sonic Pi server. This is similar to the ps aux (etc.) return I get on a Raspberry Pi 2 using Sonic Pi 2.10 with a HiFiBerry DAC+ with latest Linux etc., which so far outputs distorted sound. Why only one line of ps aux in both cases?

@samaaron

This comment has been minimized.

Copy link
Owner

commented May 31, 2016

On my Mac this is what I see:


∴ /Users/sam/Development/RPi/sonic-pi/app/server/sonicpi
λ ps aux | grep sonic-pi-server
sam             19540   0.0  0.0  2433816    604 s007  R+   11:51am   0:00.00 grep sonic-pi-server
sam             18732   0.0  0.4  2610772  61052 s008  S+   11:24am   0:01.35 /Users/sam/Development/RPi/sonic-pi/app/gui/qt/build/Sonic Pi.app/Contents/MacOS/../../app/server/native/osx/ruby/bin/ruby /Users/sam/Development/RPi/sonic-pi/app/gui/qt/build/Sonic Pi.app/Contents/MacOS/../../app/server/bin/sonic-pi-server.rb
@Factoid

This comment has been minimized.

Copy link
Collaborator

commented May 31, 2016

What's likely happened then is that you have a zombie scsynth process, that shutting down the server didn't resolve. Next try.

ps aux | grep scsynth

If there's a process running when sonic-pi isn't, that's what's causing the server to fail booting.

@samaaron

This comment has been minimized.

Copy link
Owner

commented May 31, 2016

That's not a zombie process - that is Sonic Pi running as expected :-)

@Factoid

This comment has been minimized.

Copy link
Collaborator

commented May 31, 2016

If scsynth is still around after sonic-pi has shut down? I've had crashes that have left it running and interfere with future boots.

@samaaron

This comment has been minimized.

Copy link
Owner

commented May 31, 2016

Oh, I'm just referring to my ps listing which I ran during Sonic Pi's execution.

I've been working on a better system for handling zombies. It's 80% done and currently in master. Zombies are currently the #1 issue on Windows so needs to be nuked by v2.11

@samaaron

This comment has been minimized.

Copy link
Owner

commented Sep 28, 2016

Hi,

could you try this beta of v2.11 which now has an auto zombie killer:

http://sonic-pi.net/files/tmp/sp211-beta.zip

@samaaron

This comment has been minimized.

Copy link
Owner

commented Feb 19, 2018

Closing for now as this conversation appears to have stopped.

Please feel free to re-open if you're still having issues with v3.1.0 on macOS :-)

@samaaron samaaron closed this Feb 19, 2018

@smariganti

This comment has been minimized.

Copy link

commented Jul 25, 2018

Sonic Pi Boot Error Report

System Information

  • Sonic Pi version: 3.1.0
  • OS: macOS 10.13

GUI Log

/Users/srikanthm/.sonic-pi/log/gui.log

[GUI] - Detecting port numbers...
[GUI] - GUI OSC listen port 4558
[GUI] -    port: 4558 [OK]
[GUI] - Server OSC listen port 4557
[GUI] -    port: 4557 [OK]
[GUI] - Server incoming OSC cues port 4559
[GUI] -    port: 4559 [OK]
[GUI] - Scsynth port 4556
[GUI] -    port: 4556 [OK]
[GUI] - Server OSC out port 4558
[GUI] - GUI OSC out port 4557
[GUI] - Scsynth send port 4556
[GUI] - Erlang router port 4560
[GUI] -    port: 4560 [OK]
[GUI] - OSC MIDI out port 4561
[GUI] -    port: 4561 [OK]
[GUI] - OSC MIDI in port 4562
[GUI] -    port: 4562 [OK]
[GUI] - Init script completed
[GUI] - using default editor colours
[GUI] - launching Sonic Pi Server:
[GUI] - starting UDP OSC Server on port 4558...
[GUI] - UDP OSC Server ready and listening
[GUI] - Ruby server pid registered: 4523
[GUI] - waiting for Sonic Pi Server to boot...
............................................................
[GUI] - Critical error! Could not boot Sonic Pi Server.
[GUI] - stopping UDP OSC Server...

Server Errors

/Users/srikanthm/.sonic-pi/log/server-errors.log

libc++abi.dylib: terminating
/Applications/Sonic Pi.app/app/server/ruby/vendor/sys-proctable-1.1.3/lib/darwin/sys/proctable.rb:163: warning: constant ::Fixnum is deprecated

Server Output

/Users/srikanthm/.sonic-pi/log/server-output.log

Sonic Pi server booting...
Using protocol: udp
Detecting port numbers...
Send port: 4558
Listen port: 4557
  - OK
Scsynth port: 4556
  - OK
Scsynth send port: 4556
  - OK
OSC cues port: 4559
  - OK
Erlang port: 4560
  - OK
OSC MIDI out port: 4561
  - OK
OSC MIDI in port: 4562
  - OK
Booting server...


Booting Sonic Pi
----------------

Boot - Booting on OS X
Boot - Checkout audio rates on OSX:
Boot - Input audio rate: 16000.0
Boot - Output audio rate: 44100.0
Boot - Audio input and output rates do not match.
Boot - Attempting to set the input rates to match output rate of 44100.0...
Boot - Starting the SuperCollider server...
Boot - /Applications/Sonic Pi.app/app/server/native/scsynth -u 4556 -a 1024 -m 131072 -D 0 -R 0 -l 1 -i 16 -o 16 -U /Applications/Sonic Pi.app/app/server/native/supercollider/plugins/ -b 4096 -B 127.0.0.1

Scsynth Output

/Users/srikanthm/.sonic-pi/log/scsynth.log

# Starting SuperCollider 2018-07-25 12:05:32
Found 0 LADSPA plugins
Number of Devices: 4
   0 : "srikanth-pods"
   1 : "srikanth-pods"
   2 : "Built-in Microph"
   3 : "Built-in Output"

ERROR: Input sample rate is 16000, but output is 44100. Mismatched sample rates are not supported. To disable input, set the number of input channels to 0.
could not initialize audio.

Process Log

/Users/srikanthm/.sonic-pi/log/processes.log



Clearing pids: []
No pids to clear :-)
Started [4523] [-] /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/native/ruby/bin/ruby --enable-frozen-string-literal -E utf-8 /Applications/Sonic Pi.app/Contents/MacOS/../../app/server/ruby/bin/sonic-pi-server.rb -u 4557 4558 4556 4556 4559 4560 4561 4562 [-] /var/folders/gk/83pdxzt976g4wlcsg0624_7h0000gn/T/sonic-pi-pids/4523



@smariganti

This comment has been minimized.

Copy link

commented Jul 25, 2018

This issue is observed when i connect my air-pods. After disconnecting application booted up successfully.

@ethancrawford

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2018

@smariganti your issue is a different one - It's due to a limitation of Sonic Pi's underlying sound synthesis engine, SuperCollider - the input and output sample rates need to match. (See Sam's comment on #1856 for a work around).
That particular issue should be fixed in the next release of Sonic Pi, which hopefully will be released some time in the near future.

@smariganti

This comment has been minimized.

Copy link

commented Jul 25, 2018

Thanks @ethancrawford . Ill go through the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.