# Akka gRPC/HTTP Interop giving 404

**URL:** https://discuss.akka.io/t/akka-grpc-http-interop-giving-404/8576
**Category:** Akka gRPC
**Tags:** akka-http, grpc
**Created:** [July 31, 2021, 4:08am UTC](https://discuss.akka.io/t/akka-grpc-http-interop-giving-404/8576 "2021-07-31T04:08:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nsadeh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/nsadeh/32/1982_2.png) [@nsadeh](https://discuss.akka.io/u/nsadeh)
#### Post date: [July 31, 2021, 4:08am UTC](https://discuss.akka.io/t/akka-grpc-http-interop-giving-404/8576/1 "2021-07-31T04:08:10Z")

</div>

Hello, I have an application running a gRPC service alongside a simple Akka HTTP endpoint. I am following this guide: [Akka HTTP interop • Akka gRPC](https://doc.akka.io/docs/akka-grpc/current/server/akka-http.html). The problem: when curling the HTTP endpoint I get 404 not found. I know it found the server because Akka-HTTP/10.2.5 is the server of the response header.

Some code:

```scala
object Server extends App {
        val conf = ConfigFactory
            .parseString("akka.http.server.preview.enable-http2 = on")
            .withFallback(ConfigFactory.defaultApplication())
        val system = ActorSystem("Interop", conf)
        new Server(system).run()
}

class Server(system: ActorSystem) {
    def run() = {
        // implicit sys, ec...
        val grpcService: HttpRequest => Future[HttpResponse] = ServiceHandler(new Service())
        val greeter = get {
            pathEndOrSingleSlash {
                complete("I am alive")
            }
        }
        // lifted this line straight out of the guide
        val grpcRoute = { ctx => grpcService(ctx.request).map(RouteResult.Complete) }
        val route = concat(greeter, grpcRoute)
        val binding = Http().newServerAt("127.0.0.1", 8080).bind(route)
        binding
    }
}

```

When I take out the gRPC route, the greeter endpoint works as intended. Otherwise, when I `curl http://localhost:8080`, I get

```auto
*Mark bundle as not supporting multiuser
<HTTP/1.1 404 Not Found
<Server: akka-http/10.2.5
<other-stuff

```

I am using akka-gRPC 2.0.0

What should I do to ensure interop between the two routes?

---

<div class="post-metadata">

### Author: ![jrudolph](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/jrudolph/32/80_2.png) [@jrudolph](https://discuss.akka.io/u/jrudolph)
#### Post date: [August 2, 2021, 12:19pm UTC](https://discuss.akka.io/t/akka-grpc-http-interop-giving-404/8576/2 "2021-08-02T12:19:25Z")

</div>

Hi @nsadeh,

from a first glance, your code seems correct. Does it work if you use `val route = greeter` instead?

Johannes

---

<div class="post-metadata">

### Author: ![nsadeh](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/nsadeh/32/1982_2.png) [@nsadeh](https://discuss.akka.io/u/nsadeh)
#### Post date: [August 2, 2021, 1:47pm UTC](https://discuss.akka.io/t/akka-grpc-http-interop-giving-404/8576/3 "2021-08-02T13:47:22Z")

</div>

Hi Johannes, yes it does. I think it’s an HTTP2 vs 1 issues. What I ended up doing for now is creating a second binding for my REST server. Now my app is listening on 2 ports. It’s not clean but this is for a MVP so it will have to do. If I push to production I will also deploy a gateway.
