Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--syslog doesn't seem to work #135

Closed
rickw opened this issue Dec 27, 2017 · 4 comments
Closed

--syslog doesn't seem to work #135

rickw opened this issue Dec 27, 2017 · 4 comments

Comments

@rickw
Copy link

rickw commented Dec 27, 2017

I used the --syslog option and still the output went to stderr and nothing in /var/log/syslog.
Ubuntu 17.04 built with go1.9.1

@alokmenghrajani
Copy link
Collaborator

It's possible you are running into the condition commented here: https://github.com/square/ghostunnel/blob/master/main.go#L120

We should investigate and/or log a message when this condition happens.

@rickw
Copy link
Author

rickw commented Dec 28, 2017

This is on an Ubuntu 17.04 cloud instance. The main issues I was having was starting ghostunnel from Python with dynamic parameters so I tried the —syslog option.

The log messages seemed the same when I was starting with —syslog by hand from the terminal.

@csstaub
Copy link
Member

csstaub commented Jan 2, 2018

If ghostunnel fails to setup syslog (with --syslog set) it should print an error to stderr and exit.

@rickw I am unable to reproduce your problem on macOS (on latest master). Can you confirm which version/revision of ghostunnel you are using, post the exact invocation you started the binary with, and maybe also provide us with the log output? I will setup a Ubuntu box to see if I can reproduce the problem there.

@csstaub
Copy link
Member

csstaub commented Jan 2, 2018

Here's how I started ghostunnel:

❯❯❯ ./ghostunnel server --listen localhost:8443 --target localhost:8080 --keystore test-keys/server.p12 --cacert test-keys/root.crt --allow-cn client --syslog

And the corresponding syslog output:

❯❯❯ grep ghostunnel /var/log/system.log                                                          ✘ 130
Jan  2 10:34:30 comet ./ghostunnel[3657]: [3657] 2018/01/02 10:34:30.604197 starting ghostunnel in server mode
Jan  2 10:34:30 comet ./ghostunnel[3657]: [3657] 2018/01/02 10:34:30.608360 loaded certificate with common name 'server'
Jan  2 10:34:30 comet ./ghostunnel[3657]: [3657] 2018/01/02 10:34:30.609017 using target address localhost:8080
Jan  2 10:34:30 comet ./ghostunnel[3657]: [3657] 2018/01/02 10:34:30.609266 listening for connections on 127.0.0.1:8443

@csstaub csstaub closed this as completed Mar 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants