No Log files on Ubuntu


#1

Imported Google Group message. Original thread at: https://groups.google.com/forum/#!topic/tyk-community-support/0WUbq4dPiVU Import Date: 2016-01-19 21:35:00 +0000.
Sender:Kevin Holbrook.
Date:Friday, 11 December 2015 23:41:39 UTC.

With the 1.9 startup scripts on Ubuntu, I’m not getting any log files being output.
They are supposed to be under /var/log.
The chroot, exec, output piping seems strange in that script.


#2

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 11 December 2015 23:43:27 UTC.

Hi,

Ubuntu uses upstart, so the logs should be under /var/log/upstart

Cheers,
Martin


#3

Imported Google Group message.
Sender:Kevin Holbrook.
Date:Friday, 11 December 2015 23:43:27 UTC.

Hi,

Ubuntu uses upstart, so the logs should be under /var/log/upstart

Cheers,
Martin


#4

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 11 December 2015 23:59:42 UTC.

Ok, yes I see them there, although the init scripts explicitly pipe output to “/var/log/tyk-gateway.stdout” and “/var/log/tyk-gateway.stderr” which is why it’s confusing.
The scripts make it seem like they are not using upstart.

On Friday, December 11, 2015 at 5:43:27 PM UTC-6, Martin Buhr wrote:
Hi,

Ubuntu uses upstart, so the logs should be under /var/log/upstart

Cheers,
Martin


#5

Imported Google Group message.
Sender:Kevin Holbrook.
Date:Saturday, 12 December 2015 00:03:55 UTC.

Which scrips are you looking at? Tyk installs init scripts for every system it detects. So you will have systemd, upstart and SysV versions if Tyk post install detects them. Upstart scripts are under a different folder (we use conf files for upstart):

https://github.com/TykTechnologies/tyk/blob/master/install/inits/upstart/conf/tyk-gateway.conf

Cheers,
Martin

  • show quoted text -

  • show quoted text -


You received this message because you are subscribed to the Google Groups “Tyk Community Support” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web, visit https://groups.google.com/d/msgid/tyk-community-support/112e83a9-2fb0-4299-a400-084340509a46%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


#6

Mmm not sure about this. You say “Ubuntu uses upstart”, but I’m on 14.04 and there is no /var/log/upstart - and no tyk logs are created anywhere.

What should I do?


#7

The logs are either in /var/logs or /var/logs/upstart it depends on how you are starting the gateway? What init system are you using?

The Tyk installer (with apt) will try to detect its int system and make itself available to all of them and the logs are set up to work with whatever the init system defaults to.


#8

Hi Martin,

that opens an interesting question - how can you reliably determine the INIT system :slight_smile: But I’ll let stackoverflow do that.

Sticking to what I know from doing “stat /proc/1/exe”, I get /sbin/init. Running /sbin/init --version, it tels me I’m on upstart 1.12.1.

All fine, except there is no /var/log/upstart directory. And at the same time, it looks like tyk is indeed logging under /var/log/tyk-gateway.stderr [1], and this gets me a little confused. Has the installer failed to detect upstart? Or what else could be wrong?

Thanks,
Giuseppe

[1] Also, the logs contain quite a lot of errors such as:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x66ee25]

goroutine 13 [running]:
panic(0xc55920, 0xc82000e0e0)
/usr/local/go/src/runtime/panic.go:464 +0x3e6
net/http.(*Server).Serve(0xc820198880, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:2108 +0x465
net/http.Serve(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:1976 +0x8e
created by main.main
/home/tyk/go/src/github.com/lonelycode/tyk/main.go:1210 +0x2bd1

Any idea what this is?


#9

The panics will be configuration issues, would need to dig deeper to know what’s going on there.

as for init systems, Tyk detects as many as it can and makes itself available to them, it’s up to the OS and admin after that.