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

Address already in use #2

Open
DaAwesomeP opened this issue Nov 27, 2017 · 2 comments
Open

Address already in use #2

DaAwesomeP opened this issue Nov 27, 2017 · 2 comments

Comments

@DaAwesomeP
Copy link

I am trying to connect to an OLA instance on my machine. I get the following error when the sketch starts:

Nov 27, 2017 3:46:13 PM artnet4j.ArtNet <init>
INFO: Art-Net v0001-20091119
java.net.BindException: Address already in use (Bind failed)
	at java.net.PlainDatagramSocketImpl.bind0(Native Method)
	at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:93)
	at java.net.DatagramSocket.bind(DatagramSocket.java:392)
	at java.net.DatagramSocket.<init>(DatagramSocket.java:242)
	at java.net.DatagramSocket.<init>(DatagramSocket.java:299)
	at java.net.DatagramSocket.<init>(DatagramSocket.java:271)
	at artnet4j.ArtNetServer.start(ArtNetServer.java:148)
	at artnet4j.ArtNet.start(ArtNet.java:102)
	at artnetP5.ArtnetP5.setup(ArtnetP5.java:41)
	at artnetP5.ArtnetP5.<init>(ArtnetP5.java:33)
	at mysketch.setup(mysketch.java:53)
	at processing.core.PApplet.handleDraw(PApplet.java:2412)
	at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1557)
	at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)

And then this every time my draw() loops:

node not found: 127.0.0.1

I have the same result if I use the local network IP and not the loopback. Here is my sketch:

int FPS = 1;

import artnetP5.*;
ArtnetP5 artnet;

void setup() {
  frameRate(FPS);
  size(300, 1, JAVA2D);

  artnet = new ArtnetP5();
}

int test = 255;

void draw() {
  fill(test);
  noStroke();
  rect(0,0,300,1);
  test--;
  if (test < 0) test = 255;
  
  sendPixels();
}

void sendPixels() {
  loadPixels();
  artnet.send(pixels, "127.0.0.1");
  updatePixels();
}
@timrolls
Copy link

timrolls commented Feb 2, 2018

OLA binds to the device. You can't use OLA with another application using that device on the same machine.

@DaAwesomeP
Copy link
Author

@timrolls I've done this many times before in other applications. artnetP5 shouldn't be listening, it should be connecting to OLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants