My AWS EC2 Ubuntu / Django container ran fine for 21 months, then 26th Dec 6:30am stopped.
I took a snapshot, attached it to another container, and downloaded the logs from /etc/log and searched for 'error', 'fail', etc.
The most likely error is in /var/log/kern.log.1:
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 0.000000] You might have to change the root device
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 0.000000] from /dev/hd[a-d] to /dev/xvd[a-d]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 0.000000] in your root= kernel command line option
...
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 7.907183] new mount options do not match the existing superblock, will be ignored
/etc/fstab contains just:
LABEL=cloudimg-rootfs / ext4 defaults,discard 0 0
As suggested in this answer, I compared the contents of my snapshot /var/fstab with my fresh new container fstab. The only difference was that the final number was zero instead of one. As expected, when I changed it to one, and re-attached it as sda1, the container still failed to boot.
Another error reported, in the logs displayed when you click on the EC2 instance in AWS console, then Monitor and Troubleshoot -> Get System Log, is:
Failed to start Service for snap ap…amazon-ssm-agent.amazon-ssm-agent
I think this in hibernate.log explains it:
ERROR Health ping failed with error - EC2RoleRequestError: no EC2 instance role found
This seems to be generated when the SSM Agent cannot find IAM credentials. I assume this is caused by the disk error above? Although I don't understand how anything is logged in the first place if there's no disk access.
Is there anything persistent on the original container instance that is not in the EBS volume? I ask because I haven't dared stop the original container - I have just taken a snapshot, converted it to a volume, assigned it to /dev/xvdf1 on a brand new Ubuntu 18 micro container (same as original), edited fstab, then re-assigned it to the new container as /dev/sda1, which seems to then be treated as the boot device.
I do get that I should be Dockerized and a container fail should be a non-event; I work with elastic ECS clusters on other, larger projects. If approved by our Ministry of Education this'll shoot past all of them to 40mn users, at which time I'll Dockerize! But in the meantime I'm self-funded on a shoestring so cutting all available corners.
As much of /var/log/kern.log.1 as stackoverflow allows:
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.187911] acpiphp: Slot [23] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.191920] acpiphp: Slot [24] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.195973] acpiphp: Slot [25] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.200038] acpiphp: Slot [26] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.203937] acpiphp: Slot [27] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.207896] acpiphp: Slot [28] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.211921] acpiphp: Slot [29] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.215931] acpiphp: Slot [30] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.219956] acpiphp: Slot [31] registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.223910] PCI host bridge to bus 0000:00
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.227411] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.231413] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.235413] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.239413] pci_bus 0000:00: root bus resource [mem 0xf0000000-0xfbffffff window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.243413] pci_bus 0000:00: root bus resource [bus 00-ff]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.247651] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.254759] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.259402] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.262039] pci 0000:00:01.1: reg 0x20: [io 0xc100-0xc10f]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.264462] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.267410] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.271417] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.275415] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.280563] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.283472] * Found PM-Timer Bug on the chipset. Due to workarounds for a bug,
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.283472] * this clock source is slow. Consider trying other clock sources
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.290913] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.293774] pci 0000:00:02.0: [1013:00b8] type 00 class 0x030000
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.296348] pci 0000:00:02.0: reg 0x10: [mem 0xf0000000-0xf1ffffff pref]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.299906] pci 0000:00:02.0: reg 0x14: [mem 0xf3000000-0xf3000fff]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.308109] pci 0000:00:03.0: [5853:0001] type 00 class 0xff8000
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.312703] pci 0000:00:03.0: reg 0x10: [io 0xc000-0xc0ff]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.315997] pci 0000:00:03.0: reg 0x14: [mem 0xf2000000-0xf2ffffff pref]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.332618] ACPI: PCI Interrupt Link [LNKA] (IRQs *5 10 11)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.335725] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.339727] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.343720] ACPI: PCI Interrupt Link [LNKD] (IRQs *5 10 11)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.359284] xen:balloon: Initialising balloon driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.359501] iommu: Default domain type: Translated
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.363549] SCSI subsystem initialized
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.367464] libata version 3.00 loaded.
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.367580] pci 0000:00:02.0: vgaarb: setting as boot VGA device
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.371403] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.371413] pci 0000:00:02.0: vgaarb: bridge control possible
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.375413] vgaarb: loaded
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.378661] ACPI: bus type USB registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.379440] usbcore: registered new interface driver usbfs
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.383425] usbcore: registered new interface driver hub
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.387423] usbcore: registered new device driver usb
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.391445] pps_core: LinuxPPS API ver. 1 registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.395410] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.399417] PTP clock support registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.403487] EDAC MC: Ver: 3.0.0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.407980] PCI: Using ACPI for IRQ routing
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.411413] PCI: pci_cache_line_size set to 64 bytes
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.412104] e820: reserve RAM buffer [mem 0x0009e000-0x0009ffff]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.412230] NetLabel: Initializing
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.415410] NetLabel: domain hash size = 128
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.419411] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.423436] NetLabel: unlabeled traffic allowed by default
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.427552] hpet: 3 channels of 0 reserved for per-cpu timers
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.431421] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.435409] hpet0: 3 comparators, 64-bit 62.500000 MHz counter
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.441465] clocksource: Switched to clocksource xen
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.457119] *** VALIDATE bpf ***
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.461224] VFS: Disk quotas dquot_6.6.0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.466176] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.474200] *** VALIDATE ramfs ***
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.478173] *** VALIDATE hugetlbfs ***
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.482131] AppArmor: AppArmor Filesystem Enabled
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.486935] pnp: PnP ACPI init
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.490705] system 00:00: [mem 0x00000000-0x0009ffff] could not be reserved
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.497810] system 00:00: Plug and Play ACPI device, IDs PNP0c02 (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.497902] system 00:01: [io 0x08a0-0x08a3] has been reserved
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.503120] system 00:01: [io 0x0cc0-0x0ccf] has been reserved
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.508523] system 00:01: [io 0x04d0-0x04d1] has been reserved
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513842] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513874] xen: --> pirq=17 -> irq=8 (gsi=8)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513890] pnp 00:02: Plug and Play ACPI device, IDs PNP0b00 (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513916] xen: --> pirq=18 -> irq=12 (gsi=12)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513930] pnp 00:03: Plug and Play ACPI device, IDs PNP0f13 (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513951] xen: --> pirq=19 -> irq=1 (gsi=1)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513961] pnp 00:04: Plug and Play ACPI device, IDs PNP0303 PNP030b (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513981] xen: --> pirq=20 -> irq=6 (gsi=6)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513982] pnp 00:05: [dma 2]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.513994] pnp 00:05: Plug and Play ACPI device, IDs PNP0700 (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.514021] xen: --> pirq=21 -> irq=4 (gsi=4)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.514033] pnp 00:06: Plug and Play ACPI device, IDs PNP0501 (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.514086] system 00:07: [io 0x10c0-0x1141] has been reserved
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.520268] system 00:07: [io 0xb044-0xb047] has been reserved
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.527019] system 00:07: Plug and Play ACPI device, IDs PNP0c02 (active)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.538353] pnp: PnP ACPI: found 8 devices
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.543610] thermal_sys: Registered thermal governor 'fair_share'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.543611] thermal_sys: Registered thermal governor 'bang_bang'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.549630] thermal_sys: Registered thermal governor 'step_wise'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.555825] thermal_sys: Registered thermal governor 'user_space'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.561805] thermal_sys: Registered thermal governor 'power_allocator'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.572322] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.587520] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.593297] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.599606] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.606415] pci_bus 0000:00: resource 7 [mem 0xf0000000-0xfbffffff window]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.613339] NET: Registered protocol family 2
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.618000] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.625663] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.633738] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.641541] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.648563] TCP: Hash tables configured (established 8192 bind 8192)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.655582] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.662660] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.669898] NET: Registered protocol family 1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.674699] NET: Registered protocol family 44
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.679748] pci 0000:00:01.0: PIIX3: Enabling Passive Release
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.686040] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.691783] pci 0000:00:01.0: Activating ISA DMA hang workarounds
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.698107] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.706446] PCI: CLS 0 bytes, default 64
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 1.710323] Trying to unpack rootfs image as initramfs...
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.005772] Freeing initrd memory: 20584K
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.010438] check: Scanning for low memory corruption every 60 seconds
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.016818] Initialise system trusted keyrings
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.021163] Key type blacklist registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.024937] workingset: timestamp_bits=36 max_order=18 bucket_order=0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.191161] zbud: loaded
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.194718] squashfs: version 4.0 (2009/01/31) Phillip Lougher
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.200798] fuse: init (API version 7.31)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.204963] *** VALIDATE fuse ***
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.208296] *** VALIDATE fuse ***
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.212263] Platform Keyring initialized
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.220327] Key type asymmetric registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.224328] Asymmetric key parser 'x509' registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.229003] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 244)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.235919] io scheduler mq-deadline registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.240902] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.247469] intel_idle: Please enable MWAIT in BIOS SETUP
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.247592] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.254319] ACPI: Power Button [PWRF]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.258321] input: Sleep Button as /devices/LNXSYSTM:00/LNXSLPBN:00/input/input1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.265503] ACPI: Sleep Button [SLPF]
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.274729] xen: --> pirq=22 -> irq=28 (gsi=28)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.274878] xen:grant_table: Grant tables using version 1 layout
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.280458] Grant table initialized
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.284017] Cannot get hvm parameter CONSOLE_EVTCHN (18): -22!
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.290075] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.333228] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.342248] Linux agpgart interface v0.103
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.443466] loop: module loaded
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.447771] Invalid max_queues (4), will use default max: 1.
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.455722] ata_piix 0000:00:01.1: version 2.13
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.457270] scsi host0: ata_piix
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.462581] scsi host1: ata_piix
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.467378] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc100 irq 14
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.474736] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc108 irq 15
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.486334] libphy: Fixed MDIO Bus: probed
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.491567] tun: Universal TUN/TAP device driver, 1.6
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.497536] PPP generic driver version 2.4.2
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.502914] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.510801] ehci-pci: EHCI PCI platform driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.517292] ehci-platform: EHCI generic platform driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.523953] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.531590] ohci-pci: OHCI PCI platform driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.537455] ohci-platform: OHCI generic platform driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.544598] uhci_hcd: USB Universal Host Controller Interface driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.552431] i8042: PNP: PS/2 Controller [PNP0303:PS2K,PNP0f13:PS2M] at 0x60,0x64 irq 1,12
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.565496] serio: i8042 KBD port at 0x60,0x64 irq 1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.571530] serio: i8042 AUX port at 0x60,0x64 irq 12
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.578006] mousedev: PS/2 mouse device common for all mice
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.586224] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.596276] blkfront: xvda: barrier or flush: disabled; persistent grants: disabled; indirect descriptors: enabled;
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.607036] rtc_cmos 00:02: registered as rtc0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.611669] rtc_cmos 00:02: alarms up to one day, 114 bytes nvram, hpet irqs
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.619503] device-mapper: uevent: version 1.0.3
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.625356] device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: dm-devel#redhat.com
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.635175] platform eisa.0: Probing EISA bus 0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.638713] platform eisa.0: EISA: Cannot allocate resource for mainboard
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.647013] platform eisa.0: Cannot allocate resource for EISA slot 1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.655615] platform eisa.0: Cannot allocate resource for EISA slot 2
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.663198] xvda: xvda1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.666858] platform eisa.0: Cannot allocate resource for EISA slot 3
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.674483] platform eisa.0: Cannot allocate resource for EISA slot 4
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.682619] platform eisa.0: Cannot allocate resource for EISA slot 5
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.690633] platform eisa.0: Cannot allocate resource for EISA slot 6
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.697216] platform eisa.0: Cannot allocate resource for EISA slot 7
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.703807] platform eisa.0: Cannot allocate resource for EISA slot 8
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.710494] platform eisa.0: EISA: Detected 0 cards
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.717001] intel_pstate: CPU model not supported
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.724375] drop_monitor: Initializing network drop monitor service
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.733417] NET: Registered protocol family 10
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.743737] Segment Routing with IPv6
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.749681] NET: Registered protocol family 17
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.754856] Key type dns_resolver registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.759478] RAS: Correctable Errors collector initialized.
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.764934] *** VALIDATE rdt ***
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.768803] resctrl: L3 allocation detected
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.773572] IPI shorthand broadcast: enabled
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.778278] sched_clock: Marking stable (2067715763, 710545130)->(3227957399, -449696506)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.786706] registered taskstats version 1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.791310] Loading compiled-in X.509 certificates
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.797014] Loaded X.509 cert 'Build time autogenerated kernel key: 2937964050fa7e9ded592347912fc3fa79bbb107'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.806996] Loaded X.509 cert 'Canonical Ltd. Live Patch Signing: 14df34d1a87cf37625abec039ef2bf521249b969'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.817402] Loaded X.509 cert 'Canonical Ltd. Kernel Module Signing: 88f752e560a1e0737e31163a466ad7b70a850c19'
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.827202] zswap: loaded using pool lzo/zbud
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.832084] Key type ._fscrypt registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.836916] Key type .fscrypt registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.844234] Key type big_key registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.849923] Key type encrypted registered
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.854132] AppArmor: AppArmor sha1 policy hashing enabled
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.860047] ima: No TPM chip found, activating TPM-bypass!
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.865891] ima: Allocated hash algorithm: sha1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.871732] ima: No architecture policies found
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.877725] evm: Initialising EVM extended attributes:
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.884451] evm: security.selinux
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.888512] evm: security.SMACK64
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.892742] evm: security.SMACK64EXEC
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.897787] evm: security.SMACK64TRANSMUTE
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.903102] evm: security.SMACK64MMAP
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.907734] evm: security.apparmor
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.911827] evm: security.ima
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.915811] evm: security.capability
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.920478] evm: HMAC attrs: 0x1
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.925235] xenbus_probe_frontend: Device with no driver: device/vif/0
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.933397] PM: Magic number: 1:524:368
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.938702] rtc_cmos 00:02: setting system clock to 2021-12-27T06:22:37 UTC (1640586157)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.950506] Freeing unused decrypted memory: 2040K
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.957449] Freeing unused kernel image memory: 2656K
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.963719] Write protecting the kernel read-only data: 22528k
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.971212] Freeing unused kernel image memory: 2008K
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.977588] Freeing unused kernel image memory: 1484K
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 2.993183] x86/mm: Checked W+X mappings: passed, no W+X pages found.
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.001984] x86/mm: Checking user space page tables
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.018117] tsc: Refined TSC clocksource calibration: 2400.002 MHz
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.027256] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x22983938a92, max_idle_ns: 440795216168 ns
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.040828] x86/mm: Checked W+X mappings: passed, no W+X pages found.
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.049352] Run /init as init process
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.262764] xen_netfront: Initialising Xen virtual ethernet driver
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.282477] cryptd: max_cpu_qlen set to 1000
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.328241] AVX2 version of gcm_enc/dec engaged.
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 3.333653] AES CTR mode by8 optimization enabled
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.175419] raid6: avx2x4 gen() 23237 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.227416] raid6: avx2x4 xor() 14129 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.279418] raid6: avx2x2 gen() 20103 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.331413] raid6: avx2x2 xor() 12258 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.383415] raid6: avx2x1 gen() 17503 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.435416] raid6: avx2x1 xor() 11955 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.487417] raid6: sse2x4 gen() 12725 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.539416] raid6: sse2x4 xor() 7896 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.591418] raid6: sse2x2 gen() 10688 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.643426] raid6: sse2x2 xor() 7083 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.695418] raid6: sse2x1 gen() 9197 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.747416] raid6: sse2x1 xor() 6511 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.752299] raid6: using algorithm avx2x4 gen() 23237 MB/s
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.758123] raid6: .... xor() 14129 MB/s, rmw enabled
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.763565] raid6: using avx2x2 recovery algorithm
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.771239] xor: automatically using best checksumming function avx
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.781240] async_tx: api initialized (async)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.854695] Btrfs loaded, crc32c=crc32c-intel
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 5.891555] EXT4-fs (xvda1): mounted filesystem with ordered data mode. Opts: (null)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 6.588912] Loading iSCSI transport class v2.0-870.
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 6.658308] iscsi: registered transport (tcp)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 6.725913] EXT4-fs (xvda1): re-mounted. Opts: discard
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 6.845798] iscsi: registered transport (iser)
Dec 27 06:22:42 ip-172-31-42-17 kernel: [ 7.907183] new mount options do not match the existing superblock, will be ignored
In my setup we send all the calls going out of cluster to an Internal Load Balancer in GCP. We do this by creating a egress service and manually adding endpoints to this service. The endpoint to this service is the IP of the Internal load balancer.
[sourabh.w#K9-MAC-035 r19-3]$ k get svc,ep -n egproxy-lle
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/egproxy ClusterIP 10.206.180.135 80/TCP,443/TCP 4d
NAME ENDPOINTS AGE
endpoints/egproxy 10.207.132.8:30443,10.207.132.8:30080 4d
[sourabh.w#K9-MAC-035 r19-3]$
For all micro-services in my setup, they have to run an "openssl s_Client" command at startup. This command is failing for me.
openssl s_client -servername ae17-api.kohlsecommerce.com -connect ae17-api.kohlsecommerce.com:443 -debug -state
While doing this I make sure ae17-api.kohlsecommerce.com is mapped to egproxy service's IP(10.206.180.135) in /etc/hosts.
Here is the o/p when I run openssl inside pod:
root#product-26-655f4f55b6-g2bpq:/# openssl s_client -servername ae17-api.kohlsecommerce.com -connect ae17-api.kohlsecommerce.com:443 -state -debug
CONNECTED(00000003)
SSL_connect:before SSL initialization
write to 0x556dc50b2860 [0x556dc50c3a20] (212 bytes => 212 (0xD4))
0000 - 16 03 01 00 cf 01 00 00-cb 03 03 43 59 24 26 31 ...........CY$&1
0010 - 4f 13 80 47 f2 09 25 f7-ec 74 40 57 7c d0 bc c6 O..G..%..t#W|...
0020 - 18 9b a7 a3 3c 38 80 d6-f4 99 62 00 00 38 c0 2c ....<8....b..8.,
0030 - c0 30 00 9f cc a9 cc a8-cc aa c0 2b c0 2f 00 9e .0.........+./..
0040 - c0 24 c0 28 00 00 c0 23-c0 88 00 67 c0 0a c0 14 .$.(.k.#.'.g....
0050 - 00 39 c0 09 c0 00 00 33-00 9d 00 9c 00 3d 00 3c .9.....3.....=.<
0060 - 00 35 00 2f 00 ff 01 00-66 6a 00 00 00 20 00 1e .5./.....j... ..
0070 - 00 00 1b 61 65 31 37 2d-61 70 69 2e 6b 6f 68 6c ...ae17-api.
0080 - 73 65 63 6f 6d 6d 65 72-63 65 2e 63 6f 6d 00 0b ecommerce.com..
0090 - 00 04 03 00 01 02 00 8a-00 0a 00 08 00 1d 00 17 ................
00a0 - 00 19 00 18 00 00 00 66-00 16 00 00 00 17 00 00 .....#..........
00b0 - 00 0d 00 20 00 00 06 01-06 02 06 03 05 01 05 02 ... ............
00c0 - 05 03 04 01 04 02 04 03-03 01 03 02 03 03 02 01 ................
00d0 - 02 02 02 03 ....
SSL_connect:SSLv3/TLS write client hello
read from 0x556dc50b2860 [0x556dc50ba803] (5 bytes => -1 (0xFFFFFFFFFFFFFFFF))
SSL_connect:error in SSLv3/TLS write client hello
write:errno=104
no peer certificate available
No client certificate CA names sent
SSL handshake has read 0 bytes and written 212 bytes
Verification: OK
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : 0000
Session-ID:
Session-ID-ctx:
Master-Key:
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1553126020
Timeout : 7200 (sec)
Verify return code: 0 (ok)
Extended master secret: no
I tried creating various set of serviceentries and virtualservices but nothing worked:
With Load Balancer IP:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
generation: 1
name: egproxy-ext
namespace: r19-3-mui-qa
spec:
addresses:
- 10.207.132.8/32
endpoints:
- address: 10.207.132.8
hosts:
- istio-ilb.lle-mcommerce.com
location: MESH_INTERNAL
ports:
- name: http
number: 30080
protocol: HTTP
- name: https
number: 30443
protocol: HTTPS
resolution: STATIC
with egproxy serivce FQDN:
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: egproxy-headless-service-fqdn-ext
namespace: r19-3-mui-qa
spec:
addresses:
- 10.206.117.116/32
endpoints:
- address: 10.207.132.8
hosts:
- egproxy.egproxy-lle.svc.cluster.local
location: MESH_INTERNAL
ports:
- name: http
number: 30080
protocol: HTTP
- name: https
number: 30443
protocol: HTTPS
resolution: STATIC
Destination rule for Load balancer:
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: egress-gateway
namespace: default
spec:
host: istio-ilb.lle-mcommerce.com
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
portLevelSettings:
- port:
number: 30443
tls:
mode: SIMPLE
Destination rule for egproxy service
Want the communication to work from microservices to ILB via headless egproxy service.
Workarounds like "egress-gateway" is also a viable option but for that also facing problems in putting together correct config to make it work.
In Istio, to access a service, you need to configure either Kubernetes Service or Istio ServiceEntry. You may need to disable mutual TLS. See this preliminary example https://deploy-preview-3899--preliminary-istio.netlify.com/docs/examples/advanced-gateways/egress-kubernetes-services/.
When I run lein clean, I get this error:
Deleting non-target project paths ["test-app/renderer/renderer.js%s"] is not allowed.
What makes a path a target project path? How do I make a path be a target project path? My project.clj looks like this:
(defproject tech.projectx/clients "0.1.0-SNAPSHOT"
:cljsbuild {:builds {:renderer {:source-paths ["src/renderer" "src/common"]
:compiler {:output-to "app/renderer/renderer.js"
:output-dir "app/renderer"
:asset-path "renderer"
:main configurator.core
:language-in :ecmascript5
:optimizations :none}}
:main {:source-paths ["src/main" "src/common"]
:compiler {:output-to "app/main/main.js"
:output-dir "app/main"
:asset-path "main"
:main tech.projectx.main
:target :nodejs
:externs ["node_modules/closurecompiler-externs/path.js"
"node_modules/closurecompiler-externs/process.js"]
:optimizations :simple}} ; without this, the packed application doesn't work.
:renderer-test {:source-paths ["src/renderer" "src/common" "test/renderer"]
:compiler {:output-to "test-app/renderer/renderer.js"
:output-dir "test-app/renderer"
:asset-path "renderer"
:main clientcommon.test-runner
:language-in :ecmascript5
:optimizations :none
:source-map true
:source-map-timestamp true
:pretty-print true}
:figwheel {:websocket-host "localhost"
:on-jsload "clientcommon.test-runner/run-all-tests"}}
:test-app-main {:source-paths ["test/main" "src/main" "src/common"]
:compiler {:output-to "test-app/main/main.js"
:output-dir "test-app/main"
:asset-path "main"
:main tech.projectx.test-app-main
:target :nodejs
:externs ["node_modules/closurecompiler-externs/path.js"
"node_modules/closurecompiler-externs/process.js"]
:optimizations :none
:source-map true
:source-map-timestamp true
:pretty-print true}}}}
:sass {:source-paths ["src/renderer/assets"]
:target-path "app/renderer/assets"
:source-map true}
:figwheel {:server-logfile "log/figwheel-logfile.log"
:css-dirs ["app/renderer/assets"]}
:clean-targets [[:cljsbuild :builds :renderer :compiler :output-to]
[:cljsbuild :builds :renderer :compiler :output-dir]
[:cljsbuild :builds :main :compiler :output-to]
[:cljsbuild :builds :main :compiler :output-dir]
[:cljsbuild :builds :renderer-test :compiler :output-to]
[:cljsbuild :builds :renderer-test :compiler :output-dir]
[:cljsbuild :builds :test-app-main :compiler :output-to]
[:cljsbuild :builds :test-app-main :compiler :output-dir]
"dist"]
:profiles {:dev {:cljsbuild {:builds {:renderer {:compiler {:source-map true
:source-map-timestamp true
:pretty-print true}
:figwheel {:websocket-host "localhost"
:on-jsload "configurator.core/mount-root"}}
:main {:compiler {:source-map "app/main/main.js.map"
:source-map-timestamp true
:pretty-print true}}}}}
:prod {:cljsbuild {:builds {:renderer {:compiler {:optimizations :simple
:closure-defines {goog.DEBUG false}}}
:main {:compiler {:optimizations :simple
:closure-defines {goog.DEBUG false}}}}}}})
It is a built in safety mechanism that protects you from accidentally deleting unwanted stuff (eg outside the project dir and such). If you'd like to still proceed with the cleanup, modify your project.clj like that:
:clean-targets ^{:protect false} [....]
For more details, look at the sanity-check and protected-paths functions in this source: https://github.com/technomancy/leiningen/blob/master/src/leiningen/clean.clj
I am working on a Reagent project, and seem to not be able to use a macros.clj file. No matter where I put it, it keeps giving me the same message: "could not locate macros/core__init.class or macros/core.clj on classpath. Where should I be putting my macros.clj file, or what am I missing?
The structure is as follows:
test-proj/
env/
dev/
clj/
test-proj/
middleware.clj
repl.clj
cljs/
test-proj/
dev.cljs
prod/
clj/
test-proj/
middleware.clj
cljs/
test-proj/
prod.cljs
resources/
public/
css/
site.css
src/
clj/
test-proj/
handler.clj
server.clj
cljc/
test-proj/
util.cljc
cljs/
test-proj/
bmi.cljs
core.cljs
home.cljs
macros.clj
simple-examples.cljs
timer.cljs
todo.cljs
target/
classes/
META-INF/
maven/
test-proj/
test/proj/
pom.properties
cljsbuild/
public/
js/
out/
...
app.js
stale/
leiningen.core.classpath.extract-native-dependencies
leiningen.figwheel.clean-on-dependency-change
figwheel_server.log
LICENSE
Procfile
project.clj
README.md
system.properties
The namespace in my core.cljs file looks as such:
(ns test-proj.core
(:require [reagent.core :as reagent :refer [atom]]
[reagent.session :as session]
[secretary.core :as secretary :include-macros true]
[accountant.core :as accountant]
[home.core :as h]
[simple-examples.core :as se]
[bmi.core :as b]
[timer.core :as t]
[todo.core :as td])
(:require-macros [macros.core :as m]))
The namespace for my macros.core looks as follows:
(ns macros.core)
My project.clj file looks as follows:
(defproject test-proj "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[ring-server "0.4.0"]
[reagent "0.6.0"]
[reagent-utils "0.2.0"]
[ring "1.5.0"]
[ring/ring-defaults "0.2.1"]
[compojure "1.5.1"]
[hiccup "1.0.5"]
[yogthos/config "0.8"]
[org.clojure/clojurescript "1.9.473"
:scope "provided"]
[secretary "1.2.3"]
[venantius/accountant "0.1.7"
:exclusions [org.clojure/tools.reader]]]
:plugins [[lein-environ "1.0.2"]
[lein-cljsbuild "1.1.1"]
[lein-ring "0.11.0"]
[lein-asset-minifier "0.2.7"
:exclusions [org.clojure/clojure]]]
:ring {:handler test-proj.handler/app
:uberwar-name "test-proj.war"}
:min-lein-version "2.5.0"
:uberjar-name "test-proj.jar"
:main test-proj.server
:clean-targets ^{:protect false}
[:target-path
[:cljsbuild :builds :app :compiler :output-dir]
[:cljsbuild :builds :app :compiler :output-to]]
:source-paths ["src/clj" "src/cljc"]
:resource-paths ["resources" "target/cljsbuild"]
:minify-assets
{:assets
{"resources/public/css/site.min.css" "resources/public/css/site.css"}}
:cljsbuild
{:builds {:min
{:source-paths ["src/cljs" "src/cljc" "env/prod/cljs"]
:compiler
{:output-to "target/cljsbuild/public/js/app.js"
:output-dir "target/uberjar"
:optimizations :advanced
:pretty-print false}}
:app
{:source-paths ["src/cljs" "src/cljc" "env/dev/cljs"]
:compiler
{:main "test-proj.dev"
:asset-path "/js/out"
:output-to "target/cljsbuild/public/js/app.js"
:output-dir "target/cljsbuild/public/js/out"
:source-map true
:optimizations :none
:pretty-print true}}
}
}
:figwheel
{:http-server-root "public"
:server-port 3449
:nrepl-port 7002
:nrepl-middleware ["cemerick.piggieback/wrap-cljs-repl"
]
:css-dirs ["resources/public/css"]
:ring-handler test-proj.handler/app}
:profiles {:dev {:repl-options {:init-ns test-proj.repl
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
:dependencies [[ring/ring-mock "0.3.0"]
[ring/ring-devel "1.5.0"]
[prone "1.1.4"]
[figwheel-sidecar "0.5.8"]
[org.clojure/tools.nrepl "0.2.12"]
[com.cemerick/piggieback "0.2.2-SNAPSHOT"]
[pjstadig/humane-test-output "0.8.1"]
]
:source-paths ["env/dev/clj"]
:plugins [[lein-figwheel "0.5.8"]
]
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]
:env {:dev true}}
:uberjar {:hooks [minify-assets.plugin/hooks]
:source-paths ["env/prod/clj"]
:prep-tasks ["compile" ["cljsbuild" "once" "min"]]
:env {:production true}
:aot :all
:omit-source true}})
The error:
---- Could not Analyze src/cljs/test-proj/core.cljs ----
Could not locate macros/core__init.class or macros/core.clj on classpath.
---- Analysis Error : Please see src/cljs/test-proj/core.cljs ----
To use macros from Clojurescript:
(ns my.namespace
(:require-macros [my.macros :as my]))
Here's the documentation: https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure#macros
I'm running lein figwheel + reagent, and while the the site seems to be updating, I can't track down what would cause the following stacktrace. Is there anyplace I should look? What does this error mean?
lein figwheel
Figwheel: focusing on build-id 'app'
Compiling ClojureScript.
Figwheel: Starting server at http://localhost:3449
Figwheel: Serving files from '(dev-resources|resources)/public'
Compiling "resources/public/js/app.js" from ("src/cljs" "env/dev/cljs")...
Compiling "resources/public/js/app.js" failed.
java.lang.NullPointerException:
closure.clj:325 cljs.closure/compiled-file
core.clj:2557 clojure.core/map[fn]
LazySeq.java:40 clojure.lang.LazySeq.sval
LazySeq.java:49 clojure.lang.LazySeq.seq
RT.java:484 clojure.lang.RT.seq
core.clj:133 clojure.core/seq
core.clj:685 clojure.core/concat[fn]
LazySeq.java:40 clojure.lang.LazySeq.sval
LazySeq.java:49 clojure.lang.LazySeq.seq
RT.java:484 clojure.lang.RT.seq
core.clj:133 clojure.core/seq
core.clj:685 clojure.core/concat[fn]
LazySeq.java:40 clojure.lang.LazySeq.sval
LazySeq.java:49 clojure.lang.LazySeq.seq
Cons.java:39 clojure.lang.Cons.next
RT.java:1654 clojure.lang.RT.boundedLength
RestFn.java:130 clojure.lang.RestFn.applyTo
core.clj:626 clojure.core/apply
closure.clj:993 cljs.closure/build
core.clj:170 clojurescript-build.core/build-source-paths
auto_builder.clj:59 figwheel-sidecar.auto-builder/autobuild[fn]
auto_builder.clj:52 figwheel-sidecar.auto-builder/autobuild
form-init495530074882707163.clj:1 user/eval12375
Compiler.java:6703 clojure.lang.Compiler.eval
Compiler.java:6693 clojure.lang.Compiler.eval
Compiler.java:7130 clojure.lang.Compiler.load
Compiler.java:7086 clojure.lang.Compiler.loadFile
main.clj:274 clojure.main/load-script
main.clj:279 clojure.main/init-opt
main.clj:307 clojure.main/initialize
main.clj:342 clojure.main/null-opt
main.clj:420 clojure.main/main
RestFn.java:421 clojure.lang.RestFn.invoke
Var.java:383 clojure.lang.Var.invoke
AFn.java:156 clojure.lang.AFn.applyToHelper
Var.java:700 clojure.lang.Var.applyTo
main.java:37 clojure.main.main
Here's my project.clj:
(defproject project-name "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:source-paths ["src/clj" "src/cljs"]
:dependencies [[org.clojure/clojure "1.6.0"]
[com.facebook/react "0.11.2"]
[reagent "0.5.0-alpha"]
[reagent-utils "0.1.0"]
[secretary "1.2.1"]
[org.clojure/clojurescript "0.0-2496" :scope "provided"]
[com.cemerick/piggieback "0.1.3"]
[weasel "0.4.2"]
[ring "1.3.2"]
[ring/ring-defaults "0.1.2"]
[prone "0.8.0"]
[compojure "1.3.1"]
[selmer "0.7.7"]
[environ "1.0.0"]
[leiningen "2.5.0"]
[figwheel "0.1.5-SNAPSHOT"]
[cljs-ajax "0.3.3"]]
:plugins [[cider/cider-nrepl "0.8.2"]
[lein-cljsbuild "1.0.3"]
[lein-environ "1.0.0"]
[lein-ring "0.8.13"]
[lein-asset-minifier "0.2.0"]]
:ring {:handler homing-pigeon.handler/app}
:min-lein-version "2.5.0"
:uberjar-name "homing-pigeon.jar"
:minify-assets
{:assets
{"resources/public/css/site.min.css" "resources/public/css/site.css"}}
:cljsbuild {:builds {:app {:source-paths ["src/cljs"]
:compiler {:output-to "resources/public/js/app.js"
:output-dir "resources/public/js/out"
:externs ["react/externs/react.js"]
:optimizations :none
:pretty-print true}}}}
:profiles {:dev {:repl-options {:init-ns homing-pigeon.handler
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
:dependencies [[ring-mock "0.1.5"]
[ring/ring-devel "1.3.2"]
[pjstadig/humane-test-output "0.6.0"]]
:plugins [[lein-figwheel "0.2.0-SNAPSHOT"]]
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]
:figwheel {:http-server-root "public"
:server-port 3449
:css-dirs ["resources/public/css"]
:ring-handler homing-pigeon.handler/app}
:env {:dev? true}
:cljsbuild {:builds {:app {:source-paths ["env/dev/cljs"]
:compiler {:source-map true}}}}}
:uberjar {:hooks [leiningen.cljsbuild minify-assets.plugin/hooks]
:env {:production true}
:aot :all
:omit-source true
;;TODO: figure out how to clean properly
;:prep-tasks [["cljsbuild" "clean"]]
:cljsbuild {:jar true
:builds {:app
{:source-paths ["env/prod/cljs"]
:compiler
{:optimizations :advanced
:pretty-print false}}}}}
:production {:ring {:open-browser? false
:stacktraces? false
:auto-reload? false}}})
I found the problem.
I had an empty file in core/rules.cljs, and the compiler was erorring out over it.