Can i use any port other than 8000 or 8100?

 
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues
View previous topic :: View next topic  
Author Message
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Sun May 23, 2004 4:06 pm    Post subject: Can i use any port other than 8000 or 8100? Reply with quote

Abyssws (Linux version) seems to run fine on ports 8000 or 8100. But how come it has to use those big ports? Can i set it to like port 81? I tried it with port 81, but i get a error saying that the port is already in use:

Code:

$ ./abyssws
Abyss Web Server X1 (v 1.2.2.2)
Copyright (C) Aprelium Technologies - 2001-2004

Cannot start the web server (Listening problem): The web port is already used by another application. Use the console to configure a correct web port.
The Web server is not running.
Console local URL: http://127.0.0.1:9999/


However, i can run apache fine on port 81. Yes, 81 is open in my router (smc barricade). And apache was completely shutdown before i tried abyssws.

I want to use port 81 since i already have no-ip.com configured to work with it and all.

Thx.
Back to top View user's profile Send private message Send e-mail
nquin321
-


Joined: 29 Jan 2004
Posts: 296
Location: Right Behind You

PostPosted: Sun May 23, 2004 5:28 pm    Post subject: Reply with quote

Set apache on a different port and try it again.
_________________
How many forum members does it takes to change a light bulb?
Back to top View user's profile Send private message
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Sun May 23, 2004 6:23 pm    Post subject: Reply with quote

netstat -a -n to list ports in use and double check, or nmap localhost.

To use a port under 1024 in Linux you must be logged in as root - if you haven't properly configured how Abyss will run or are running it under a normal user account, you won't be able to bind to anything under 1024.
Back to top View user's profile Send private message
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Sun May 23, 2004 8:12 pm    Post subject: Reply with quote

ok, yes, i was logged in as non-root. So i redid everything from sratch and dowloaded the file to the root's home folder. There i untarred it and ran it. But there is a permissions problem now (the following is when i access http://127.0.0.1:9999/ as a non-root through a browser and try to set up a admin account) :

Code:

Cannot save the configuartion file.   
To fix this problem:

Check if the disk is not full.
Check if you have creation and writing permissions for the configuration file


What are the permissions supposed to be? I have the following right now:

Code:

debian:~/abyssws# ls -l
total 144
-rw-------    1 root     root         2905 May 23 15:08 abyss.conf
-rwxrwxr-x    1 1001     cdrecording   115992 Jan 14 06:29 abyssws
drwxrwxr-x    2 1001     cdrecording        6 Jan 14 06:29 cgi-bin
drwxrwxr-x    2 1001     cdrecording     4096 Jan 14 06:29 chl
drwxrwxr-x    2 1001     cdrecording     4096 Jan 14 06:29 doc
drwxrwxr-x    2 1001     cdrecording       42 Jan 14 06:29 htdocs
-rw-rw-r--    1 1001     cdrecording      784 Jan 14 06:29 install.txt
-rw-rw-r--    1 1001     cdrecording     7987 Jan 14 06:29 license.txt
drwxrwxr-x    2 1001     cdrecording       55 May 23 15:08 log
-rw-rw-r--    1 1001     cdrecording       19 Jan 14 06:29 regkey.ser


Thx.
Back to top View user's profile Send private message Send e-mail
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Sun May 23, 2004 11:06 pm    Post subject: Reply with quote

Your Abyss.conf is owned by root with rw permissions only for root. All the other files are owned by 'cdrecording' and have full rwx permissions. Are you sure Abyss is running as root?

What does the output of ps aux | grep -i "abyss" show ?
Back to top View user's profile Send private message
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Sun May 23, 2004 11:21 pm    Post subject: Reply with quote

permissions are such a pain in linux...

sorry, just had to vent.

Here is what it looks like:

Code:

#  ps aux | grep -i "abyss"
root      4457  0.0  0.0  1696  528 pts/5    S+   18:20   0:00 ./abyssws
root      4458  0.0  0.1 10080  808 pts/5    S+   18:20   0:00 ./abyssws --slave --interactive
Back to top View user's profile Send private message Send e-mail
Anonymoose
-


Joined: 09 Sep 2003
Posts: 2192

PostPosted: Sun May 23, 2004 11:30 pm    Post subject: Reply with quote

Wierd. Abyss running as root and the conf file owned as root, I can't see a problem. Unless anyone else comes up with something beforehand, I'll give it a try on my slack box at work tomorrow and see if what happens...

Edit: Does this help? See Apreliums post further down the thread...

http://www.aprelium.com/forum/viewtopic.php?t=2443
Back to top View user's profile Send private message
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Mon May 24, 2004 3:40 am    Post subject: Reply with quote

that helped a little and i can run it as a daemon, but whenver i try to make any changes in the web console, it just spits out the same permissions error as above. :(

So right now i have abyss in my home user directory with these permissions (since the link you gave said specifically not to run it as root):

Code:

~/abyssws$ ls -l
total 144
-rw-------    1 root     root         2905 May 23 22:32 abyss.conf
-rwxr-xr-x    1 me  me    115992 Jan 14 06:29 abyssws
drwxr-xr-x    2 me  me         6 Jan 14 06:29 cgi-bin
drwxr-xr-x    2 me  me      4096 Jan 14 06:29 chl
drwxr-xr-x    2 me  me      4096 Jan 14 06:29 doc
drwxr-xr-x    2 me  me        42 Jan 14 06:29 htdocs
-rw-r--r--    1 me  me       784 Jan 14 06:29 install.txt
-rw-r--r--    1 me  me      7987 Jan 14 06:29 license.txt
drwxr-xr-x    2 me  me        55 May 23 22:32 log
-rw-r--r--    1 me  me        19 Jan 14 06:29 regkey.ser
Back to top View user's profile Send private message Send e-mail
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed May 26, 2004 3:14 pm    Post subject: Re: Can i use any port other than 8000 or 8100? Reply with quote

sk545,

Please have a look on Abyss Web Server user's manual. All these issues are explained and solved there.

* You cannot use port < 1024 if you are a normal user on UNIX systems. Only root can use these ports.
* For security reasons, Abyss doesn't run as root. It will change its current user to the System User (by default nobody). This change is done after setting the ports.
* The configuration file cannot be saved because the "System User" has no right to write to it.

For security reasons, when you run Abyss as root, it immediately switches to
a less privileged user (by default it switches to the user defined in
Console > Server Configuration > Advanced > Server Parameters > System
User - It is nobody by default).
If you update the configuration, Abyss needs to write to abyss.conf. But as
we can see in the second screenshot, abyss.conf is owned by root, and the
less privileged user has no permission to write to this file. Thus the
error.

There are many ways to solve the issue (and the ports issue), here is the best one (in our opinion of course):

* Login as root
* cd to your abyssws directory.
* We assume that xxx is the System User you have configured (by default, it
is nobody)
* Execute:

Code:
chown -R xxx log abyss.conf regkey.ser


The above command line will set the ownership of the files abyss.conf and
regkey.ser and the directory log to the System User. This is needed since
this user account needs to write to these files when the server is running.

* Execute:

Code:
chown root abyssws


then:

Code:
chmod +Xs abyssws


This will change the owner of the executable file abyssws to root and will set its setuid bit. The setuid bit is useful since any user will be able to run abyssws as if it was root (and can use ports below 1024).

* That's it.

Now, start abyssws as you used to do (using a non-root user account). If you
are going to start it from your root account, the best is to use:

Code:
su xxx -c ./abyssws


but

Code:
./abyssws


will have a very similar effect.

su will change the current user to daemon and start abyssws. You can include the above command in your startup sequence (in one of the etc/rc.d scripts).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Wed May 26, 2004 6:58 pm    Post subject: Reply with quote

thx, this helps a lot.

I can run it fine now with the command 'su xxx -c ./abyssws', but if i run it with the command './abyssws', i am only able to make changes directly in the abyss.conf file. I can't go to the web console and do it since it ends up giving a error if i either want to change port or the document directory:

Code:

Cannot start the web server (Listening problem): The web port is already used by another application. Use the console to configure a correct web port.


But, if i change the port in the abyss.conf file directly, i get no such error and the server works just fine. Strange...The command 'su xxx -c ./abyssws' doesn't have this issue and works perfect. But how am i supposed to put this command in /etc/rc.local? I mean it will require a password everytime, no?

Here are my permissions after following your directions just for the sake of it:

Code:

 ls -l
total 144
-rw-------    1 me  me      2977 May 26 13:42 abyss.conf
-rwsr-sr-x    1 root     me    115992 Jan 14 06:29 abyssws
drwxr-xr-x    2 me  me         6 Jan 14 06:29 cgi-bin
drwxr-xr-x    2 me  me      4096 Jan 14 06:29 chl
drwxr-xr-x    2 me  me      4096 Jan 14 06:29 doc
drwxr-xr-x    2 me  me        42 Jan 14 06:29 htdocs
-rw-r--r--    1 me  me       784 Jan 14 06:29 install.txt
-rw-r--r--    1 me  me      7987 Jan 14 06:29 license.txt
drwxr-xr-x    2 me  me        55 May 26 13:21 log
-rw-r--r--    1 me  me        19 Jan 14 06:29 regkey.ser
Back to top View user's profile Send private message Send e-mail
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri May 28, 2004 1:02 pm    Post subject: Reply with quote

sk545,

/rc.d scripts are run by root so you don't need to use the su command. ./abyssws is sufficent.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Sat May 29, 2004 3:10 pm    Post subject: Reply with quote

I am still having trouble with it after starting it as a daemon.

Here is what i did:

1) untarred abyss.tar file as non-root
2) ran ./abyssws as non-root to generate a abyss.conf file.
3) su, and did all of the above steps you mentioned.
4) edited /etc/rc.local and added this to it:

echo "Starting Abyss Web Server..."
pushd . > /dev/null
cd /home/khurram/abyssws
./abyssws -d
popd > /dev/null

5) Rebooted computer and the web server started fine.
6) However, going to the console, and trying to change any settings yields the same error message about not being able to save the configuration file.

The permissions are like this as of now:

Code:

ls -l
total 144
-rw-------    1 me  me      2977 May 26 13:42 abyss.conf
-rwsr-sr-x    1 root     me    115992 Jan 14 06:29 abyssws
drwxr-xr-x    2 me  me         6 Jan 14 06:29 cgi-bin
drwxr-xr-x    2 me  me      4096 Jan 14 06:29 chl
drwxr-xr-x    2 me  me      4096 Jan 14 06:29 doc
drwxr-xr-x    2 me  me        42 Jan 14 06:29 htdocs
-rw-r--r--    1 me  me       784 Jan 14 06:29 install.txt
-rw-r--r--    1 me  me      7987 Jan 14 06:29 license.txt
drwxr-xr-x    2 me  me        55 May 26 13:21 log
-rw-r--r--    1 me  me        19 Jan 14 06:29 regkey.ser


I am using Debian, would that matter? Can't really think of anything else that might be the problem...
Back to top View user's profile Send private message Send e-mail
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun May 30, 2004 2:52 pm    Post subject: Reply with quote

sk545,

Run Abyss using the non-root useraccount "me". Log to the console, go to Server Config. > Advanced > Server Parameters and change the System User to me (the user who owns the abyss.conf file.)

Now, everything should go fine.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Sun May 30, 2004 7:08 pm    Post subject: Reply with quote

thx. I changed the abyss.conf file's SysUser to me manually. Then i rebooted and i was able to change the document path and all. But, when i tried to change its default port 8000, it gave me a error:

Code:
The port is already used by another application or the access to it is denied


The port is open in my firewall, and i have no services running on port 81. What i did was again manually edited abyss.conf and put in port 81 in there and rebooted. Now the error message went away for some reason.

Another issue is that when i stop the server from the console, it stops. But when i hit 'run' it refreshes without a error but still says its stopped. ps -aux shows that the server is running, but console says its stopped. Maybe a bug?

Anyhow, thx for all the help. I can at least run it now.
Back to top View user's profile Send private message Send e-mail
iNaNimAtE
-


Joined: 05 Nov 2003
Posts: 2381
Location: Everywhere you're not.

PostPosted: Tue Jun 01, 2004 3:35 am    Post subject: Reply with quote

sk545 wrote:
thx. I changed the abyss.conf file's SysUser to me manually. Then i rebooted and i was able to change the document path and all. But, when i tried to change its default port 8000, it gave me a error:

Code:
The port is already used by another application or the access to it is denied

Anonymoose wrote:
To use a port under 1024 in Linux you must be logged in as root - if you haven't properly configured how Abyss will run or are running it under a normal user account, you won't be able to bind to anything under 1024.

_________________
Bienvenidos!
Back to top View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jun 02, 2004 11:13 am    Post subject: Reply with quote

sk545,

This behavior seems to come from a small file permissions error (yet another.)
Please send tp support@aprelium.com your abyss.conf file, your rc.d script (where Abyss is launched) and the output of ls -al of your Abyss Web Server directory.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Wed Jun 02, 2004 5:29 pm    Post subject: Reply with quote

hrm. I don't have a rc.d script, all i have is a /etc/rc.local in which i put in this:


echo "Starting Abyss Web Server..."
pushd . > /dev/null
cd /home/khurram/abyssws
./abyssws -d
popd > /dev/null

Should i email the rc.local?
Back to top View user's profile Send private message Send e-mail
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Jun 04, 2004 10:55 am    Post subject: Reply with quote

sk545,

Yes, please. Do not forget to send us your abyss.conf file as well as the output of ls -al of your Abyss Web Server directory.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
sk545
-


Joined: 23 May 2004
Posts: 9

PostPosted: Fri Jun 04, 2004 5:56 pm    Post subject: Reply with quote

alright, i sent it.

Let me know if you all receive the files.

Thx.
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Networking Issues All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group