"info" message not appearing when you run the go host server

I had everything working… and then something happened where I needed to rebuild my entire server…

it was a good exercise as I had to clean up a lot of my sample files…

So I returned to this awesome video by @dovholuknf … which got me all back up and running

Now that its all working again… there was one small thing that is annoying me.

When I run the simple http server… I do not get any message back in the command line that says the edge router has connected…

it took me a while to realise that it was actually running… it is just that the message is not being communicated back to the terminal.

now… this could be my fault… as I did not follow your instructions @dovholuknf 100%…by not disabling selinux.

I know this was wrong but I did it anyway… I wanted to avoid implementing the systemctl for the controller and router… to see how far I could get with selinux enabled.

I really don’t know what selinux does… so thought to keep it enabled.

my guess is that its related somehow… I think its some type of security module… but dont really understand the specifics.

Let me know if you can offer any guidance… as I dont know what the specific security implications are for disabling it.

That might have been why I disabled selinux? I don’t remember to be honest. I mention in the video that I also didn’t bother figuring out why or how selinux was getting in my way I just disabled it.

If you’re running the binaries from the command line yourself I don’t think selinux gets in the way? (Again I don’t remember unfortunately). I would check the edge router configuration and verify the advertised address is correct. I’m thinking it’s not or there’s a firewall issue. Dunno for sure

1 Like

I have been investigating this further… and will see if there is a setting that I can tweak… will keep you posted

Quick update…

I successfully installed the controller files for both the controller and router

I then repeated the examples… which worked.

So… from what I can see… there is no real need to disable selinux to get the demonstration to work.

What the specific issue is that the “Info” message is somehow blocked.

My understanding is that this is created a a trace from within the Open Ziti SDK… is this correct?

If so… what is the specific feature that the Open Ziti SDK uses to log this information back to the terminal.

Once I know that… I can look into things in more detail to see what specific security may need to be configured

I tracked down something in the audit files that gets generated when I stop and start the http server.

It looks like that there is an issue with the terminator… strangely though… when you run the client… it completes successfully.

hence… this must be related to the info message that is sent back to the terminal once you start the server… that is triggered from the sdk… but I dont know much more

is there some type of callback that gets triggered when you start the server… which then returns the result in the terminal when a response is received…
this could make sense… as selinux could be stopping this from happening

Though… from what I understand… this is not something critical… as all of the underlying functionality still works as expected

Apr 18 06:54:28 instance-20220416-1603 ziti-controller [704239]: {“file”:“github.com/openziti/edge@v0.21.169/controller/handler_edge_ctrl/remove_terminator.go:118",“func”:"github.com/openziti/edge/controller/handler_edge_ctrl.(*removeTerminatorHandler).RemoveTerminator”,“level”:“info”,“msg”:“removed terminator”,“routerId”:“8Zo-gTL0Ck”,“serviceId”:“kIrlFFylD”,“terminator”:“6xD6”,“time”:“2022-04-18T06:54:28.847Z”,“token”:“8fb81f5e-9e37-4ceb-bd05-a54d4c69453c”}

Apr 18 06:54:28 instance-20220416-1603 ziti-controller [704239]: {“error”:“invalid terminator: not found”,“file”:“github.com/openziti/edge@v0.21.169/controller/handler_edge_ctrl/common.go:386",“func”:"github.com/openziti/edge/controller/handler_edge_ctrl.(*baseSessionRequestContext).verifyTerminator”,“level”:“error”,“msg”:“terminator not found”,“operation”:“remove.terminator”,“terminatorId”:“6xD6”,“time”:“2022-04-18T06:54:28.847Z”}

Apr 18 06:54:28 instance-20220416-1603 ziti-controller [704239]: {"_context":“ch{8Zo-gTL0Ck}-\u003eu{classic}-\u003ei{7djW}”,“error”:“invalid terminator: not found”,“file”:“github.com/openziti/edge@v0.21.169/controller/handler_edge_ctrl/common.go:78",“func”:"github.com/openziti/edge/controller/handler_edge_ctrl.(*baseRequestHandler).returnError”,“level”:“error”,“msg”:“responded with error”,“operation”:“remove.terminator”,“routerId”:“8Zo-gTL0Ck”,“time”:“2022-04-18T06:54:28.847Z”,“token”:“8fb81f5e-9e37-4ceb-bd05-a54d4c69453c”}

Apr 18 06:54:38 instance-20220416-1603 ziti-controller [704239]: {"_context":“ch{8Zo-gTL0Ck}-\u003eu{classic}-\u003ei{7djW}”,“file”:“github.com/openziti/edge@v0.21.169/controller/handler_edge_ctrl/create_terminator.go:124",“func”:"github.com/openziti/edge/controller/handler_edge_ctrl.(*createTerminatorHandler).CreateTerminator”,“level”:“info”,“msg”:“created terminator”,“routerId”:“8Zo-gTL0Ck”,“service”:“golanghttp”,“serviceId”:“kIrlFFylD”,“terminator”:“jdZN”,“time”:“2022-04-18T06:54:38.950Z”,“token”:“097cdb5d-7026-4cab-858a-8750cc4125c5”}

I am now very close. I found the following code from line 711 in the ziti.go file, which is a part of the connectEdgeRouter function.

What is interesting is that the router connects… but… the result of the Debug function is not displayed in the terminal.

pfxlog.Logger().Debugf(“connection to edge router using api session token %v”, context.ctrlClt.GetCurrentApiSession().Token)
dialer := channel.NewClassicDialer(identity.NewIdentity(context.ctrlClt.GetIdentity()), ingAddr, map[int32][]byte{
edge.SessionTokenHeader: []byte(context.ctrlClt.GetCurrentApiSession().Token),

I tried running a compiled application as root user… but it did not change anything.