The officially official Devuan Forum!

You are not logged in.

#1 2019-05-07 20:23:22

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

[Solved] Webserver: connection refused

On May 1st I have set up a new file server based on Beowulf, and installed Webmin to configure some settings. A first test with Firefox ESR showed that I have access. Then I did some other stuff, and meanwhile the FF addon bullshit happened, and a few updates were installed on Beowulf.

Today I tried again to connect to the file server and got connection refused with FF, Chromium and Epiphany. What may have changed since then?

tcpdump tells on all requests: Flags "["S"]", cksum 0x20c6 (incorrect -> 0x774a)". Is that normal or the problem?

Connecting to the old file server works.

Suggestions?

Thanks, Rolf

Last edited by rolfie (2019-05-12 17:21:09)

Online

#2 2019-05-08 08:07:39

neutron_stz
Member
Registered: 2018-09-16
Posts: 9  

Re: [Solved] Webserver: connection refused

From that information which you post here, its obvious that checksum of TCP SYN packet is incorrect and the packet is dropped. What is the server? Does the server is behind NAT ? Version of the server ? ... and etc...

Offline

#3 2019-05-08 08:16:28

xinomilo
Unknown
Registered: 2017-07-02
Posts: 315  

Re: [Solved] Webserver: connection refused

running a fully upgraded beowulf server with webmin (migrated from stretch), have no such issues.
as neutron_stz writes, check server logs, firewall, etc..

Offline

#4 2019-05-08 19:07:57

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [Solved] Webserver: connection refused

Well, it works now after re-installing Webmin on the server. Logs were not helpful, there was no indication in auth.log or syslog or so. Must have been human error during first use....

Thanks, Rolf

Online

#5 2019-05-09 16:37:29

chris2be8
Member
Registered: 2018-08-11
Posts: 264  

Re: [Solved] Webserver: connection refused

Could you log on to the new server any other way (eg ssh)? Did it respond to ping? Could you connect out from it to anywhere else (I assume it has a screen and keyboard)?

Chris

Offline

#6 2019-05-10 19:22:28

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [Solved] Webserver: connection refused

Everything in a small home network segment. Via ssh with putty worked, ping worked, did not try to go out from the fileserver to one of my clients.

Anyhow, its solved now.

Thanks for your input, Rolf

Online

#7 2019-05-10 20:37:26

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [Solved] Webserver: connection refused

Stop, back to square one. The server was off a day or two, just switched it on and tried to continue my setup. Again, I have no access to the file server from my workstation. Again the checksum problem when trying to connect. Looks like something is happening during power off.

Where can I check the port setting of Webmin on the file server? I can access it via putty/ssh, but when looking thhrough the webmin configs I can't find any location where the port etc is saved.

I am using webmin 1.900 which is/was the latest version.

Rolf

Last edited by rolfie (2019-05-10 20:43:08)

Online

#8 2019-05-11 00:42:56

garyk
Member
Registered: 2018-04-14
Posts: 40  

Re: [Solved] Webserver: connection refused

rolfie wrote:

Stop, back to square one. The server was off a day or two, just switched it on and tried to continue my setup. Again, I have no access to the file server from my workstation. Again the checksum problem when trying to connect. Looks like something is happening during power off.

Where can I check the port setting of Webmin on the file server? I can access it via putty/ssh, but when looking thhrough the webmin configs I can't find any location where the port etc is saved.

I am using webmin 1.900 which is/was the latest version.

Rolf

I realize this is on a private network, but do you have a firewall running on the server?  It may be closing the default webmin port( tcp port 10000) on the server. 

As to checking to see which ports are open on your server use ss from the bash prompt.  Help can be found at "man ss".  Running the command  "ss -rtl" will make ss attempt to resolve port numbers to services, check only tcp ports, and only listening ports rather than all ports. 

Hope this helps.  I used webmin some but it's been years ago and I haven't looked at it since.

Last edited by garyk (2019-05-11 00:44:15)

Offline

#9 2019-05-11 11:35:31

Dutch_Master
Member
Registered: 2018-05-31
Posts: 275  

Re: [Solved] Webserver: connection refused

When installing Webmin, it doesn't automagically configure itself to start at boot. Easiest way is reinstalling the latest Webmin (1.910 at the time of writing) then head for "System" -> "Bootup and Shutdown" in the menu, mark Webmin to start at boot and apply.

[edit]Alternatively, if you can login on the cli via ssh, run the command (as root!):

sh /etc/init.d/webmin start

This enables you to skip reinstalling Webmin, but you still need to instruct it to start at boot as described.[/edit]

HTH!

Last edited by Dutch_Master (2019-05-11 12:10:43)

Offline

#10 2019-05-11 19:25:11

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [Solved] Webserver: connection refused

Some more background info: I have configured Webmin to a different port. The ss command does not show anything, no matter if Webmin is running or not.

But I think I know whats going on: Webmin isn't started by default. sh /etc/init.d/webmin start works and starts the service, then I can talk to the server. And I checked the setting that should start Webmin during boot. After a reboot again there is no access, running the init.d script enables everything again.

So the issue is with the start of Webmin during boot of the server. Looks like this does not work.

The server runs with openrc. Maybe the issue is there? What do I need to check?

Thanks, Rolf

Online

#11 2019-05-11 19:32:08

Dutch_Master
Member
Registered: 2018-05-31
Posts: 275  

Re: [Solved] Webserver: connection refused

In that case, you'd need to provide a boot-script for OpenRC that contains the webmin start command. There's plenty of info on how to write a boot-script for Open RC on the web, or simply copy an existing script, rename and edit it properly then invoke the openrc command to start it.

Offline

#12 2019-05-11 19:47:16

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [Solved] Webserver: connection refused

Why does the existing script in init.d not do the job?

Rolf

Online

#13 2019-05-11 20:12:35

dxrobertson
Member
Registered: 2017-05-04
Posts: 232  

Re: [Solved] Webserver: connection refused

Maybe you need to tell openrc to start the script in a runlevel.  Assuming the service is named webmin and to have it start in default runlevel:

rc-update add webmin default

Offline

#14 2019-05-11 20:16:29

dxrobertson
Member
Registered: 2017-05-04
Posts: 232  

Re: [Solved] Webserver: connection refused

rolfie wrote:

Why does the existing script in init.d not do the job?

Rolf

It should work in openrc as is, as long as it has the LSB header stuff at the top of the script.  Debian has modified openrc to use the LSB so the scripts do not need to be modified from sysvinit.

Also, you can check if openrc currently has webmin assigned to a runlevel:

rc-update show

Offline

#15 2019-05-11 20:51:36

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [Solved] Webserver: connection refused

The script has something that looks to me like a LSB header, but I lack the knowledge to determine if it is correct. Looks like it is working.

Thanks, rc-update add webmin default was needed to add webmin to the list. After a reboot the service is present now.

I found a second way to get it working: add  sh /etc/init.d/webmin start @reboot to the crontab. Also does the job.

I now do a power off and restart from there to check if it still is working.

Thanks you for your feedback, Rolf

Last edited by rolfie (2019-05-11 20:52:50)

Online

#16 2019-05-12 07:42:58

neutron_stz
Member
Registered: 2018-09-16
Posts: 9  

Re: [Solved] Webserver: connection refused

Do you still have problems with establishing connection to the server ?

Offline

#17 2019-05-12 08:19:31

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: [Solved] Webserver: connection refused

Works now. Rolf

Online

#18 2019-05-16 19:12:18

garyk
Member
Registered: 2018-04-14
Posts: 40  

Re: [Solved] Webserver: connection refused

Rolf,

Just as an aside, if you are interested in learning a little more about the system startup/shutdown process in devuan check out the /etc/rc0-6.d and /etc/rcS.d directories with their startup and kill scripts.  What you will find in there are symbolic links pointing to the scripts found in /etc/init.d.  Their naming convention is such that the symbolic link names starting with an S are startup links.  The ones starting with a K are shutdown, or kill, links.  The update commands you were given add those links, but they hide what actually happens to modify the start up and shutdown procedures from the admin.  Sometimes to actually know what/where/how all of this actually works is good to know. 

One other nitpick is that running an /etc/init.d link does not require the "sh" at the start of the command.  All that is required is the path to the startup/shutdown/restart link and whatever command you're wanting to invoke such as start, restart, stop.  As long as the file you are pointing to from the bash prompt is an executable the sh command is optional.  For instance, to restart apache2, the apache webserver, all that is required is /etc/init.d/apache2 restart. 

If you read the LSB scripts in /etc/init.d at the very top of each script is the line #! /bin/sh.  That tells the system that this is an sh script, but if you check out the /bin directory, and the /bin/sh path specifically with ls -l it shows you that sh is a link to /bin/dash which the system uses to run scripts at start up as it's faster than bash.   

Just a little trivia but it all helps in understanding how your system starts up, runs, and shuts down.

Offline

Board footer