everyone.
I tried to adapt the SLM730 LTE module to openwrt.
I use the latest v21.02.3 version
I added usb-modeswitch, kmod-mii, kmod-usb-net, kmod-usb-wdm, kmod-usb-net-qmi-wwan, uqmi, kmod-usb-serial-option, kmod-usb-serial, kmod-usb-serial-wwan, luci, luci-proto-qmi and modified the following files:
net/usb/qmi_wwan.c
usb/serial/option.c
usb/serial/usb_wwan.c
But it has been unable to dial successfully, only TX has data sent, RX is always 0.
The device should be successfully recognized.
root#OpenWrt:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
|__ Port 2: Dev 3, If 0, Class=, Driver=option, 480M
|__ Port 2: Dev 3, If 1, Class=, Driver=option, 480M
|__ Port 2: Dev 3, If 2, Class=, Driver=option, 480M
|__ Port 2: Dev 3, If 3, Class=, Driver=option, 480M
|__ Port 2: Dev 3, If 4, Class=, Driver=, 480M
|__ Port 2: Dev 3, If 5, Class=, Driver=qmi_wwan, 480M
Here is the output of dmesg:
root#OpenWrt:~# dmesg
[ 0.000000] Linux version 5.4.188 (xu#xu-virtual-machine) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)) #0 Sat Apr 16 12:59:34 2022
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7620A ver:2 eco:6
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[ 0.000000] MIPS: machine is Asus RT-AC51U
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] On node 0 totalpages: 32768
[ 0.000000] Normal zone: 288 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Writing ErrCtl register=00035bf1
[ 0.000000] Readback ErrCtl register=00035bf1
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 122288K/131072K available (4745K kernel code, 206K rwdata, 1048K rodata, 1224K init, 205K bss, 8784K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 256
[ 0.000000] random: get_random_bytes called from start_kernel+0x358/0x54c with crng_init=0
[ 0.000000] CPU Clock: 580MHz
[ 0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[ 0.000000] systick: enable autosleep mode
[ 0.000000] systick: running - mult: 214748, shift: 32
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[ 0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[ 0.007611] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[ 0.045493] pid_max: default: 32768 minimum: 301
[ 0.050185] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.057240] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.071776] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.081258] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.087942] pinctrl core: initialized pinctrl subsystem
[ 0.093612] NET: Registered protocol family 16
[ 0.474655] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[ 0.481162] mt7620-pci: probe of 10140000.pcie failed with error -1
[ 0.510746] rt2880_gpio 10000600.gpio: registering 24 gpios
[ 0.516229] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[ 0.522244] GPIO line 10 (enable-leds) hogged as output/low
[ 0.527990] rt2880_gpio 10000688.gpio: registering 1 gpios
[ 0.533337] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[ 0.544501] clocksource: Switched to clocksource systick
[ 0.551104] NET: Registered protocol family 2
[ 0.555548] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.563304] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.571455] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.578865] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.585705] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.592020] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.598370] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.605409] NET: Registered protocol family 1
[ 0.609655] PCI: CLS 0 bytes, default 32
[ 0.616407] rt-timer 10000100.timer: maximum frequency is 1220Hz
[ 0.624774] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[ 0.639628] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.645300] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.673582] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.681013] printk: console [ttyS0] disabled
[ 0.685220] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[ 0.694838] printk: console [ttyS0] enabled
[ 0.711374] printk: bootconsole [early0] disabled
[ 0.736465] spi spi0.0: force spi mode3
[ 0.755771] spi-nor spi0.0: w25q128 (16384 Kbytes)
[ 0.765400] 4 fixed-partitions partitions found on MTD device spi0.0
[ 0.778065] Creating 4 MTD partitions on "spi0.0":
[ 0.787625] 0x000000000000-0x000000030000 : "u-boot"
[ 0.798620] 0x000000030000-0x000000040000 : "u-boot-env"
[ 0.810317] 0x000000040000-0x000000050000 : "factory"
[ 0.821535] 0x000000050000-0x000001000000 : "firmware"
[ 0.836226] 2 uimage-fw partitions found on MTD device firmware
[ 0.848103] Creating 2 MTD partitions on "firmware":
[ 0.858012] 0x000000000000-0x0000001e828c : "kernel"
[ 0.869101] 0x0000001e828c-0x000000fb0000 : "rootfs"
[ 0.880012] mtd: device 5 (rootfs) set to be root filesystem
[ 0.893263] 1 squashfs-split partitions found on MTD device rootfs
[ 0.905655] 0x00000056d000-0x000000fb0000 : "rootfs_data"
[ 0.928631] gsw: setting port4 to ephy mode
[ 0.937039] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): port 3 link up (100Mbps/Full duplex)
[ 0.955759] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[ 0.968361] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[ 0.985429] rt2880_wdt 10000120.watchdog: Initialized
[ 0.997153] NET: Registered protocol family 10
[ 1.010488] Segment Routing with IPv6
[ 1.018010] NET: Registered protocol family 17
[ 1.026942] 8021q: 802.1Q VLAN Support v1.8
[ 1.044632] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[ 1.065693] Freeing unused kernel memory: 1224K
[ 1.074737] This architecture does not have kernel memory protection.
[ 1.087570] Run /sbin/init as init process
[ 1.376461] random: fast init done
[ 1.986622] init: Console is alive
[ 1.993833] init: - watchdog -
[ 3.420622] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 3.635304] usbcore: registered new interface driver usbfs
[ 3.646413] usbcore: registered new interface driver hub
[ 3.657139] usbcore: registered new device driver usb
[ 3.674675] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 3.689736] ehci-fsl: Freescale EHCI Host controller driver
[ 3.702634] ehci-platform: EHCI generic platform driver
[ 3.723451] phy phy-usbphy.0: remote usb device wakeup disabled
[ 3.735261] phy phy-usbphy.0: UTMI 16bit 30MHz
[ 3.744124] ehci-platform 101c0000.ehci: EHCI Host Controller
[ 3.755613] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[ 3.771544] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[ 3.788422] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[ 3.801994] hub 1-0:1.0: USB hub found
[ 3.809990] hub 1-0:1.0: 1 port detected
[ 3.823568] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 3.837841] ohci-platform: OHCI generic platform driver
[ 3.848666] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[ 3.862262] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[ 3.878194] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[ 3.915374] hub 2-0:1.0: USB hub found
[ 3.923373] hub 2-0:1.0: 1 port detected
[ 3.936495] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 3.955358] init: - preinit -
[ 4.080508] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 4.668805] hub 1-1:1.0: USB hub found
[ 4.768271] hub 1-1:1.0: 4 ports detected
[ 4.848520] random: procd: uninitialized urandom read (4 bytes read)
[ 5.231629] usb 1-1.2: new high-speed USB device number 3 using ehci-platform
[ 5.251938] random: jshn: uninitialized urandom read (4 bytes read)
[ 5.431566] random: jshn: uninitialized urandom read (4 bytes read)
[ 5.916295] urandom_read: 4 callbacks suppressed
[ 5.916304] random: jshn: uninitialized urandom read (4 bytes read)
[ 6.396876] 8021q: adding VLAN 0 to HW filter on device eth0
[ 8.040037] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[ 8.058390] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 8.181039] procd: - early -
[ 8.187091] procd: - watchdog -
[ 8.847980] random: jshn: uninitialized urandom read (4 bytes read)
[ 8.948155] procd: - watchdog -
[ 8.955179] procd: - ubus -
[ 9.185351] random: ubusd: uninitialized urandom read (4 bytes read)
[ 9.221234] procd: - init -
[ 11.701987] kmodloader: loading kernel modules from /etc/modules.d/*
[ 11.988760] usbcore: registered new interface driver cdc_wdm
[ 12.017931] Loading modules backported from Linux version v5.10.110-0-g3238bffaf992
[ 12.033279] Backport generated by backports.git v5.10.110-1-0-g1fbde860
[ 12.113347] usbcore: registered new interface driver usbserial_generic
[ 12.126509] usbserial: USB Serial support registered for generic
[ 12.193556] xt_time: kernel timezone is -0000
[ 12.239731] urngd: jent-rng init failed, err: 2
[ 12.401783] PPP generic driver version 2.4.2
[ 12.413893] NET: Registered protocol family 24
[ 12.426633] qmi_wwan 1-1.2:1.5: work on RawIP mode
[ 12.437478] qmi_wwan 1-1.2:1.5: cdc-wdm0: USB WDM device
[ 12.449206] qmi_wwan 1-1.2:1.5 wwan0: register 'qmi_wwan' at usb-101c0000.ehci-1.2, WWAN/QMI device, 7a:a8:ae:e9:6e:86
[ 12.470905] usbcore: registered new interface driver qmi_wwan
[ 12.627036] usbcore: registered new interface driver option
[ 12.638338] usbserial: USB Serial support registered for GSM modem (1-port)
[ 12.652833] option 1-1.2:1.0: GSM modem (1-port) converter detected
[ 12.665686] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 12.679853] option 1-1.2:1.1: GSM modem (1-port) converter detected
[ 12.692748] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 12.706902] option 1-1.2:1.2: GSM modem (1-port) converter detected
[ 12.719824] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 12.733958] option 1-1.2:1.3: GSM modem (1-port) converter detected
[ 12.746833] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB3
[ 12.943757] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[ 12.958194] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[ 12.973669] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 7620 detected
[ 12.987503] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 13.031948] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 24.722303] crng init done
[ 46.735943] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 46.779026] jffs2_build_filesystem(): unlocking the mtd device...
[ 46.779981] done.
[ 46.796204] jffs2_build_filesystem(): erasing all blocks after the end marker...
[ 48.934666] 8021q: adding VLAN 0 to HW filter on device eth0
[ 49.060777] br-lan: port 1(eth0.1) entered blocking state
[ 49.071639] br-lan: port 1(eth0.1) entered disabled state
[ 49.082849] device eth0.1 entered promiscuous mode
[ 49.092455] device eth0 entered promiscuous mode
[ 49.237050] br-lan: port 1(eth0.1) entered blocking state
[ 49.247889] br-lan: port 1(eth0.1) entered forwarding state
[ 49.938878] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 293.242138] done.
[ 293.246035] jffs2: notice: (2443) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[ 293.495834] overlayfs: upper fs does not support tmpfile.
Attach a screenshot of the network interface
The modified driver code is attached, please refer to
drivers.zip
After two weeks of research, I really have no clue. Please forgive my English writing.
Please give me some pointers. Thank you!
RabbitMQ crashed.
RabbitMQ was working correctly for many days(10-15 days).
I am not getting why it got crashed.
I am using RabbitMQ 3.4.0 on Erlang 17.0
The erlang has created dump file for the crash. Which shows
eheap_alloc: Cannot allocate 229520 bytes of memory (of type "old_heap").
Also note that the rabbitmq publish-subscribe message load is very low. (max:1-2 messages/second).And RabbitMQ messages are processed as it comes so RabbitMQ is almost empty all the time. The disk space & memory are also sufficient.
More system info:
Limiting to approx 8092 file handles (7280 sockets)
Memory limit set to 6553MB of 16383MB total.
Disk free limit set to 50MB.
The RabbitMQ logs are as below.
=ERROR REPORT==== 18-Jul-2015::04:29:31 ===
** Generic server rabbit_disk_monitor terminating
** Last message in was update
** When Server state == {state,"c:/Users/jasmin.joshi/AppData/Roaming/RabbitMQ/db/rabbit#localhost-mnesia",
50000000,28358258688,100,10000,
#Ref<0.0.106.70488>,false}
** Reason for termination ==
** {eacces,[{erlang,open_port,
[{spawn,"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"c:/Users/jasmin.joshi/AppData/Roaming/RabbitMQ/db/rabbit#localhost-mnesia\""},
[stream,in,eof,hide]],
[]},
{os,cmd,1,[{file,"os.erl"},{line,204}]},
{rabbit_disk_monitor,get_disk_free,2,[]},
{rabbit_disk_monitor,internal_update,1,[]},
{rabbit_disk_monitor,handle_info,2,[]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,599}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
=INFO REPORT==== 18-Jul-2015::04:29:31 ===
Disabling disk free space monitoring on unsupported platform:
{{'EXIT',{eacces,[{erlang,open_port,
[{spawn,"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"c:/Users/jasmin.joshi/AppData/Roaming/RabbitMQ/db/rabbit#localhost-mnesia\""},
[stream,in,eof,hide]],
[]},
{os,cmd,1,[{file,"os.erl"},{line,204}]},
{rabbit_disk_monitor,get_disk_free,2,[]},
{rabbit_disk_monitor,init,1,[]},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}},
17179336704}
=INFO REPORT==== 18-Jul-2015::04:29:31 ===
Disabling disk free space monitoring on unsupported platform:
{{'EXIT',{eacces,[{erlang,open_port,
[{spawn,"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"c:/Users/jasmin.joshi/AppData/Roaming/RabbitMQ/db/rabbit#localhost-mnesia\""},
[stream,in,eof,hide]],
[]},
{os,cmd,1,[{file,"os.erl"},{line,204}]},
{rabbit_disk_monitor,get_disk_free,2,[]},
{rabbit_disk_monitor,init,1,[]},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}},
17179336704}
=CRASH REPORT==== 18-Jul-2015::04:29:31 ===
crasher:
initial call: rabbit_disk_monitor:init/1
pid: <0.167.0>
registered_name: rabbit_disk_monitor
exception exit: {eacces,
[{erlang,open_port,
[{spawn,
"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"c:/Users/jasmin.joshi/AppData/Roaming/RabbitMQ/db/rabbit#localhost-mnesia\""},
[stream,in,eof,hide]],
[]},
{os,cmd,1,[{file,"os.erl"},{line,204}]},
{rabbit_disk_monitor,get_disk_free,2,[]},
{rabbit_disk_monitor,internal_update,1,[]},
{rabbit_disk_monitor,handle_info,2,[]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,599}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}
in function gen_server:terminate/6 (gen_server.erl, line 746)
ancestors: [rabbit_disk_monitor_sup,rabbit_sup,<0.140.0>]
messages: []
links: [<0.166.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 4185
stack_size: 27
reductions: 481081978
neighbours:
=SUPERVISOR REPORT==== 18-Jul-2015::04:29:31 ===
Supervisor: {local,rabbit_disk_monitor_sup}
Context: child_terminated
Reason: {eacces,
[{erlang,open_port,
[{spawn,
"C:\\Windows\\system32\\cmd.exe /c dir /-C /W \"c:/Users/jasmin.joshi/AppData/Roaming/RabbitMQ/db/rabbit#localhost-mnesia\""},
[stream,in,eof,hide]],
[]},
{os,cmd,1,[{file,"os.erl"},{line,204}]},
{rabbit_disk_monitor,get_disk_free,2,[]},
{rabbit_disk_monitor,internal_update,1,[]},
{rabbit_disk_monitor,handle_info,2,[]},
{gen_server,handle_msg,5,
[{file,"gen_server.erl"},{line,599}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,239}]}]}
Offender: [{pid,<0.167.0>},
{name,rabbit_disk_monitor},
{mfargs,{rabbit_disk_monitor,start_link,[50000000]}},
{restart_type,{transient,1}},
{shutdown,4294967295},
{child_type,worker}]
=CRASH REPORT==== 18-Jul-2015::04:29:31 ===
crasher:
initial call: rabbit_disk_monitor:init/1
pid: <0.24989.51>
registered_name: []
exception exit: unsupported_platform
in function gen_server:init_it/6 (gen_server.erl, line 322)
ancestors: [rabbit_disk_monitor_sup,rabbit_sup,<0.140.0>]
messages: []
links: [<0.166.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 1598
stack_size: 27
reductions: 650
neighbours:
=SUPERVISOR REPORT==== 18-Jul-2015::04:29:31 ===
Supervisor: {local,rabbit_disk_monitor_sup}
Context: start_error
Reason: unsupported_platform
Offender: [{pid,<0.167.0>},
{name,rabbit_disk_monitor},
{mfargs,{rabbit_disk_monitor,start_link,[50000000]}},
{restart_type,{transient,1}},
{shutdown,4294967295},
{child_type,worker}]
=CRASH REPORT==== 18-Jul-2015::04:29:31 ===
crasher:
initial call: rabbit_disk_monitor:init/1
pid: <0.24991.51>
registered_name: []
exception exit: unsupported_platform
in function gen_server:init_it/6 (gen_server.erl, line 322)
ancestors: [rabbit_disk_monitor_sup,rabbit_sup,<0.140.0>]
messages: []
links: [<0.166.0>]
dictionary: []
trap_exit: false
status: running
heap_size: 1598
stack_size: 27
reductions: 650
neighbours:
=SUPERVISOR REPORT==== 18-Jul-2015::04:29:31 ===
Supervisor: {local,rabbit_disk_monitor_sup}
Context: start_error
Reason: unsupported_platform
Offender: [{pid,{restarting,<0.167.0>}},
{name,rabbit_disk_monitor},
{mfargs,{rabbit_disk_monitor,start_link,[50000000]}},
{restart_type,{transient,1}},
{shutdown,4294967295},
{child_type,worker}]
From the error message, rabbitmq can't open more files due to system limits.
You can set max open file numbers to upper value to avoid the problem.
https://serverfault.com/questions/249477/windows-server-2008-r2-max-open-files-limit
There are two unrelated errors here: one is the VM failure to allocate memory. Another is disk space monitor terminating. Disk space monitor is optional and on some less common platforms or with specific security restrictions, it is known to fail. That does not bring the VM down, and certainly has nothing to do with heap allocation failures.
The heap allocation failure typically comes down to two most common cases:
A known bug fixed in Erlang 17.x (don't recall which specific patch release, so use 17.5)
You run 32 bit Erlang/OTP on a 64 bit OS.
Chen Yu's comment about the EACCESS system call error is correct.
I get analog error
systemd unit for activation check: "rabbitmq-server.service"
eheap_alloc: Cannot allocate 306586976 bytes of memory (of type "heap").^M
^M
Crash dump is being written to: erl_crash.dump...done^M
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 514979
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1048576
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 514979
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
this is crush dump
=erl_crash_dump:0.5
Wed Dec 2 17:16:31 2020
Slogan: eheap_alloc: Cannot allocate 306586976 bytes of memory (of type "heap").
System version: Erlang/OTP 20 [erts-9.2] [source] [64-bit] [smp:32:32] [ds:32:32:10] [async-threads:512] [kernel-poll:true]
Compiled: Mon Feb 5 17:34:00 2018
Taints: crypto,asn1rt_nif,erl_tracer,zlib
Atoms: 34136
Calling Thread: scheduler:0
=scheduler:1
Scheduler Sleep Info Flags: SLEEPING | TSE_SLEEPING | WAITING
Scheduler Sleep Info Aux Work:
Current Port:
Run Queue Max Length: 0
Run Queue High Length: 0
Run Queue Normal Length: 0
Run Queue Low Length: 0
Run Queue Port Length: 0
Run Queue Flags: OUT_OF_WORK | HALFTIME_OUT_OF_WORK
Current Process:
=scheduler:2
Scheduler Sleep Info Flags: SLEEPING | TSE_SLEEPING
Scheduler Sleep Info Aux Work: THR_PRGR_LATER_OP
Current Port:
Run Queue Max Length: 0
Run Queue High Length: 0
Run Queue Normal Length: 0
Run Queue Low Length: 0
Run Queue Port Length: 0
Run Queue Flags: OUT_OF_WORK | HALFTIME_OUT_OF_WORK | NONEMPTY | EXEC
Current Process:
=scheduler:3
Scheduler Sleep Info Flags:
Scheduler Sleep Info Aux Work: DELAYED_AW_WAKEUP | DD | THR_PRGR_LATER_OP
Current Port:
Run Queue Max Length: 0
Run Queue High Length: 0
Run Queue Normal Length: 0
Run Queue Low Length: 0
Run Queue Port Length: 0
Run Queue Flags: OUT_OF_WORK | HALFTIME_OUT_OF_WORK | NONEMPTY | EXEC
Current Process: <0.12306.0>
Current Process State: Running
Current Process Internal State: ACT_PRIO_NORMAL | USR_PRIO_NORMAL | PRQ_PRIO_NORMAL | ACTIVE | RUNNING | TRAP_EXIT | ON_HEAP_MSGQ
Current Process Program counter: 0x00007f2f3ab3a060 (unknown function)
Current Process CP: 0x0000000000000000 (invalid)
Current Process Limited Stack Trace:
0x00007f2b50252d68:SReturn addr 0x32A6EC98 (rabbit_channel:handle_method/3 + 6712)
0x00007f2b50252d78:SReturn addr 0x32A69630 (rabbit_channel:handle_cast/2 + 4160)
0x00007f2b50252df8:SReturn addr 0x51102708 (gen_server2:handle_msg/2 + 1808)
0x00007f2b50252e28:SReturn addr 0x3FD85E70 (proc_lib:init_p_do_apply/3 + 72)
0x00007f2b50252e48:SReturn addr 0x7FFB4948 (<terminate process normally>)
=scheduler:4
Scheduler Sleep Info Flags: SLEEPING | TSE_SLEEPING | WAITING
When I run RAILS_ENV=production rake sunspot:solr:run, Solr starts as expected and the log looks something like this:
0 INFO (main) [ ] o.e.j.u.log Logging initialized #613ms
355 INFO (main) [ ] o.e.j.s.Server jetty-9.2.11.v20150529
380 WARN (main) [ ] o.e.j.s.h.RequestLogHandler !RequestLog
383 INFO (main) [ ] o.e.j.d.p.ScanningAppProvider Deployment monitor [file:/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr- 2.2.3/solr/server/contexts/] at interval 0
1392 INFO (main) [ ] o.e.j.w.StandardDescriptorProcessor NO JSP Support for /solr, did not find org.apache.jasper.servlet.JspServlet
1437 WARN (main) [ ] o.e.j.s.SecurityHandler ServletContext#o.e.j.w.WebAppContext#1f3ff9d4{/solr,file:/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp/,STARTING}{/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp} has uncovered http methods for path: /
1456 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init(): WebAppClassLoader=879601585#346da7b1
1487 INFO (main) [ ] o.a.s.c.SolrResourceLoader JNDI not configured for solr (NoInitialContextEx)
1488 INFO (main) [ ] o.a.s.c.SolrResourceLoader using system property solr.solr.home: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr
1491 INFO (main) [ ] o.a.s.c.SolrResourceLoader new SolrResourceLoader for directory: '/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/'
1738 INFO (main) [ ] o.a.s.c.SolrXmlConfig Loading container configuration from /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/solr.xml
1848 INFO (main) [ ] o.a.s.c.CoresLocator Config-defined core root directory: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr
1882 INFO (main) [ ] o.a.s.c.CoreContainer New CoreContainer 394200281
1882 INFO (main) [ ] o.a.s.c.CoreContainer Loading cores into CoreContainer [instanceDir=/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/]
1883 INFO (main) [ ] o.a.s.c.CoreContainer loading shared library: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/lib
1883 WARN (main) [ ] o.a.s.c.SolrResourceLoader Can't find (or read) directory to add to classloader: lib (resolved as: /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr/lib).
1905 INFO (main) [ ] o.a.s.h.c.HttpShardHandlerFactory created with socketTimeout : 600000,connTimeout : 60000,maxConnectionsPerHost : 20,maxConnections : 10000,corePoolSize : 0,maximumPoolSize : 2147483647,maxThreadIdleTime : 5,sizeOfQueue : -1,fairnessPolicy : false,useRetries : false,
2333 INFO (main) [ ] o.a.s.u.UpdateShardHandler Creating UpdateShardHandler HTTP client with params: socketTimeout=600000&connTimeout=60000&retry=true
2338 INFO (main) [ ] o.a.s.l.LogWatcher SLF4J impl is org.slf4j.impl.Log4jLoggerFactory
2339 INFO (main) [ ] o.a.s.l.LogWatcher Registering Log Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)]
2341 INFO (main) [ ] o.a.s.c.CoreContainer Security conf doesn't exist. Skipping setup for authorization module.
2341 INFO (main) [ ] o.a.s.c.CoreContainer No authentication plugin used.
2379 INFO (main) [ ] o.a.s.c.CoresLocator Looking for core definitions underneath /usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr
2385 INFO (main) [ ] o.a.s.c.CoresLocator Found 0 core definitions
2389 INFO (main) [ ] o.a.s.s.SolrDispatchFilter user.dir=/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server
2390 INFO (main) [ ] o.a.s.s.SolrDispatchFilter SolrDispatchFilter.init() done
2435 INFO (main) [ ] o.e.j.s.h.ContextHandler Started o.e.j.w.WebAppContext#1f3ff9d4{/solr,file:/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp/,AVAILABLE}{/usr/local/rvm/gems/ruby-2.2.1/gems/sunspot_solr-2.2.3/solr/server/solr-webapp/webapp}
2458 INFO (main) [ ] o.e.j.s.ServerConnector Started ServerConnector#649ad901{HTTP/1.1}{0.0.0.0:8080}
2458 INFO (main) [ ] o.e.j.s.Server Started #3074ms
6677 INFO (qtp207710485-20) [ ] o.a.s.s.SolrDispatchFilter [admin] webapp=null path=/admin/cores params={indexInfo=false&_=1453515549920&wt=json} status=0 QTime=58
6796 INFO (qtp207710485-19) [ ] o.a.s.s.SolrDispatchFilter [admin] webapp=null path=/admin/info/system params={_=1453515550069&wt=json} status=0 QTime=23
I can also access localhost:8080/solr.
However, when I run RAILS_ENV=production rake sunspot:solr:start --trace, I get a normal trace:
** Invoke sunspot:solr:start (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute sunspot:solr:start
Removing stale PID file at /home/rails/webapp/solr/pids/production/sunspot-solr-production.pid
Successfully started Solr ...
Yet I can't access localhost:8080 (it gives me an ERR_CONNECTION_REFUSED), and when I try to do anything else involving Solr, I get an Errno::ECONNREFUSED: Connection refused error.
For example, when I run RAILS_ENV=production rake sunspot:solr:reindex after starting Solr, I get:
Errno::ECONNREFUSED: Connection refused - {:data=>"<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Piece</query></delete>", :headers=>{"Content-Type"=>"text/xml"}, :method=>:post, :params=>{:wt=>:ruby}, :query=>"wt=ruby", :path=>"update", :uri=>#<URI::HTTP http://localhost:8080/solr/update?wt=ruby>, :open_timeout=>nil, :read_timeout=>nil, :retry_503=>nil, :retry_after_limit=>nil}
....
Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 8080
My sunspot.yml file looks like this, after this:
production:
solr:
hostname: localhost
port: 8080 #tomcat defaults to port 8080
path: /solr
log_level: WARNING
solr_home: solr
The Solr server was working fine before. The connection errors started when I tried to seed the production db and received an EOFError: end of file reached. I can post the full trace for that error if needed.
Please help!
I had a similar situation happen. Sunspot would say that Solr had started successfully, but it never actually did start. Turns out I was using Java 1.6 and installing JDK 8 fixed it for me.