engineer_m
Posts: 25
Joined: Tue Apr 28, 2015 6:37 pm

RPI 2 is not accessible after a week

Thu Apr 13, 2017 6:28 am

Hello,

I have a RPI2 that acts as a web server and contains a web application for heating control. Everything was working fine about 6 months. Now, the RPI2 can't be accessed through ssh client or ftp server. Also, when I enter the URL of the web application it cant be accessed , I can only access the www folder of the web server ( The IT WORKS page ). When i plug off the RPI2 from power, and plug it in again, everything works for about a week ( i can access the web app, ssh is accessible, ftp is accessible). After a week passes the RPI2 gets stuck again. It seem that after a week of runtime i am losing permissions? Any thoughts?

kingosticks
Posts: 20
Joined: Mon Jun 24, 2013 9:25 am

Re: RPI 2 is not accessible after a week

Thu Apr 13, 2017 6:34 pm

Can you still access it using the ip address? Are you running a firewall on the pi, such as iptables? If the answer is yes to both those questions then check you have opened ports 67 and 68 to allow dhcp renewals.

engineer_m
Posts: 25
Joined: Tue Apr 28, 2015 6:37 pm

Re: RPI 2 is not accessible after a week

Fri Apr 14, 2017 6:38 am

But i have a STATIC IP ADDRESS. I have not installed any additional firewall on the Pi. And yes, i can still access the www folder of the apache web server (the IT WORKS folder) via url. I cannot access applications in www folder though. Please explain more?

kingosticks
Posts: 20
Joined: Mon Jun 24, 2013 9:25 am

Re: RPI 2 is not accessible after a week

Fri Apr 14, 2017 7:58 am

Then it's a different problem. Sorry, I don't know.

Reinier de Waard
Posts: 6
Joined: Mon Apr 03, 2017 6:48 pm

Re: RPI 2 is not accessible after a week

Tue Apr 18, 2017 10:26 am

First sorry for my English I live in the Netherlands. Maybe it will work fine after a restart of the apache server.

Reinier de Waard
Posts: 6
Joined: Mon Apr 03, 2017 6:48 pm

Re: RPI 2 is not accessible after a week

Tue Apr 18, 2017 10:27 am

Otherwise reinstalling the apache can work too.
Last edited by Reinier de Waard on Tue Apr 18, 2017 4:25 pm, edited 1 time in total.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24987
Joined: Sat Jul 30, 2011 7:41 pm

Re: RPI 2 is not accessible after a week

Tue Apr 18, 2017 10:37 am

Any relevant messages in 'dmesg'?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

engineer_m
Posts: 25
Joined: Tue Apr 28, 2015 6:37 pm

Re: RPI 2 is not accessible after a week

Wed Apr 19, 2017 3:46 pm

this is what i get in dmesg
[ 0.000000] Booting Linux on physical CPU 0xf00
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.1.19-v7+ ([email protected]) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #858 SMP Tue Mar 15 15:56:00 GMT 2016
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi 2 Model B Rev 1.1
[ 0.000000] cma: Reserved 8 MiB at 0x3a400000
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] On node 0 totalpages: 241664
[ 0.000000] free_area_init_node: node 0, pgdat 80880fc0, node_mem_map b9bb4000
[ 0.000000] Normal zone: 2124 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 241664 pages, LIFO batch:31
[ 0.000000] [bcm2709_smp_init_cpus] enter (9420->f3003010)
[ 0.000000] [bcm2709_smp_init_cpus] ncores=4
[ 0.000000] PERCPU: Embedded 12 pages/cpu @bafb1000 s20416 r8192 d20544 u49152
[ 0.000000] pcpu-alloc: s20416 r8192 d20544 u49152 alloc=12*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 239540
[ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2709.boardrev=0xa01041 bcm2709.serial=0x98613437 smsc95xx.macaddr=B8:27:EB:61:34:37 bcm2708_fb.fbswap=1 bcm2709.uart_clock=3000000 bcm2709.disk_led_gpio=47 bcm2709.disk_led_active_low=0 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000 dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 939380K/966656K available (6064K kernel code, 534K rwdata, 1664K rodata, 444K init, 757K bss, 19084K reserved, 8192K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xbb800000 - 0xff000000 (1080 MB)
[ 0.000000] lowmem : 0x80000000 - 0xbb000000 ( 944 MB)
[ 0.000000] modules : 0x7f000000 - 0x80000000 ( 16 MB)
[ 0.000000] .text : 0x80008000 - 0x807945f0 (7730 kB)
[ 0.000000] .init : 0x80795000 - 0x80804000 ( 444 kB)
[ 0.000000] .data : 0x80804000 - 0x80889b10 ( 535 kB)
[ 0.000000] .bss : 0x8088c000 - 0x809497dc ( 758 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Additional per-CPU info printed with stalls.
[ 0.000000] NR_IRQS:608
[ 0.000000] Architected cp15 timer(s) running at 19.20MHz (phys).
[ 0.000000] clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[ 0.000010] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[ 0.000032] Switching to timer-based delay loop, resolution 52ns
[ 0.000311] Console: colour dummy device 80x30
[ 0.001489] console [tty1] enabled
[ 0.001547] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[ 0.001624] pid_max: default: 32768 minimum: 301
[ 0.002012] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.002064] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.003345] Initializing cgroup subsys blkio
[ 0.003413] Initializing cgroup subsys memory
[ 0.003471] Initializing cgroup subsys devices
[ 0.003522] Initializing cgroup subsys freezer
[ 0.003590] Initializing cgroup subsys net_cls
[ 0.003696] CPU: Testing write buffer coherency: ok
[ 0.003807] ftrace: allocating 20313 entries in 60 pages
[ 0.052880] CPU0: update cpu_capacity 1024
[ 0.052956] CPU0: thread -1, cpu 0, socket 15, mpidr 80000f00
[ 0.052995] [bcm2709_smp_prepare_cpus] enter
[ 0.053152] Setting up static identity map for 0x8240 - 0x8274
[ 0.055665] [bcm2709_boot_secondary] cpu:1 started (0) 18
[ 0.056105] [bcm2709_secondary_init] enter cpu:1
[ 0.056163] CPU1: update cpu_capacity 1024
[ 0.056173] CPU1: thread -1, cpu 1, socket 15, mpidr 80000f01
[ 0.056762] [bcm2709_boot_secondary] cpu:2 started (0) 17
[ 0.057118] [bcm2709_secondary_init] enter cpu:2
[ 0.057151] CPU2: update cpu_capacity 1024
[ 0.057160] CPU2: thread -1, cpu 2, socket 15, mpidr 80000f02
[ 0.057706] [bcm2709_boot_secondary] cpu:3 started (0) 18
[ 0.057963] [bcm2709_secondary_init] enter cpu:3
[ 0.057992] CPU3: update cpu_capacity 1024
[ 0.058000] CPU3: thread -1, cpu 3, socket 15, mpidr 80000f03
[ 0.058091] Brought up 4 CPUs
[ 0.058202] SMP: Total of 4 processors activated (153.60 BogoMIPS).
[ 0.058235] CPU: All CPU(s) started in HYP mode.
[ 0.058265] CPU: Virtualization extensions available.
[ 0.059281] devtmpfs: initialized
[ 0.082862] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.083216] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.084433] pinctrl core: initialized pinctrl subsystem
[ 0.085252] NET: Registered protocol family 16
[ 0.090873] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[ 0.092007] bcm2709.uart_clock = 3000000
[ 0.097390] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.097452] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.097674] Serial: AMBA PL011 UART driver
[ 0.097877] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 83, base_baud = 0) is a PL011 rev2
[ 0.098499] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[ 0.174176] bcm2708-dmaengine 3f007000.dma: DMA legacy API manager at f3007000, dmachans=0xf35
[ 0.174268] bcm2708-dmaengine 3f007000.dma: Initialized 7 DMA channels (+ 1 legacy)
[ 0.175020] bcm2708-dmaengine 3f007000.dma: Load BCM2835 DMA engine driver
[ 0.175063] bcm2708-dmaengine 3f007000.dma: dma_debug:0
[ 0.175816] SCSI subsystem initialized
[ 0.176081] usbcore: registered new interface driver usbfs
[ 0.176227] usbcore: registered new interface driver hub
[ 0.176416] usbcore: registered new device driver usb
[ 0.177153] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-03-15 14:47
[ 0.204469] Switched to clocksource arch_sys_counter
[ 0.253340] FS-Cache: Loaded
[ 0.253761] CacheFiles: Loaded
[ 0.266880] NET: Registered protocol family 2
[ 0.268269] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.268443] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.268661] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.268807] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.268896] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.269400] NET: Registered protocol family 1
[ 0.269899] RPC: Registered named UNIX socket transport module.
[ 0.269941] RPC: Registered udp transport module.
[ 0.269973] RPC: Registered tcp transport module.
[ 0.270004] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.271071] hw perfevents: enabled with armv7_cortex_a7 PMU driver, 5 counters available
[ 0.272526] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.288925] VFS: Disk quotas dquot_6.6.0
[ 0.289339] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.291841] FS-Cache: Netfs 'nfs' registered for caching
[ 0.293048] NFS: Registering the id_resolver key type
[ 0.293149] Key type id_resolver registered
[ 0.293183] Key type id_legacy registered
[ 0.296169] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.296439] io scheduler noop registered
[ 0.296489] io scheduler deadline registered (default)
[ 0.296837] io scheduler cfq registered
[ 0.299458] BCM2708FB: allocated DMA memory fa800000
[ 0.299526] BCM2708FB: allocated DMA channel 0 @ f3007000
[ 0.305225] Console: switching to colour frame buffer device 82x26
[ 0.310444] Serial: 8250/16550 driver, 0 ports, IRQ sharing disabled
[ 0.313333] vc-cma: Videocore CMA driver
[ 0.315057] vc-cma: vc_cma_base = 0x00000000
[ 0.316720] vc-cma: vc_cma_size = 0x00000000 (0 MiB)
[ 0.318320] vc-cma: vc_cma_initial = 0x00000000 (0 MiB)
[ 0.320113] vc-mem: phys_addr:0x00000000 mem_base=0x3dc00000 mem_size:0x3f000000(1008 MiB)
[ 0.339100] brd: module loaded
[ 0.349595] loop: module loaded
[ 0.352038] vchiq: vchiq_init_state: slot_zero = 0xba880000, is_master = 0
[ 0.355307] Loading iSCSI transport class v2.0-870.
[ 0.357771] usbcore: registered new interface driver smsc95xx
[ 0.359399] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[ 0.561296] Core Release: 2.80a
[ 0.562758] Setting default values for core params
[ 0.564256] Finished setting default values for core params
[ 0.766239] Using Buffer DMA mode
[ 0.767746] Periodic Transfer Interrupt Enhancement - disabled
[ 0.769293] Multiprocessor Interrupt Enhancement - disabled
[ 0.770875] OTG VER PARAM: 0, OTG VER FLAG: 0
[ 0.772432] Dedicated Tx FIFOs mode
[ 0.774337] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xba814000 dma = 0xfa814000 len=9024
[ 0.777546] FIQ FSM acceleration enabled for :
[ 0.777546] Non-periodic Split Transactions
[ 0.777546] Periodic Split Transactions
[ 0.777546] High-Speed Isochronous Endpoints
[ 0.783981] dwc_otg: Microframe scheduler enabled
[ 0.784051] WARN::hcd_init_fiq:412: FIQ on core 1 at 0x80417288
[ 0.785678] WARN::hcd_init_fiq:413: FIQ ASM at 0x804175f8 length 36
[ 0.787319] WARN::hcd_init_fiq:438: MPHI regs_base at 0xbb89a000
[ 0.788973] dwc_otg 3f980000.usb: DWC OTG Controller
[ 0.790577] dwc_otg 3f980000.usb: new USB bus registered, assigned bus number 1
[ 0.792210] dwc_otg 3f980000.usb: irq 32, io mem 0x00000000
[ 0.793823] Init: Port Power? op_state=1
[ 0.795384] Init: Power Port (0)
[ 0.797151] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.798738] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.800309] usb usb1: Product: DWC OTG Controller
[ 0.801850] usb usb1: Manufacturer: Linux 4.1.19-v7+ dwc_otg_hcd
[ 0.803401] usb usb1: SerialNumber: 3f980000.usb
[ 0.805822] hub 1-0:1.0: USB hub found
[ 0.807397] hub 1-0:1.0: 1 port detected
[ 0.809332] dwc_otg: FIQ enabled
[ 0.809345] dwc_otg: NAK holdoff enabled
[ 0.809355] dwc_otg: FIQ split-transaction FSM enabled
[ 0.809397] Module dwc_common_port init
[ 0.809801] usbcore: registered new interface driver usb-storage
[ 0.811517] mousedev: PS/2 mouse device common for all mice
[ 0.813807] bcm2835-cpufreq: min=600000 max=900000
[ 0.815648] sdhci: Secure Digital Host Controller Interface driver
[ 0.817169] sdhci: Copyright(c) Pierre Ossman
[ 0.818996] sdhost: log_buf @ ba813000 (fa813000)
[ 0.894558] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[ 0.916681] sdhci-pltfm: SDHCI platform and OF driver helper
[ 0.918869] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.920673] hidraw: raw HID events driver (C) Jiri Kosina
[ 0.922579] usbcore: registered new interface driver usbhid
[ 0.924142] usbhid: USB HID core driver
[ 0.926232] Initializing XFRM netlink socket
[ 0.927827] NET: Registered protocol family 17
[ 0.929498] Key type dns_resolver registered
[ 0.931376] Registering SWP/SWPB emulation handler
[ 0.933783] registered taskstats version 1
[ 0.935576] vc-sm: Videocore shared memory driver
[ 0.937060] [vc_sm_connected_init]: start
[ 0.939223] [vc_sm_connected_init]: end - returning 0
[ 0.942297] Waiting for root device /dev/mmcblk0p2...
[ 0.952974] mmc0: host does not support reading read-only switch, assuming write-enable
[ 0.959171] mmc0: new high speed SDHC card at address 0007
[ 0.961350] mmcblk0: mmc0:0007 SD08G 7.42 GiB
[ 0.964070] mmcblk0: p1 p2
[ 0.965967] mmcblk0: p2 size 30269440 extends beyond EOD, truncated
[ 1.024620] Indeed it is in host mode hprt0 = 00021501
[ 1.057289] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.060491] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 1.063198] devtmpfs: mounted
[ 1.065632] Freeing unused kernel memory: 444K (80795000 - 80804000)
[ 1.204540] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 1.206576] Indeed it is in host mode hprt0 = 00001101
[ 1.404947] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[ 1.404960] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.405872] hub 1-1:1.0: USB hub found
[ 1.406014] hub 1-1:1.0: 5 ports detected
[ 1.684568] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 1.785008] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 1.787174] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1.792586] smsc95xx v1.0.4
[ 1.858974] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:61:34:37
[ 2.127944] udevd[174]: starting version 175
[ 3.658478] bcm2835-rng 3f104000.rng: hwrng registered
[ 3.662886] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
[ 5.116292] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 5.341576] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 9.231239] random: dd urandom read with 79 bits of entropy available
[ 10.397832] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[ 11.823556] cfg80211: Calling CRDA to update world regulatory domain
[ 11.961860] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1
[ 13.895283] Adding 102396k swap on /var/swap. Priority:-1 extents:2 across:2134012k SSFS
[ 14.974514] cfg80211: Calling CRDA to update world regulatory domain
[ 16.588897] uart-pl011 3f201000.uart: no DMA platform data
[ 17.336889] random: nonblocking pool is initialized
[ 18.134681] cfg80211: Calling CRDA to update world regulatory domain
[ 21.294553] cfg80211: Calling CRDA to update world regulatory domain
[ 24.454516] cfg80211: Calling CRDA to update world regulatory domain
[ 27.614563] cfg80211: Calling CRDA to update world regulatory domain
[ 30.774569] cfg80211: Calling CRDA to update world regulatory domain
[ 33.934554] cfg80211: Calling CRDA to update world regulatory domain
[ 37.094572] cfg80211: Calling CRDA to update world regulatory domain
[ 40.254626] cfg80211: Calling CRDA to update world regulatory domain
[ 43.414591] cfg80211: Calling CRDA to update world regulatory domain
[ 46.574559] cfg80211: Exceeded CRDA call max attempts. Not calling CRDA

drgeoff
Posts: 10220
Joined: Wed Jan 25, 2012 6:39 pm

Re: RPI 2 is not accessible after a week

Wed Apr 19, 2017 5:25 pm

Memory leak now in some updated program that wasn't leaking in previous version?

kingosticks
Posts: 20
Joined: Mon Jun 24, 2013 9:25 am

Re: RPI 2 is not accessible after a week

Wed Apr 19, 2017 5:46 pm

Is that dmesg output from when it's still working?

When you say the "IT WORKS" page is still accessible have you done a *full* page refresh in your web browser to make sure you are not seeing a cached version? Whatever is preventing your ssh connection would almost certainly stop an actual web server connection.

Can you ping it after a week?

Can you connect a keyboard and monitor to it?

engineer_m
Posts: 25
Joined: Tue Apr 28, 2015 6:37 pm

Re: RPI 2 is not accessible after a week

Wed Apr 19, 2017 8:43 pm

well, since the last freeze in thursday, i have updated with sudo apt-get update and sudo apt-get upgrade. The kernel was previously v3.x. Now it is 4.1.x. Now i am waiting for another freeze. The interesting thing with the SSH when the rpi freezes is that I am able to get initial connection and it asks for my password. If I put a wrong password it behaves like it should and the access is the denied, the reason is of course the wrong password. If I put in the correct password, it just hangs...
Last edited by engineer_m on Wed Apr 19, 2017 8:53 pm, edited 1 time in total.

engineer_m
Posts: 25
Joined: Tue Apr 28, 2015 6:37 pm

Re: RPI 2 is not accessible after a week

Wed Apr 19, 2017 8:48 pm

kingosticks wrote:Is that dmesg output from when it's still working?

When you say the "IT WORKS" page is still accessible have you done a *full* page refresh in your web browser to make sure you are not seeing a cached version? Whatever is preventing your ssh connection would almost certainly stop an actual web server connection.

Can you ping it after a week?

Can you connect a keyboard and monitor to it?
Yes, this dmesg is from today. As till today, it has worked for six days without freezing but as I said the problem occurs on weekly basis, so anytime now it might freeze.... I haven't been able to try with a keyboard, as the rpi physical location is in a customer's house in another city. He is getting very annoyed as this problem keeps repeating itself. And before this weird problem it has worked for 6 months without a flaw. Could this be related to sd card corruption?

Return to “Networking and servers”