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

Checking what I am doing wrong here

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

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 ?

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

use:

go run simple-server.go httpzServer.json
1 Like

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

:slight_smile: 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:

1 Like

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

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

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

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

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.?

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 :wink:

Relevant thread will continue here:

1 Like

Link to the actual writeup/answer Configuring the http example that connects to ZitiMobileEdge client - #6 by dovholuknf

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).

1 Like

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