# Go error: panic: config file (-i) is not found

**URL:** <https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379>\
**Category:** Building/Development\
**Created:** [April 7, 2022, 3:28am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379 "2022-04-07T03:28:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 7, 2022, 3:28am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/1 "2022-04-07T03:28:11Z")

</div>

Checking what I am doing wrong here

I am trying to run the http server based upon the following exercise

> <https://github.com/openziti/sdk-golang/tree/main/exercises/http>
>
> //github.com/openziti/sdk-golang/tree/main/exercises/http

This is the command I run

> go run simple-server.go -i httpzServer.json

This the the error returned

> panic: config file (-i) is not found  
> goroutine 1 [running]:  
> main.createZitiListener()  
> /home/opc/sdk-golang-main/exercises/http/server/zitified/simple-server.go:37 +0x18b  
> main.main()  
> /home/opc/sdk-golang-main/exercises/http/server/zitified/simple-server.go:17 +0x6b

exit status 2

I am not really sure what this means

any tips ?

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 7, 2022, 10:18am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/2 "2022-04-07T10:18:53Z")

</div>

This is a vastly simpler program. It works exclusively with positional arguments not with ‘flags’ (`-i` for example).

use:

```auto
go run simple-server.go httpzServer.json

```

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 7, 2022, 10:35am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/3 "2022-04-07T10:35:48Z")

</div>

Thanks… I tried that and now get a different error… any tips… what is the second variable.?

[opc@instance-20220317-1005 zitified]$ go run simple-server.go httpzServer.json

panic: runtime error: index out of range [2] with length 2

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 7, 2022, 10:45am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/4 "2022-04-07T10:45:52Z")

</div>

🙂 yep. you need to tell it what service you want the server to use to bind on. pick a service that the identity has a ‘bind’ service-policy for that identity/service combo:

> <https://github.com/openziti/sdk-golang/blob/main/exercises/http/server/zitified/simple-server.go#L42>

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 7, 2022, 11:10am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/5 "2022-04-07T11:10:46Z")

</div>

Two wins in less than 4 hours… this must be a record for me 🙂

Great tip… thx heaps  
Scott

[opc@instance-20220317-1005 zitified]$ go run simple-server.go httpzServer.json httpz  
INFO[0000] connection to edge router using api session token 73adaf95-9108-44a4-8578-0f4ea17d39b7

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 7, 2022, 11:21am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/6 "2022-04-07T11:21:41Z")

</div>

one more question

> what URL do I type into the mobile browser.. ?

I really don't know what I am doing

> > the ZitiMobileEdge app says that the identity is enrolled. and lists the services

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 7, 2022, 11:45am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/7 "2022-04-07T11:45:11Z")

</div>

ok… really weird stuff… and not sure how to interpret this… as I am in dark mode 🙂

as I run the service on the mobile… with the VPN connected through the identity…

when I run sudo tshark on the server… I noticed the following

```
7 0.000588999 10.0.0.41 → 168.138.12.254 TLSv1 305 Client Hello
8 0.000687483 168.138.12.254 → 10.0.0.41 TLSv1 305 Client Hello

```

This signals to me… that it was working… but… I have no idea of what I would expect in the browser… as nothing was rendered…

I am assuming that this is a positive outcome… but dont really know

Ant tips re next steps.?

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 7, 2022, 11:59am UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/8 "2022-04-07T11:59:53Z")

</div>

I want to bring this back to the other thread if we can - so I'll answer you there. Sound good? Let's bring this thread back to that other one where you first asked about it . It'll get you up and running i'm sure 😉

Relevant thread will continue here:

> [@Configuring the http example that connects to ZitiMobileEdge client](https://openziti.discourse.group/t/configuring-the-http-example-that-connects-to-zitimobileedge-client/375/5):
>
> here: [Debugging the Ziti Mobile Edge tunneller - #5 by dovholuknf](https://openziti.discourse.group/t/debugging-the-ziti-mobile-edge-tunneller/377/5)

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [April 7, 2022, 12:17pm UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/9 "2022-04-07T12:17:57Z")

</div>

Link to the actual writeup/answer [Configuring the http example that connects to ZitiMobileEdge client - #6 by dovholuknf](https://openziti.discourse.group/t/configuring-the-http-example-that-connects-to-zitimobileedge-client/375/6)

Wireshark really isn’t your friend with a zero trust overlay. You’ll **at best** only see the packets going to the 100.64.x.x CIDR range (these are the synthetic ip address blocks we use to assign services to when using a tunneling app).

---

<div class="post-metadata">

**Author:** ![markamind](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/markamind/32/157_2.png) [@markamind](https://openziti.discourse.group/u/markamind)\
**Post date:** [April 7, 2022, 10:24pm UTC](https://openziti.discourse.group/t/go-error-panic-config-file-i-is-not-found/379/10 "2022-04-07T22:24:55Z")

</div>

Thanks for the insights… later on I will make a post about the impacts of the zero trust overlay on different tools like Wireshark etc.

This is important because what at the alternative tools to do similar actions… not sure if that even makes any sense.

However… what I do see is an immense need to retool… though… maybe many of the tools are already embedded in Open Ziti…

Going deeper into this will be a very interesting topic
