Coder Social home page Coder Social logo

Failure to get socket about pimidi HOT 9 CLOSED

ravelox avatar ravelox commented on August 23, 2024
Failure to get socket

from pimidi.

Comments (9)

ravelox avatar ravelox commented on August 23, 2024

Hi. That looks like you don't have network.bind_address set in your configuration file.

Thanks

Dave

from pimidi.

qzic avatar qzic commented on August 23, 2024

Tried running with a config file with the network.bind_address but got same result. Any suggestions on how to debug this further?

Here is the output running in debug mode with network.bind_address=192.168.1.110 in raveloxmidi.conf

pi@raspberrypi:~/pimidi-master/raveloxmidi $ raveloxmidi -d -c raveloxmidi.conf
network.control.port = 5004
network.data.port = 5005
network.local.port = 5006
network.socket_timeout = 30
network.max_connections = 8
service.name = raveloxmidi
run_as_daemon = yes
daemon.pid_file = raveloxmidi.pid
logging.enabled = yes
logging.log_file = (null)
logging.log_level = debug
security.check = yes
readonly = no
inbound_midi = /dev/sequencer
file_mode = 0640
config.file = raveloxmidi.conf
[1554930827] INFO: raveloxmidi (0.6.0)
[1554930827] DEBUG: net_socket_init: network.bind_address=[(null)], family=0
[1554930827] ERROR: net_socket_init: Invalid address family [(null)][0]
[1554930827] ERROR: Unable to create sockets
[1554930827] DEBUG: config_teardown config_items=0xed54a0 num_items=15

from pimidi.

ravelox avatar ravelox commented on August 23, 2024

Hi, that config file doesn't include network.bind_address. Can you show me the debug output when that setting is in there?

Can you also show me the contents of the config file?

Thanks

Dave

from pimidi.

qzic avatar qzic commented on August 23, 2024

The config file is a one-liner, the ip address is the address of the Pi. The debug output above was with the following line in the config file

network.bind_address=192.168.1.110

from pimidi.

ravelox avatar ravelox commented on August 23, 2024

When was the last time you checked out the master branch? I'm running v0.6.0 compiled from master today and I don't see the problem you do.

dkelly@ubuntu:~$ cat oneliner.conf
network.bind_address=192.168.0.211

dkelly@ubuntu:~$ raveloxmidi -c oneliner.conf -d
network.control.port = 5004
network.data.port = 5005
network.local.port = 5006
network.socket_timeout = 30
network.max_connections = 8
service.name = raveloxmidi
run_as_daemon = yes
daemon.pid_file = raveloxmidi.pid
logging.enabled = yes
logging.log_file = (null)
logging.log_level = debug
security.check = yes
readonly = no
inbound_midi = /dev/sequencer
file_mode = 0640
alsa.input_buffer_size = 4096
config.file = ./oneliner.conf
network.bind_address = 192.168.0.211
[1554936255] INFO: raveloxmidi (0.6.0)
[1554936255] DEBUG: net_socket_init: network.bind_address=[192.168.0.211], family=2
[1554936255] DEBUG: net_socket_create: Creating socket for [192.168.0.211]:5004, family=2
[1554936255] DEBUG: net_socket_create: Creating socket for [192.168.0.211]:5005, family=2
[1554936255] DEBUG: net_socket_create: Creating socket for [192.168.0.211]:5006, family=2
[1554936255] WARNING: net_socket_setup: Unable to open /dev/sequencer : Permission denied
[1554936255] INFO: Adding service 'raveloxmidi._apple-midi._udp'
[1554936255] DEBUG: net_socket_loop_init: pipe0=9 pipe1=10
[1554936256] INFO: Service 'raveloxmidi' successfully established.

from pimidi.

ravelox avatar ravelox commented on August 23, 2024

Out of interest, are you sure that raveloxmidi.conf is in the same directory you're in?

from pimidi.

qzic avatar qzic commented on August 23, 2024

I downloaded the .zip file about 2 weeks ago. The config file is being read, you can see it in the debug output. but it's interesting that in your output the file is prefixed by ./ but not in mine. Maybe I should just do a clean and rebuild.

from pimidi.

qzic avatar qzic commented on August 23, 2024

OK, problem solved. In my .conf file I had only one line
network.bind_address=192.168.1.110

I added a blank line after this 1st line and voila, it ran as expected. Your code probably wants to see a CR/LF at the end of the line.

from pimidi.

ravelox avatar ravelox commented on August 23, 2024

Thanks for the information. I'll check through the code and fix it up. I'm using fgets() to read each line but according to the man page, EOF will read it correctly.

Glad you found a workaround.

from pimidi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.