Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-13028

camel-undertow - When using SSL with rest-dsl and api-doc then you can get a port already bound exception

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      For example this route cannot startup

      	public void configure() throws Exception {
      
      		restConfiguration().scheme("https").component("undertow").port(7777).contextPath("/").host("0.0.0.0")
                  .apiContextPath("/swagger.json")
      				.dataFormatProperty("prettyPrint", "true")
      
      				.apiProperty("api.schemes", "https")
      				.apiProperty("api.title", "Rest swagger")
      				.apiProperty("api.description", "Camel Rest App with Swagger");
      
      		rest("/user").get().to("direct:start");
      
      		from("direct:start").setBody().constant("Hi Camels");
      	}
      

      With a

      Caused by: java.net.BindException: Address already in use
              at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_181]
              at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_181]
              at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_181]
              at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_181]
              at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_181]
      ...
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: