Err_Connection_refused

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Pauduan
Posts: 12
Joined: Fri Nov 17, 2017 7:50 am

Err_Connection_refused

Post by Pauduan »

Hi

I have recently downloaded DietPi and am attempting to get it to do a few tasks on my network as a headless server. The device is an Asus Tinker, which should be hopefully sufficient for the purpose. I was using a Windows machine with 9 hard disks but am looking to outsource some of the processes to this setup.

I am looking for (asterisks* indicate which are working properly)

Transmission *
Samba *
Samba with multiple mount points
Wireless access point for 2.4GHz devices
Print server for local clients
LMS

I am a greenhorn when it comes to Linux. It took me all morning to work out how to get Samba to work, and I'm now trying to figure out how to get more than one connected drive to show up. I am hoping simply changing start path to /mnt will do the trick.

So the story with the AP is that it shows as online and working in the configuration menu, but no client is able to see the network. Not sure how to begin troubleshooting this problem. I would ideally like it to see the local network as well so my phone and tablet can access the network shares when the main windows server is up, and the shares on Dietpi and the routers. Interestingly, I cannot disable the hotspot at all when the AP service is running. Selecting the option in the menu has no effect at all. The option also has one extra : but I looked up the source and it seems to have it there as well, so I don't think that's an error.

The web interfaces for LMS and CUPS do not even show up on the browser, I get ERR_CONNECTION_REFUSED in Chrome and "Could not connect" in Firefox. The transmission web interface shows up fine though, so something works at least. As before, I have no idea where to even look.

For LMS I was using Daphile (an x86 version of LMS+Squeezelite) and using web as well as Squeezer to connect to the (also headless) server. That is an automated install and I was expecting something similar. Not sure how to begin setting it up on this due to lack of an interface. The results are the same regardless of whether Squeezelite is installed or not.

Would appreciate any help at all in getting these to work. I normally use a combination of Netgear routers' USB ports and a Windows machine to get all of these services but am looking for something simpler. Sorry for the long post and my lack of any knowledge at all - please be gentle :)
Pauduan
Posts: 12
Joined: Fri Nov 17, 2017 7:50 am

Re: Err_Connection_refused

Post by Pauduan »

After some poking around it seems the AP requires DHCP server enabled. I already have a DHCP server on the network serving existing wired clients, so this is probably unworkable. Besides the WLAN tops out at 54mbps, which would be quite the downgrade. I have shelved this requirement for now, as I have many other ways of generating a 2.4GHz network.

Still looking for solutions to connect to the web interfaces for CUPS and Squeezebox. CUPS service is in running state but I'm not sure how to check status of Sqeezebox.

Thanks for looking!
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Err_Connection_refused

Post by k-plan »

Pauduan wrote: It took me all morning to work out how to get Samba to work,
Samba is in dietpi-software:

http://dietpi.com/phpbb/viewtopic.php?f ... art=10#p56

Pauduan wrote:and I'm now trying to figure out how to get more than one connected drive to show up.
This can dietpi-drive_manager do (or in dietpi-launcher) :

http://dietpi.com/phpbb/viewtopic.php?f=8&t=673
Pauduan wrote:So the story with the AP is that it shows as online and working in the configuration menu, but no client is able to see the network.
That's correct. It is a WiFi HotSpot.
This allows other wireless devices to connect and share the internet connection.
.. but NOT to share your local network! (security reasons)

This is done via iptables rules: https://github.com/Fourdee/DietPi/blob/ ... are#L10774
You can change it manually, if you know what you are doing.
Pauduan wrote: I get ERR_CONNECTION_REFUSED in Chrome and "Could not connect" in Firefox.
Correct. Your servers are behind NAT (MASQUERADE) for the HotSpot clients, as long as HotSpot is running or installed.
Example, same as for your LAN clients (and local server) are behind (P)NAT of your ISP router and they are not connectible from outside (internet) without a port forwarding rule.
Deinstall WiFi Hotspot via dietpi-software and you can connect via LAN.
Pauduan wrote:After some poking around it seems the AP requires DHCP server enabled.
Correct. A WiFi HotSpot without his own DHCP server make no sense.
Pauduan wrote:Besides the WLAN tops out at 54mbps,
Correct. This is caused by hostapd (service). You can change it manually, if you know what you are doing, but don't expect too much.

CUPS?
No official support in dietpi-software, but web interface runs ONLY locally on http://localhost:631/admin and login is only possible for members of user group lpadmin.

To change this, have a look here:
http://thismightbehelpful.blogspot.de/2 ... rface.html

But dietpi-software supports CloudPrint (CUPS print server, with support for Google cloud printing. Also includes a web interface for CUPS): http://dietpi.com/phpbb/viewtopic.php?f ... =100#p6630
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Pauduan
Posts: 12
Joined: Fri Nov 17, 2017 7:50 am

Re: Err_Connection_refused

Post by Pauduan »

Thanks for the reply, K-plan, much appreciated. At the outset let me state that when it comes to Linux I have no idea what I'm doing. I'm helplessly poking around the menus and Google, trying to get things to work.

I am now okay with Samba and Transmission, both are accessible over the windows network. Have abandoned the plan of the hotspot for now. It's not critical and the Tinker not the best choice for the application due to low transmission speed. I was not able to even see the generated network on any device, so probably there is some other issues at play here.

I will have to abandon CUPS too, from what you're saying. I am not using any desktop on this machine, all I want is a print server like the ones that are present in most routers, which allow to share a USB-connected printer to the network.

This leaves the Squeezebox server, which I still cannot connect to - is this also accessible only to local clients?
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Err_Connection_refused

Post by k-plan »

Pauduan wrote:At the outset let me state that when it comes to Linux I have no idea what I'm doing. I'm helplessly poking around the menus and Google, trying to get things to work.
Good start is to have a look here - Releases - , particular the sticky threads:

By my own experience, at the beginning, you don't know really what need/want/can do with your new device.
The cool thing with DietPi is, you can play as much as you want with things around, very easy and quick.
Within 10-15 min. you can setup a fresh system, with all settings, configs and require software, without any additional user interaction or keyboard and monitor.
Have a look at DietPi-Automation.

If you have a well running system of your requirements and you only want to test something new, take a usb stick, make a backup via dietpi-backup or dietpi-launcher and after this, start to install via dietpi-software.
If software didn't fit your needs, uninstall it via dietpi-software or, if your system make problems, withdraw your backup.
You can play around as much as you like. In a short periode of time, you can get back a working system.

All DietPi will based on Debian 8 "Jessie", most with legacy kernel.

Pauduan wrote:This leaves the Squeezebox server, which I still cannot connect to - is this also accessible only to local clients?


Yes, it will be accessible by our local network clients.
But I think, you will better start from the scratch now. Configure your fresh system so you have local network access, you have SSH access, install and test your needed services one by one.
Don't try at the beginning "tips out of the internet for other devices". DietPi can do this by it own tools and ways.
Where is no need for something like " sudo apt-get install ..." in the beginning.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Pauduan
Posts: 12
Joined: Fri Nov 17, 2017 7:50 am

Re: Err_Connection_refused

Post by Pauduan »

Hi k-plan,

Thanks again for your reply.

I am planning on getting a fresh start anyway, this was only a test run. I plan on hooking up a 4TB portable harddrive and let it do most of the heavy lifting, only turning on the Windows server for sync and the occasional archive.

However I am unable to see any running service pointing to Squeezebox.

Would you know how I can check this? The entry is showing as installed in the software list, but the service is not started. I checked using slimserver, is it called something else?

Also if you can help me with a basic question: In Windows, you can share more than one folder at a time. Is it possible in Samba and DietPi to have multiple shares? If so, what would I need to do? Edit: NVM, found a tutorial explaining this.

If the unit can do these two things along with Transmission, I'll stick with it else I'll look for some other way to use the hardware.

Edit: Too many deal-breakers. A drive connected via a powered USB hub will not be detected by DietPi, and the Tinker (or a Pi) has insufficient power to connect a drive directly. I think this is headed downhill now. Not sure what to do at this point.
Post Reply