The requested URL can't be reached


#1

Hello,

I’m running a spark server on cloud9 for my API

[main] INFO org.mongodb.driver.cluster - Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
Mar 06, 2018 2:03:45 PM org.mongodb.morphia.logging.MorphiaLoggerFactory chooseLoggerFactory
INFO: LoggerImplFactory set to org.mongodb.morphia.logging.jdk.JDKLoggerFactory
[cluster-ClusterId{value='5a9e9fc189701113e5cb63b3', description='null'}-localhost:27017] INFO org.mongodb.driver.connection - Opened connection [connectionId{localValue:1, serverValue:2}] to localhost:27017
[cluster-ClusterId{value='5a9e9fc189701113e5cb63b3', description='null'}-localhost:27017] INFO org.mongodb.driver.cluster - Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[2, 6, 12]}, minWireVersion=0, maxWireVersion=2, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=null, roundTripTimeNanos=1538457}
[Thread-1] INFO org.eclipse.jetty.util.log - Logging initialized @1084ms
[Thread-1] INFO spark.webserver.JettySparkServer - == Spark has ignited ...
[Thread-1] INFO spark.webserver.JettySparkServer - >> Listening on 0.0.0.0:4567
[Thread-1] INFO org.eclipse.jetty.server.Server - jetty-9.3.z-SNAPSHOT
[Thread-1] INFO org.eclipse.jetty.server.ServerConnector - Started ServerConnector@4f40b3e8{HTTP/1.1,[http/1.1]}{0.0.0.0:4567}
[Thread-1] INFO org.eclipse.jetty.server.Server - Started @1163ms

The problem is that i can’t reach it from ARC/POSTMAN as you can see below

I took the ip shown to me with ip addr :

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
5713: eth0@if5714: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc hfsc state UP group default 
    link/ether 02:42:ac:11:00:18 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.24/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe11:18/64 scope link tentative dadfailed 
       valid_lft forever preferred_lft forever

I search on some topic but can’t find a working answer, do you have any idea ?


#2

Are you making requests TO a c9.io hosted workspace with that request? If so, there are a few issues here:

  • The only way to hit a workspace externally is through the preview URL. You need to serve data through 0.0.0.0 on ports 8080-8082. This will be returned through the preview URL; you’ll have to specify the port if you’re using one that isn’t 8080.
  • GET requests to the Preview URL from external sources will trigger the splash page, which is a phishing deterrent. You’ll want to make POST requests as this won’t trigger the splash page.