Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Network services unreachable

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
pablito
Posts: 7
Joined: 2015-07-04 16:01

Network services unreachable

#1 Post by pablito »

Hi :

I have Debian 10 installed on a headless CubieTruck (Allwinner). Networking was originally configured "out of the box" with DHCP. I wanted to make the IP static so changed /etc/networking/interfaces following an article online. After my first boot, I could not even ping the box. Assuming I'd messed up the configuration, I reverted back to DHCP and rebooted. I can once again ping the box, but I cannot connect over SSH or HTTPS.

To make matters worse, the login prompt never appears at the physical console on boot. It "smells" like a video issue.This is obviously unlikely related to the networking problem and this second issue may have showed up during the last system upgrade I carried out a number of months back. I wouldn't have noticed as everything was done over SSH at the time. In short, the only way I can have a look at the logs, change the configuration, etc. is is to pull the plug, disconnect the HDD and physically mound it on old Linux box (Mint 17.3).

I'd like to resolve both issues, but thought to start with restoring SSHD if possible. I'm open to suggestions. Could my failed reconfiguration of the networking somehow have resulted in all network services being disabled permanently" (in configuration)? ...end result being that they aren't launched despite networking having been restored?

A few others possibly relevant facts :
- I've booted the board a number of times and networking does come up as I can ping it. However, when I later mount the board to have a look at the logs, nothing in /var/log appears to have changed. Everything is still timestamped from before I lost networking services. It almost seems like nothing is being logged. That said, I am unable to properly shutdown so maybe logs aren't being flushed to disk?
- I did a nmap scan and port 111 (rpcbind) is open.
- During boot up at the console, the sequence seems normal enough. The last thing I see before the screen goes blank is the starting kernel message. - However, further up the boot sequence (before the kernel launch), the short countdown to stop the boot by "pressing any key" doesn't. Key presses have no effect. Oddly, Ctrl+Alt+Del does reboot the board. This seems to be the only thing I can do from the console.

Many thanks,
Pab

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Network services unreachable

#2 Post by arzgi »

Can you post your static /etc/network/interfaces, please use code tags.

Would be very nice, if net breaks for example from the server side, and you had reinstall after that :mrgreen:

https://wiki.debian.org is much better than some random web article.

zwab
Posts: 27
Joined: 2021-08-27 15:41
Been thanked: 3 times

Re: Network services unreachable

#3 Post by zwab »

I had a somewhat similar issue recently on Debian 10. What fixed it for me was to make /etc/network/interfaces look like this:

Code: Select all

auto lo
iface lo inet loopback

auto (your interface here)
iface (your interface here) inet static
address (your ip here)
netmask (your netmask here)
gateway (your gateway here)
remove the ()'s above. The above was obvious, what took me a while to figure out was that /etc/network/interfaces.d/setup should match the above as well. Matching setup and interfaces fixed my issue maybe you should look there as far as your static ip issues go.

kedaha
Posts: 3521
Joined: 2008-05-24 12:26
Has thanked: 33 times
Been thanked: 77 times

Re: Network services unreachable

#4 Post by kedaha »

Hi,
Have you opened ports 22, 80 & 443 in your router for the internal IP address of the Cubie truck?
Is port 22 detected to be open from the 'net?
Do you use a wired ethernet or a wireless dongle?
What firewall did you use?
In Debian, did you make the opened port 22 permanent so that it would still be open after a reboot?
The same applies for the https port 443 you mention.
What sort of static IP? is it only for the internal network or also for the internet? You do have an external static IP?
DebianStable

Code: Select all

$ vrms

No non-free or contrib packages installed on debian!  rms would be proud.

pablito
Posts: 7
Joined: 2015-07-04 16:01

Re: Network services unreachable

#5 Post by pablito »

Thanks for the replies and sorry for the delay in getting back to this.

@zwab : I tried your suggestion. The file /etc/network/interfaces is now :

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.5.10
netmask 255.255.255.0
gateway 192.168.5.1
and /etc/network/interfaces.d/setup is :

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
address 192.168.5.10
netmask 255.255.255.0
gateway 192.168.5.1
The result is the same. After the board boots :
...
64 bytes from 192.168.5.9: icmp_seq=26 ttl=64 time=0.401 ms
64 bytes from 192.168.5.9: icmp_seq=27 ttl=64 time=0.473 ms
64 bytes from 192.168.5.9: icmp_seq=28 ttl=64 time=0.490 ms
^C
--- 192.168.5.10 ping statistics ---
28 packets transmitted, 7 received, +21 errors, 75% packet loss, time 27109ms
rtt min/avg/max/mdev = 0.327/143.118/999.210/349.498 ms, pipe 3
$ ssh 192.168.5.10
ssh: connect to host 192.168.5.10 port 22: Connection refused
$ nmap 192.168.5.10

Starting Nmap 6.40 ( http://nmap.org ) at 2021-10-23 13:33 ADT
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Nmap scan report for 192.168.5.10
Host is up (0.0086s latency).
Not shown: 999 closed ports
PORT STATE SERVICE
111/tcp open rpcbind

Nmap done: 1 IP address (1 host up) scanned in 0.37 seconds
$
Both the Cubietruck and the Linux laptop are connected to each other directly through a dumb hub each with test static IP addresses as shown above so the network is flat. The only firewall that could theoretically be coming into play would have to be software based on the Cubietruck. I am happy to check the Cubietruck's firewall config files if I can be pointed to them. Again, I can only view the contents of the disk by physically mounting it to another machine.

I appreciate the help!
Pab

pablito
Posts: 7
Joined: 2015-07-04 16:01

Re: Network services unreachable

#6 Post by pablito »

I have finally managed to resolve my issue(s).

Regarding the video issue, I feel like an idiot, but finally remembered that I had originally used a USB-Serial adapter with Screen to perform the installation. See I'm not even sure if the onboard video ever worked. It is a headless box, so...

Once I could monitor the boot sequence, the "network" issue was obvious. The kernel was failing to mount my var lmv partition due to a file system error. I simply ran fsck and let it do its thing. With that done, the board booted fine with network services bound. I'm not sure when the trouble with the file system happened, but it may just have been an unlucky coincidence that occurred when I changed the network config.

Anyway, thanks to everyone that jumped in with suggestions and feedback!

Pab

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5346
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: Network services unreachable

#7 Post by dilberts_left_nut »

Thanks for the closure!
AdrianTM wrote:There's no hacker in my grandma...

Post Reply