VPS difficulties

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

VPS difficulties

horrido
I'm creating the competition website using Pharo and Teapot. For encryption, I'm using Pierce Ng's PasswordCrypt, which requires a 32-bit C library. This means I must run 32-bit Pharo.

And this means I must run 32-bit Pharo under 32-bit Linux. Therein lies the rub...

I would like to host the website at DigitalOcean or Linode or OVH. As far as I can tell, however, these services do not support 32-bit Linux, only 64-bit.

What can I do?
Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Mariano Martinez Peck
Run Pharo 32 bits and install 32 bit libs... 

On Wed, Nov 21, 2018, 21:07 Richard Kenneth Eng <[hidden email] wrote:
I'm creating the competition website using Pharo and Teapot. For encryption, I'm using Pierce Ng's PasswordCrypt, which requires a 32-bit C library. This means I must run 32-bit Pharo.

And this means I must run 32-bit Pharo under 32-bit Linux. Therein lies the rub...

I would like to host the website at DigitalOcean or Linode or OVH. As far as I can tell, however, these services do not support 32-bit Linux, only 64-bit.

What can I do?
Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

horrido
Using zeroconf, I installed 32-bit Pharo under 64-bit Debian. Pharo refused
to run – it threw up a bunch of errors.



Mariano Martinez Peck wrote
> Run Pharo 32 bits and install 32 bit libs...
>
> On Wed, Nov 21, 2018, 21:07 Richard Kenneth Eng &lt;

> horrido.hobbies@

> wrote:
>
> &gt; I'm creating the competition website using Pharo and Teapot. For
>> encryption, I'm using Pierce Ng's PasswordCrypt, which requires a 32-bit
>> C
>> library. This means I must run 32-bit Pharo.
>>
>> And this means I must run 32-bit Pharo under 32-bit Linux. Therein lies
>> the rub...
>>
>> I would like to host the website at DigitalOcean or Linode or OVH. As far
>> as I can tell, however, these services do not support 32-bit Linux, only
>> 64-bit.
>>
>> What can I do?
>>





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Sean P. DeNigris
Administrator
horrido wrote
> it threw up a bunch of errors.

Can you be more specific and did you try Mariano's suggestion about 32-bit
libs?



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Sven Van Caekenberghe-2
In reply to this post by horrido
Just use 64 bit Pharo 7 on a 64 bit Linux and be done with all this mess.

> On 22 Nov 2018, at 01:39, horrido <[hidden email]> wrote:
>
> Using zeroconf, I installed 32-bit Pharo under 64-bit Debian. Pharo refused
> to run – it threw up a bunch of errors.
>
>
>
> Mariano Martinez Peck wrote
>> Run Pharo 32 bits and install 32 bit libs...
>>
>> On Wed, Nov 21, 2018, 21:07 Richard Kenneth Eng &lt;
>
>> horrido.hobbies@
>
>> wrote:
>>
>> &gt; I'm creating the competition website using Pharo and Teapot. For
>>> encryption, I'm using Pierce Ng's PasswordCrypt, which requires a 32-bit
>>> C
>>> library. This means I must run 32-bit Pharo.
>>>
>>> And this means I must run 32-bit Pharo under 32-bit Linux. Therein lies
>>> the rub...
>>>
>>> I would like to host the website at DigitalOcean or Linode or OVH. As far
>>> as I can tell, however, these services do not support 32-bit Linux, only
>>> 64-bit.
>>>
>>> What can I do?
>>>
>
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html


Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Tim Mackinnon
In reply to this post by horrido
I think Sven is probably right - but my notes show a DO installation from 5 months ago with:

curl https://get.pharo.org | bash

wget -O - http://download.opensuse.org/repositories/devel:/languages:/pharo:/stable/xUbuntu_16.04/Release.key | apt-key add - 

echo "deb http://download.opensuse.org/repositories/devel:/languages:/pharo:/stable/xUbuntu_16.04/ ./" > /etc/apt/sources.list.d/pharo.list


apt install pharo6-32-ui pharo6-64-ui


mkdir -p /opt/pharo &&\

        cd /opt/pharo &&\

        curl https://get.pharo.org/61+vm | bash &&\

        ln -s \

            `/sbin/ldconfig -p | grep -v x86-64 | sed -e 's|[^/]*||' | grep sqlite3` \

            `find . -type f -name SqueakSSL.so -print0 | xargs -0 dirname`/sqlite3.so


cd /usr/local/bin && ln -s /opt/pharo/pharo && ln -s /opt/pharo/pharo-ui


pharo /opt/pharo/Pharo.image eval  "'Pharo {1}bit installed\' format: {32}"


./pharo Pharo.image printVersion


Sent from my iPhone

On 22 Nov 2018, at 07:39, horrido <[hidden email]> wrote:

Using zeroconf, I installed 32-bit Pharo under 64-bit Debian. Pharo refused
to run – it threw up a bunch of errors.



Mariano Martinez Peck wrote
Run Pharo 32 bits and install 32 bit libs...

On Wed, Nov 21, 2018, 21:07 Richard Kenneth Eng &lt;

horrido.hobbies@

wrote:

&gt; I'm creating the competition website using Pharo and Teapot. For
encryption, I'm using Pierce Ng's PasswordCrypt, which requires a 32-bit
C
library. This means I must run 32-bit Pharo.

And this means I must run 32-bit Pharo under 32-bit Linux. Therein lies
the rub...

I would like to host the website at DigitalOcean or Linode or OVH. As far
as I can tell, however, these services do not support 32-bit Linux, only
64-bit.

What can I do?






--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Hans-Martin
In reply to this post by Sven Van Caekenberghe-2
He's got a 32 bit library that he wants to use, that won't work with a 64
bit VM.
Of course, recompiling the library for 64 bit is an option, too, but
probably more complicated.

Cheers,
Hans-Martin

Am 22. November 2018 9:21:47 vorm. schrieb Sven Van Caekenberghe
<[hidden email]>:

> Just use 64 bit Pharo 7 on a 64 bit Linux and be done with all this mess.
>
>> On 22 Nov 2018, at 01:39, horrido <[hidden email]> wrote:
>>
>> Using zeroconf, I installed 32-bit Pharo under 64-bit Debian. Pharo refused
>> to run – it threw up a bunch of errors.
>>
>>
>>
>> Mariano Martinez Peck wrote
>>> Run Pharo 32 bits and install 32 bit libs...
>>>
>>> On Wed, Nov 21, 2018, 21:07 Richard Kenneth Eng &lt;
>>
>>> horrido.hobbies@
>>
>>> wrote:
>>>
>>> &gt; I'm creating the competition website using Pharo and Teapot. For
>>>> encryption, I'm using Pierce Ng's PasswordCrypt, which requires a 32-bit
>>>> C
>>>> library. This means I must run 32-bit Pharo.
>>>>
>>>> And this means I must run 32-bit Pharo under 32-bit Linux. Therein lies
>>>> the rub...
>>>>
>>>> I would like to host the website at DigitalOcean or Linode or OVH. As far
>>>> as I can tell, however, these services do not support 32-bit Linux, only
>>>> 64-bit.
>>>>
>>>> What can I do?
>>>>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html




Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

horrido
I tried recompiling the SHA256 library without the '-m32' flag and 64-bit
Pharo seg faulted:

pthread_setschedparam failed: Operation not permitted
This VM uses a separate heartbeat thread to update its internal clock
and handle events.  For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority.  The
effect is that heavily loaded systems may experience some latency
issues.  If this occurs, please create the appropriate configuration
file in /etc/security/limits.d/ as shown below:

cat <<END | sudo tee /etc/security/limits.d/pharo.conf
*      hard    rtprio  2
*      soft    rtprio  2
END

and report to the pharo mailing list whether this improves behaviour.

You will need to log out and log back in for the limits to take effect.
For more information please see
https://github.com/OpenSmalltalk/opensmalltalk-vm/releases/tag/r3732#linux

Segmentation fault Wed Nov 21 22:10:27 2018


/home/richard/pharo/pharo-vm/lib/pharo/5.0-201806281256/pharo
Pharo VM version: 5.0-201806281256  Thu Jun 28 13:04:44 UTC 2018 gcc 4.8
[Production Spur 64-bit VM]
Built from: CoInterpreter VMMaker.oscog-eem.2401 uuid:
29232e0e-c9e3-41d8-ae75-519db862e02c Jun 28 2018
With: StackToRegisterMappingCogit VMMaker.oscog-eem.2401 uuid:
29232e0e-c9e3-41d8-ae75-519db862e02c Jun 28 2018
Revision: VM: 201806281256
https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Thu Jun 28
14:56:30 2018 CommitHash: a8a1dc1 Plugins: 201806281256
https://github.com/OpenSmalltalk/opensmalltalk-vm.git
Build host: Linux travis-job-46342785-b1c1-4811-8c3c-9b2a88ae7ecc
4.4.0-101-generic #124~14.04.1-Ubuntu SMP Fri Nov 10 19:05:36 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux
plugin path: /home/richard/pharo/pharo-vm/lib/pharo/5.0-201806281256
[default: /home/richard/pharo/pharo-vm/lib/pharo/5.0-201806281256/]


C stack backtrace &amp; registers:
rax 0x17be8f40 rbx 0x17be8dd0 rcx 0x17be8ff8 rdx 0x17be8e88
rdi 0x17be8ba8 rsi 0x17be8ba8 rbp 0x17be8d18 rsp 0x17be90b0
r8  0x17be85e8 r9  0x17be86a0 r10 0x17be8758 r11 0x17be8810
r12 0x17be88c8 r13 0x17be8980 r14 0x17be8a38 r15 0x17be8af0
rip 0x17be9168
*[0x7ffc17be9168]

blah, blah, blah

----------

The &quot;pthread_setschedparam failed&quot; error is concerning, too.



&lt;quote author=&quot;Hans-Martin&quot;>
He's got a 32 bit library that he wants to use, that won't work with a 64
bit VM.
Of course, recompiling the library for 64 bit is an option, too, but
probably more complicated.

Cheers,
Hans-Martin

Am 22. November 2018 9:21:47 vorm. schrieb Sven Van Caekenberghe
&lt;sven@&gt;:

> Just use 64 bit Pharo 7 on a 64 bit Linux and be done with all this mess.
>
>> On 22 Nov 2018, at 01:39, horrido &lt;horrido.hobbies@&gt; wrote:
>>
>> Using zeroconf, I installed 32-bit Pharo under 64-bit Debian. Pharo
>> refused
>> to run – it threw up a bunch of errors.
>>
>>
>>
>> Mariano Martinez Peck wrote
>>> Run Pharo 32 bits and install 32 bit libs...
>>>
>>> On Wed, Nov 21, 2018, 21:07 Richard Kenneth Eng &lt;
>>
>>> horrido.hobbies@
>>
>>> wrote:
>>>
>>> &gt; I'm creating the competition website using Pharo and Teapot. For
>>>> encryption, I'm using Pierce Ng's PasswordCrypt, which requires a
>>>> 32-bit
>>>> C
>>>> library. This means I must run 32-bit Pharo.
>>>>
>>>> And this means I must run 32-bit Pharo under 32-bit Linux. Therein lies
>>>> the rub...
>>>>
>>>> I would like to host the website at DigitalOcean or Linode or OVH. As
>>>> far
>>>> as I can tell, however, these services do not support 32-bit Linux,
>>>> only
>>>> 64-bit.
>>>>
>>>> What can I do?
>>>>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

horrido
In reply to this post by Sean P. DeNigris
I ran 32-bit Pharo under 64-bit Debian and got this error:

[1] 8127
richard@debian:~/pharo32$ could not find display driver vm-display-X11;
either:
  - check that
/home/richard/pharo32/pharo-vm/lib/pharo/5.0-201806281256//vm-display-X11.so
exists, or
  - use the '-plugins <path>' option to tell me where it is, or
  - remove DISPLAY from your environment.
./pharo-ui: line 11:  8131 Aborted                 "$DIR"/"pharo-vm/pharo"
"$@"

----------

I thought you could always run 32-bit software in a 64-bit OS, but I guess
I'm wrong.



Sean P. DeNigris wrote

> horrido wrote
>> it threw up a bunch of errors.
>
> Can you be more specific and did you try Mariano's suggestion about 32-bit
> libs?
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Ben Coman
In reply to this post by horrido


On Thu, 22 Nov 2018 at 20:27, horrido <[hidden email]> wrote:
I tried recompiling the SHA256 library without the '-m32' flag and 64-bit

Would the in-Image SHA256 be sufficient to start with?
Perhaps allow you to move forward while sorting out the main problem.

Another option could be libsodium
I used a different libsodium function here...
Installation should simply be...
    sudo apt-get install libsodium18

---------------------

Pharo seg faulted:

The following might not be related.  Its fairly common to see if limits.d/pharo.conf hasn't been set.
 
pthread_setschedparam failed: Operation not permitted
This VM uses a separate heartbeat thread to update its internal clock
and handle events.  For best operation, this thread should run at a
higher priority, however the VM was unable to change the priority.  The
effect is that heavily loaded systems may experience some latency
issues.  If this occurs, please create the appropriate configuration
file in /etc/security/limits.d/ as shown below:

cat <<END | sudo tee /etc/security/limits.d/pharo.conf
*      hard    rtprio  2
*      soft    rtprio  2
END

and report to the pharo mailing list whether this improves behaviour.


cheers -ben
 
Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Fred Kaiser Borg
In reply to this post by horrido
Those errors are not related to a 32 or 64 bits problem. The issue looks
like you've launched pharo-ui which looks for a physical screen that
isn't there. Are you trying to run pharo-ui in a debian VPS ?

You should run 'pharo' and 'pharo-ui', something like this:

$ pharo myApplication.image

Search on google for 'pharo headless', you should find plenty of example.

HTH,

Fred

On 22/11/2018 13:31, horrido wrote:

> I ran 32-bit Pharo under 64-bit Debian and got this error:
>
> [1] 8127
> richard@debian:~/pharo32$ could not find display driver vm-display-X11;
> either:
>    - check that
> /home/richard/pharo32/pharo-vm/lib/pharo/5.0-201806281256//vm-display-X11.so
> exists, or
>    - use the '-plugins <path>' option to tell me where it is, or
>    - remove DISPLAY from your environment.
> ./pharo-ui: line 11:  8131 Aborted                 "$DIR"/"pharo-vm/pharo"
> "$@"
>
> ----------
>
> I thought you could always run 32-bit software in a 64-bit OS, but I guess
> I'm wrong.
>
>
>
> Sean P. DeNigris wrote
>> horrido wrote
>>> it threw up a bunch of errors.
>> Can you be more specific and did you try Mariano's suggestion about 32-bit
>> libs?
>>
>>
>>
>> -----
>> Cheers,
>> Sean
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

horrido
I'm running 64-bit Debian in a VirtualBox image on my Mac.

When I install 64-bit Pharo, it works fine. When I install 32-bit Pharo, I
get the error message below. What's the difference??? Why can one find the
display driver and the other can't? This makes no sense.

Earlier, people have been telling me to use './pharo-ui Pharo.image &'. Is
this no longer kosher? What am I doing wrong?



Fred Kaiser Borg wrote

> Those errors are not related to a 32 or 64 bits problem. The issue looks
> like you've launched pharo-ui which looks for a physical screen that
> isn't there. Are you trying to run pharo-ui in a debian VPS ?
>
> You should run 'pharo' and 'pharo-ui', something like this:
>
> $ pharo myApplication.image
>
> Search on google for 'pharo headless', you should find plenty of example.
>
> HTH,
>
> Fred
>
> On 22/11/2018 13:31, horrido wrote:
>> I ran 32-bit Pharo under 64-bit Debian and got this error:
>>
>> [1] 8127
>> richard@debian:~/pharo32$ could not find display driver vm-display-X11;
>> either:
>>    - check that
>> /home/richard/pharo32/pharo-vm/lib/pharo/5.0-201806281256//vm-display-X11.so
>> exists, or
>>    - use the '-plugins
> <path>
> ' option to tell me where it is, or
>>    - remove DISPLAY from your environment.
>> ./pharo-ui: line 11:  8131 Aborted                
>> "$DIR"/"pharo-vm/pharo"
>> "$@"
>>
>> ----------
>>
>> I thought you could always run 32-bit software in a 64-bit OS, but I
>> guess
>> I'm wrong.
>>
>>
>>
>> Sean P. DeNigris wrote
>>> horrido wrote
>>>> it threw up a bunch of errors.
>>> Can you be more specific and did you try Mariano's suggestion about
>>> 32-bit
>>> libs?
>>>
>>>
>>>
>>> -----
>>> Cheers,
>>> Sean
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>
>>
>>
>>
>> --
>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Sven Van Caekenberghe-2
Using Linux requires certain skills/knowledge, this has nothing to do with Pharo or Smalltalk.

To run 32-bit binaries on a 64-bit system you need 32-bit libraries.

This might help (although maybe it is not totally up to date for Pharo 7)

https://github.com/svenvc/pharo-server-tools/blob/master/ubuntu-32bit-support-on-64bit.sh

You can check the dependencies of binaries and dynamic libraries with ldd. They have to be resolved correctly.

$ uname -a
Linux sigfox-1 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ file bin/pharo-vm/pharo
bin/pharo-vm/pharo: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=dcf3b690e793d6960e1dbccd36bd0b3938019471, not stripped

$ ldd bin/pharo-vm/pharo
        linux-gate.so.1 =>  (0xf7730000)
        libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf76d2000)
        libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76cd000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf76b0000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf74fa000)
        /lib/ld-linux.so.2 (0x565fe000)

pharo and pharo-ui are just scripts

I would also strongly recommend not using native (FFI) libraries (at first).

You must also understand the difference between a UI based and headless system.

> On 22 Nov 2018, at 16:21, horrido <[hidden email]> wrote:
>
> I'm running 64-bit Debian in a VirtualBox image on my Mac.
>
> When I install 64-bit Pharo, it works fine. When I install 32-bit Pharo, I
> get the error message below. What's the difference??? Why can one find the
> display driver and the other can't? This makes no sense.
>
> Earlier, people have been telling me to use './pharo-ui Pharo.image &'. Is
> this no longer kosher? What am I doing wrong?
>
>
>
> Fred Kaiser Borg wrote
>> Those errors are not related to a 32 or 64 bits problem. The issue looks
>> like you've launched pharo-ui which looks for a physical screen that
>> isn't there. Are you trying to run pharo-ui in a debian VPS ?
>>
>> You should run 'pharo' and 'pharo-ui', something like this:
>>
>> $ pharo myApplication.image
>>
>> Search on google for 'pharo headless', you should find plenty of example.
>>
>> HTH,
>>
>> Fred
>>
>> On 22/11/2018 13:31, horrido wrote:
>>> I ran 32-bit Pharo under 64-bit Debian and got this error:
>>>
>>> [1] 8127
>>> richard@debian:~/pharo32$ could not find display driver vm-display-X11;
>>> either:
>>>   - check that
>>> /home/richard/pharo32/pharo-vm/lib/pharo/5.0-201806281256//vm-display-X11.so
>>> exists, or
>>>   - use the '-plugins
>> <path>
>> ' option to tell me where it is, or
>>>   - remove DISPLAY from your environment.
>>> ./pharo-ui: line 11:  8131 Aborted                
>>> "$DIR"/"pharo-vm/pharo"
>>> "$@"
>>>
>>> ----------
>>>
>>> I thought you could always run 32-bit software in a 64-bit OS, but I
>>> guess
>>> I'm wrong.
>>>
>>>
>>>
>>> Sean P. DeNigris wrote
>>>> horrido wrote
>>>>> it threw up a bunch of errors.
>>>> Can you be more specific and did you try Mariano's suggestion about
>>>> 32-bit
>>>> libs?
>>>>
>>>>
>>>>
>>>> -----
>>>> Cheers,
>>>> Sean
>>>> --
>>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>
>
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>


Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Ben Coman
In reply to this post by horrido


On Thu, 22 Nov 2018 at 23:22, horrido <[hidden email]> wrote:
I'm running 64-bit Debian in a VirtualBox image on my Mac.

When I install 64-bit Pharo, it works fine. When I install 32-bit Pharo, I
get the error message below. What's the difference??? Why can one find the
display driver and the other can't? This makes no sense.

Apart from the much larger images possible, a big driver to produce 64-bit Pharo
is that Linux installations were becoming predominantly 64-bit 
and by default don't pre-install all the 32 bit libraries.

When Pharo was *only* 32-bit, there were instructions on which 32-libs were required. 
I'm not sure were they are now.  (Maybe its worth keeping them around for such cases, although it seems a backward step.)
You might find something at forum.world.st.  Ah, I see Sven has some good info.
 

Earlier, people have been telling me to use './pharo-ui Pharo.image &'. Is
this no longer kosher? What am I doing wrong?

It depends on whether you download the standalone or using zero-conf.
This inconsistency has bitten me a few times, but I was familiar enough to quickly determine what was going.
 Consistency would be good, but we'd need to break the long standing pattern of one or the other.

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

horrido
Okay, I've resolved everything. First, the reason why I'm getting the
'pthread_setschedparam failed' error when I run Pharo under Debian is
because it must be run as 'root'! Don't ask me why, but that's the reason
why Pharo can't set thread priorities. (This wasn't an issue under Ubuntu
Server – go figure.)

Second, I am now using Pharo's own SHA256 class. It's probably not as secure
(because it doesn't use a salt value) and not as quick to execute (not being
C code), but for my purpose, it doesn't really matter.

So I can use DigitalOcean or OVH to run my web server in a VPS.



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Hans-Martin
In reply to this post by horrido
It can't find the display drivers since the appropriate 32 bit libraries
are missing. Use the 'ldd' command on the VM binary and on the shared
libraries in its directory to find out which ones you're missing.

Cheers,
Hans-Martin

Am 22. November 2018 4:22:19 nachm. schrieb horrido
<[hidden email]>:

> I'm running 64-bit Debian in a VirtualBox image on my Mac.
>
> When I install 64-bit Pharo, it works fine. When I install 32-bit Pharo, I
> get the error message below. What's the difference??? Why can one find the
> display driver and the other can't? This makes no sense.
>
> Earlier, people have been telling me to use './pharo-ui Pharo.image &'. Is
> this no longer kosher? What am I doing wrong?
>
>
>
> Fred Kaiser Borg wrote
>> Those errors are not related to a 32 or 64 bits problem. The issue looks
>> like you've launched pharo-ui which looks for a physical screen that
>> isn't there. Are you trying to run pharo-ui in a debian VPS ?
>>
>> You should run 'pharo' and 'pharo-ui', something like this:
>>
>> $ pharo myApplication.image
>>
>> Search on google for 'pharo headless', you should find plenty of example.
>>
>> HTH,
>>
>> Fred
>>
>> On 22/11/2018 13:31, horrido wrote:
>>> I ran 32-bit Pharo under 64-bit Debian and got this error:
>>>
>>> [1] 8127
>>> richard@debian:~/pharo32$ could not find display driver vm-display-X11;
>>> either:
>>>    - check that
>>> /home/richard/pharo32/pharo-vm/lib/pharo/5.0-201806281256//vm-display-X11.so
>>> exists, or
>>>    - use the '-plugins
>> <path>
>> ' option to tell me where it is, or
>>>    - remove DISPLAY from your environment.
>>> ./pharo-ui: line 11:  8131 Aborted
>>> "$DIR"/"pharo-vm/pharo"
>>> "$@"
>>>
>>> ----------
>>>
>>> I thought you could always run 32-bit software in a 64-bit OS, but I
>>> guess
>>> I'm wrong.
>>>
>>>
>>>
>>> Sean P. DeNigris wrote
>>>> horrido wrote
>>>>> it threw up a bunch of errors.
>>>> Can you be more specific and did you try Mariano's suggestion about
>>>> 32-bit
>>>> libs?
>>>>
>>>>
>>>>
>>>> -----
>>>> Cheers,
>>>> Sean
>>>> --
>>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
>>>
>
>
>
>
>
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html




Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Pharo Smalltalk Users mailing list
In reply to this post by horrido


On Fri, 23 Nov 2018 at 04:02, horrido <[hidden email]> wrote:
Okay, I've resolved everything. First, the reason why I'm getting the
'pthread_setschedparam failed' error when I run Pharo under Debian is
because it must be run as 'root'! Don't ask me why, but that's the reason
why Pharo can't set thread priorities. (This wasn't an issue under Ubuntu
Server – go figure.)

Second, I am now using Pharo's own SHA256 class. It's probably not as secure
(because it doesn't use a salt value) and not as quick to execute (not being
C code), but for my purpose, it doesn't really matter.

So I can use DigitalOcean or OVH to run my web server in a VPS.

Good to hear.  But you shouldn't need to run Pharo as root,
just be root to create this config file....
cat <<END | sudo tee /etc/security/limits.d/pharo.conf
*      hard    rtprio  2
*      soft    rtprio  2
END  

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Hans-Martin
In reply to this post by horrido
By the way, after looking at password hashing algorithms and what the experts
say about them, I've decided to implement an interface to the Argon2 library
(see https://password-hashing.net/argon2-specs.pdf for a whitepaper). The
algorithm is designed to be far more resistant against cracking than md5 or
sha-based algorithms and even bcrypt.

The interface is designed to be very easy to use. In the simplest case
(without tuning the algorithm's parameters) password hashing is performed
like this:
    hashedPassword := Argon2 new randomizeSalt: 16; hashPassword:
newPassword.
verifying that a user has given the correct password:
    ok := Argon2 new verifyPassword: enteredPassword hash: hashedPassword.

Find the code at https://github.com/hamamo/pharo-argon2. Currently it only
has library names for 32-bit and 64-bit Linux - if someone adds MacOSX and
Windows support I would merge that.
Sorry I don't yet know how to use Metacello or other mechanisms to load it
into an image with a few lines of code.

Cheers,
Hans-Martin



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

horrido
In reply to this post by Pharo Smalltalk Users mailing list
This works! Everything is copacetic.



On Fri, 23 Nov 2018 at 04:02, horrido &lt;horrido.hobbies@&gt; wrote:

> Okay, I've resolved everything. First, the reason why I'm getting the
> 'pthread_setschedparam failed' error when I run Pharo under Debian is
> because it must be run as 'root'! Don't ask me why, but that's the reason
> why Pharo can't set thread priorities. (This wasn't an issue under Ubuntu
> Server – go figure.)
>
> Second, I am now using Pharo's own SHA256 class. It's probably not as
> secure
> (because it doesn't use a salt value) and not as quick to execute (not
> being
> C code), but for my purpose, it doesn't really matter.
>
> So I can use DigitalOcean or OVH to run my web server in a VPS.
>

Good to hear.  But you shouldn't need to run Pharo as root,
just be root to create this config file....
cat <<END | sudo tee /etc/security/limits.d/pharo.conf
*      hard    rtprio  2
*      soft    rtprio  2
END

cheers -ben
&lt;/quote>




--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply | Threaded
Open this post in threaded view
|

Re: VPS difficulties

Pierce Ng-3
In reply to this post by horrido
On Wed, Nov 21, 2018 at 07:06:08PM -0500, Richard Kenneth Eng wrote:
> I'm creating the competition website using Pharo and Teapot. For
> encryption, I'm using Pierce Ng's PasswordCrypt, which requires a 32-bit C
> library. This means I must run 32-bit Pharo.

PasswordCrypt can be built as a 64-bit library.

(Was away on vacation. Just saw this.)

Pierce

12