Page 2 of 2

Porteus Updater - ERROR An internet connection is required

Posted: 07 May 2019, 04:27
by ncmprhnsbl
Beginning Beginner wrote:
06 May 2019, 17:07
So, no one knows anything about this?
seems to be blocked by the firewall (at least, when i turn off the firewall, it passes the connection test)
this probably hasn't been a priority because there havn't been any updates..
ping and ssh(at least ) are also affected by this, so i suspect the firewall rules might need some attention..
now, update-porteus uses the function: is_online (sourced from /usr/share/porteus/porteus-functions) , which looks like this:

Code: Select all

is_online(){ ping -q -w 1 -c 1 `ip r | awk '/default/{print$3}'|head -n1` >/dev/null 2>&1; }
the problem being that ping is blocked by the firewall.. why? :unknown:
other scripts, eg update-firefox, use function: is_online_url (also sourced from /usr/share/porteus/porteus-functions) , which looks like this:

Code: Select all

is_online_url(){ ( wget -q --spider --force-html --inet4-only $1 >/dev/null 2>&1 ); }
which is not affected by the firewall..

Porteus Updater - ERROR An internet connection is required

Posted: 07 May 2019, 04:59
by Ed_P
I don't recall disabling my firewall and I am able to connect.

Porteus Updater - ERROR An internet connection is required

Posted: 07 May 2019, 17:16
by Beginning Beginner
ncmprhnsbl, Yes, you are right, that is exactly the problem. I had already tried all 3 of the firewall presets, but hadn't turned it off. Now i tried it and the update worked. Its a security issue, but Ill wait a while as I am sure it will be solved, and as Ed_P already said:
Ed_P wrote:
03 May 2019, 19:46
There are no patches that are not included in the ISO.
Ed_P, If it works for you without disabling the firewall, maybe you are running a different version. I am running Porteus v.4.0, and had the same problem with the LXDE, Openbox, XFCE, LXQT and Cinnamon ISOs

About the pendrive, its a 32GB pen, and it probably qualifies in the "slow device" category. As does the laptop for that matter hehe.

I formatted it as a single ext4 partition, copied the files into it, and ran the Linux installer in the boot folder.

I had already tried with an 8GB pen, and no problem with that one. Didn't need the "delay" cheatcode.

With the 32GB one, the "delay" cheatcode only worked a handful of times, and when it did, i was able to boot normally. I don't understand why the cheatcode doesn't work most of the time. Am i missing something? :%)

Porteus Updater - ERROR An internet connection is required

Posted: 07 May 2019, 17:40
by Ed_P
I just checked and my firewall is set to Disable when booting, so that explains that. I don't remember if that was a default or I disabled it at some point.

For the 32GB pen drive see if formating it as FAT32 helps. We can address persistence later.

Porteus Updater - ERROR An internet connection is required

Posted: 08 May 2019, 11:57
by Beginning Beginner
I tried formatting it as FAT32, but it still behaved in the same way.

Maybe if it is possible to edit the device not ready timer it will work. Not sure how to do that though.

But for now, there's a bigger problem.. Some changes are not being preserved through reboots, and something strange happens to the password.

After a reboot, the system no longer accepts my password, but it doesn't accept the default password either.

I don't know if it is relevant, but I'm using copy2ram with the changes cheatcode added to it

Edit: Well the password's behavior was no mystery after all lol. The keyboard settings are not being preserved, and so it makes it difficult to enter the right password.

Edit2: Ok, i must have done something right, because now the keyboard settings are preserved.


Edit3: So the 8GB pen is making some progress. The problem with the 32GB pen persists though, any ideas?

Also, I read this http://www.porteus.org/component/conten ... dules.html and this http://www.porteus.org/component/conten ... udies.html but I still don't quite understand how i should handle dependencies in Porteus.
If two packages have a dependency in common, should each one have a copy of the dependency in its module bundle?
If i do it that way, what happens if i load both bundles at the same time? Will the memory get cluttered with two copies of the same dependency?

Porteus Updater - ERROR An internet connection is required

Posted: 09 May 2019, 08:14
by ncmprhnsbl
Beginning Beginner wrote:
08 May 2019, 11:57
but I still don't quite understand how i should handle dependencies in Porteus.
If two packages have a dependency in common, should each one have a copy of the dependency in its module bundle?
if you want to use them independently, yes
Beginning Beginner wrote:
08 May 2019, 11:57
If i do it that way, what happens if i load both bundles at the same time? Will the memory get cluttered with two copies of the same dependency?
more memory will be used(or cached at least) and you would be unable to deactivate one of them because the common files will still be in use.
Ed_P wrote:
07 May 2019, 17:40
I just checked and my firewall is set to Disable when booting, so that explains that. I don't remember if that was a default or I disabled it at some point.
disabled is the default

Porteus Updater - ERROR An internet connection is required

Posted: 30 Aug 2023, 05:51
by Rava
For me
Blaze wrote:
03 May 2019, 10:25

Code: Select all

wget -q --spider --force-html --inet4-only http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; }
Blaze's trick seems to work:

Code: Select all

root@porteus:~# wget -q --spider --force-html --inet4-only http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; }
root@porteus:~# echo $?
0
root@porteus:~# 

while the original code not works:

Code: Select all

root@porteus:~# su -
(So that I can exit the extra layer of bash that will have /usr/share/porteus/porteus-functions permanently loaded.)

Code: Select all

root@porteus:~# . /usr/share/porteus/porteus-functions
root@porteus:~# is_online
root@porteus:~# echo $?
1
root@porteus:~# 
and exit the extra bash:

Code: Select all

root@porteus:~# 
logout
root@porteus:~# is-online
-su: is-online: command not found
root@porteus:~# 
(Though as test I suggest it being more verbose like so:)
wget -q --spider --force-html --inet4-only http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; } && echo "All went well, server available."

Code: Select all

root@porteus:~# wget -q --spider --force-html --inet4-only http://dl.porteus.org || { echo "Fatal error. Could not contact server."; exit 1; } && echo "All went well, server available."
All went well, server available.
root@porteus:~# echo $?
0
root@porteus:~#