Git Product home page Git Product logo

Comments (10)

puneetkhanduri avatar puneetkhanduri commented on September 24, 2024

In your example try http://localhost: 31900/foo/bar/all?departureDate=2017-11-24 and then look at localhost:31149

from diffy.

LimpanB avatar LimpanB commented on September 24, 2024

Im sorry my bad, tired friday afternoon. I am using
http://localhost:31900/foo/bar/all?departureDate=2017-11-24
And all im getting is a blank page, whenever i run the example.sh. Figured out the "You must specify host and port" problem. It didnt allow me to use http://. But now im still just getting a blank page/nothing return when i curl.

from diffy.

leenasn avatar leenasn commented on September 24, 2024

I am getting this error when I use a non-localhost URL. The command I tried is as follows:

java -jar diffy-server.jar \
-candidate=localhost:3000 \
-master.primary='http://<URLinheroku>' \
-master.secondary='http://<URLinheroku> \
-service.protocol=http \
-serviceName=MyService \
-proxy.port=:31900 \
-admin.port=:31159 \
-http.port=:31149 \
-rootUrl='localhost:31149'

Am I doing anything wrong? Or is it that it can run only against localhost? But I saw that #53 its mentioned that you can run this against any host.

The stacktrack is as follows:

java.lang.NumberFormatException: For input string: "//blacklotus-staging.herokuapp.com"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:569)
	at java.lang.Integer.parseInt(Integer.java:615)
	at scala.collection.immutable.StringLike$class.toInt(StringLike.scala:272)
	at scala.collection.immutable.StringOps.toInt(StringOps.scala:30)
	at com.twitter.finagle.util.InetSocketAddressUtil$$anonfun$parseHostPorts$3.apply(InetSocketAddressUtil.scala:44)
	at com.twitter.finagle.util.InetSocketAddressUtil$$anonfun$parseHostPorts$3.apply(InetSocketAddressUtil.scala:40)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
	at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33)
	at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:186)

I tried passing the port as 80 and got the same error.

The error went when I passed the URL by removing http://, but the tests are failing because it doesn't seem to be sending the requests to the right URL. I am getting the error as /www.herokucdn.com/error-pages/no-such-app.html.

Can you help me fix this? Thanks.

from diffy.

puneetkhanduri avatar puneetkhanduri commented on September 24, 2024

@leenasn I have had similar problems when resolving herokuapp.com subdomains. Unfortunately, I am not sure how to address that. The canonical address format used by diffy is something like mystagingdomain.com:80 but I don't think that solves your problem because you are using heroku subdomains. Sorry couldn't be of more help.

@mosesn Any thoughts on how to get finagle to resolve a subdomain like "blacklotus-staging.herokuapp.com"?

from diffy.

mosesn avatar mosesn commented on September 24, 2024

Regarding the URL, I don't know exactly how you are using this inside of finagle, but it sounds like you're using it for the host header and the dest string. Neither of these should include the http:// scheme. When I go to blacklotus-staging.herokuapp.com in my web browser, it seems to not exist. Is there another app I can try out?

from diffy.

puneetkhanduri avatar puneetkhanduri commented on September 24, 2024

This is being used as a destination string to initialize a finagle http client.

It's passed as the server argument to this method:
https://github.com/twitter/diffy/blob/master/src/main/scala/com/twitter/diffy/proxy/HttpDifferenceProxy.scala#L37

from diffy.

puneetkhanduri avatar puneetkhanduri commented on September 24, 2024

I remember trying something like "blacklotus-staging.herokuapp.com:80" (without http://) but it didn't seem to resolve properly.

from diffy.

mosesn avatar mosesn commented on September 24, 2024

@puneetkhanduri that url doesn't seem to be good. Do you have another example?

from diffy.

puneetkhanduri avatar puneetkhanduri commented on September 24, 2024

moviehopper.herokuapp.com

from diffy.

sarath21 avatar sarath21 commented on September 24, 2024

@puneetkhanduri I have similar issue. I have non-localhost machine.
Getting the following error.

$ java -jar target/scala-2.11/diffy-server.jar -candidate=<hostname-without-http>:80 -master.primary=<hostname-without-http>:80 -master.secondary=<hostname-without-http>:80 -service.protocol=http -serviceName=VMS-Service -proxy.port=:8880 -admin.port=:8881 -http.port=:8888 -rootUrl='localhost:8888'

On making curl request, I'm getting the following error.

I 0424 21:08:49.879 THREAD1: Scheduling com.twitter.diffy.workflow.FunctionalReport at 2018-04-24 21:08:49 +0000 D 0424 21:09:12.917 THREAD26: success networking D 0424 21:09:12.917 THREAD26: error lifting com.twitter.finagle.NoBrokersAvailableException: No hosts are available for secondary, Dtab.base=[], Dtab.local=[] at com.twitter.finagle.NoStacktrace(Unknown Source)

Without port, I'm getting for primary, secondary, candidate hosts.

I 0424 21:17:18.219 THREAD1: secondary: name resolution failed java.lang.IllegalArgumentException: requirement failed: You must specify host and port at scala.Predef$.require(Predef.scala:219) at com.twitter.finagle.util.InetSocketAddressUtil$$anonfun$parseHostPorts$3.apply(InetSocketAddressUtil.scala:41) at com.twitter.finagle.util.InetSocketAddressUtil$$anonfun$parseHostPorts$3.apply(InetSocketAddressUtil.scala:40)

I'm using diffy-server latest clone assembly.

from diffy.

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.