nileshlog
Posts: 20
Joined: Tue Oct 11, 2016 7:15 am
Contact: Website Skype Twitter YouTube

Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 1:49 pm

I have setup the Pi 3 to serve as a NAS, a MiniDLNA server and a Deluge client. Its running the latest raspbian. I used to access this headless server via Putty/VNC. But after the setup, after about 4 days, it has stopped giving access to Putty, Network server or MiniDLNA.
I see my Pi ip is set static and is intact.

pcmanbob
Posts: 6451
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 2:06 pm

Can you ping the pi's IP address from another computer on the same network ?
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

nileshlog
Posts: 20
Joined: Tue Oct 11, 2016 7:15 am
Contact: Website Skype Twitter YouTube

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 2:19 pm

pcmanbob wrote:
Thu Jul 11, 2019 2:06 pm
Can you ping the pi's IP address from another computer on the same network ?
Oh..oh!! No...Something's wrong with my IP..Will start looking into that.Any suggestions with respect to how static IP is configured in the new Raspbian distro? I used the network settings in the top taskbar.

nileshlog
Posts: 20
Joined: Tue Oct 11, 2016 7:15 am
Contact: Website Skype Twitter YouTube

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 2:20 pm

nileshlog wrote:
Thu Jul 11, 2019 2:19 pm
pcmanbob wrote:
Thu Jul 11, 2019 2:06 pm
Can you ping the pi's IP address from another computer on the same network ?
Oh..oh!! No...Something's wrong with my IP..Will start looking into that.Any suggestions with respect to how static IP is configured in the new Raspbian distro? I used the network settings in the top taskbar.
Surprisingly, my router is showing that the Pi is connected with the IP that I configured.

pcmanbob
Posts: 6451
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 2:29 pm

OK you could try unplugging the network cable for 60 seconds and then reconnect it to see if that restorers the connection ,

but it may be that you pi has crashed in which case that's not going to help , do you see any activity on the green LED on the pi ?

To set a static IP on the pi you need to edit /etc/dhcpcd.conf and add the static IP in there,
but the address must be outside the range of address that the router DHCP server can assign or you might get address conflicts.

The better option is to use address reservation on your router if it supports it.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

nileshlog
Posts: 20
Joined: Tue Oct 11, 2016 7:15 am
Contact: Website Skype Twitter YouTube

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 2:37 pm

pcmanbob wrote:
Thu Jul 11, 2019 2:29 pm
OK you could try unplugging the network cable for 60 seconds and then reconnect it to see if that restorers the connection ,

but it may be that you pi has crashed in which case that's not going to help , do you see any activity on the green LED on the pi ?

To set a static IP on the pi you need to edit /etc/dhcpcd.conf and add the static IP in there,
but the address must be outside the range of address that the router DHCP server can assign or you might get address conflicts.

The better option is to use address reservation on your router if it supports it.
Here's what I did. removed the static configuration. restared and then reapplied static IP. now accessible. Previously even internet was inaccessible. What could be the reason?
I take care to restart my Pi every 3-4 days so that it reacquires connection with my router. But never faced this issue with previous version of raspbian.

My DHCP is configured from 192.168.1.150 to 192.168.1.200 and my Pi is on static IP 192.168.1.95

I have to move my keyboard and mouse to connect to Pi and yes, its working perfectly standlone. Just didnt access the network i think.

Am i sounding too incoherant in my answer? just typing whatever is coming to my mind. Sorry about that

pcmanbob
Posts: 6451
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 3:01 pm

Start by posting a copy of your dhcpcd.conf file

please use code tags ....
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

nileshlog
Posts: 20
Joined: Tue Oct 11, 2016 7:15 am
Contact: Website Skype Twitter YouTube

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 4:44 pm

pcmanbob wrote:
Thu Jul 11, 2019 3:01 pm
Start by posting a copy of your dhcpcd.conf file

please use code tags ....

Code: Select all

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# Example static IP configuration:
interface eth0
static ip_address=192.168.1.95/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.1.1
#static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0


I setup the static IP in dhcpcd.conf. hoping this will stick.

Currently able to access Pi via ssh.

User avatar
HawaiianPi
Posts: 4470
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Pi Server inaccessiblt via SSH/VNC

Thu Jul 11, 2019 4:49 pm

Is your router configured with a restricted DHCP range that does not overlap your static IP?

Really, the best way to get a fixed IP is to reserve it in your router's DHCP settings (rather than mucking about with OS specific configuration files). You only have to do it once, and then that particular Pi will always get the same IP, even when booting from different cards or a new OS.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

nileshlog
Posts: 20
Joined: Tue Oct 11, 2016 7:15 am
Contact: Website Skype Twitter YouTube

Re: Pi Server inaccessiblt via SSH/VNC

Wed Jul 17, 2019 2:16 pm

HawaiianPi wrote:
Thu Jul 11, 2019 4:49 pm
Is your router configured with a restricted DHCP range that does not overlap your static IP?

Really, the best way to get a fixed IP is to reserve it in your router's DHCP settings (rather than mucking about with OS specific configuration files). You only have to do it once, and then that particular Pi will always get the same IP, even when booting from different cards or a new OS.
I had cofigured with restricted DHCP which was not conflicting with all the static IPs. Now I have changed over to DHCP reservation couple of days back.


I have a mess of a network at home. A main router which feeds to Pi, and other 2 routers via LAN Cable. The main router is on 192.168.1.1, the second and third router on 192.168.1.2 and 192.168.1.3. Pi is on 192.168.1.95. My smart Tv is connected to the second router and has a reserved IP 192.168.1.8. Pi is connected to my main router and even now I used ifconfig to check ,it was showing 192.168.1.95 as its IP .

The DHCP on router 2 and router 3 are disabled.

nileshlog
Posts: 20
Joined: Tue Oct 11, 2016 7:15 am
Contact: Website Skype Twitter YouTube

Re: Pi Server inaccessiblt via SSH/VNC

Wed Jul 17, 2019 2:29 pm

I removed the lan cable for about 30 seconds and reinserted. then restarted pi and the router too. now it is back online. Strange and funny. Like in old times when you had to slap on a dead machine, hoping it will start.

User avatar
pi-anazazi
Posts: 518
Joined: Fri Feb 13, 2015 9:22 pm
Location: EU

Re: Pi Server inaccessiblt via SSH/VNC

Wed Jul 17, 2019 4:38 pm

I had something like that a few years ago

https://www.raspberrypi.org/forums/view ... 5#p1022085

Went away after installing fresh raspbian, I found no way to debug this...
Kind regards

anazazi

Return to “Networking and servers”