Link to home
Start Free TrialLog in
Avatar of johnsonrobbins
johnsonrobbins

asked on

CentOS issue opening port 8080

Can someone please help me understand why I am unable to get to port 8080 with my CentOS 6/ smartfoxserver configuration. I am not a network guy and currently do not have access to one so any help would be nice. I used to be able to hit this url successfully.

http://162.217.100.226:8080/admin
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

is something using that port?
what happens when you do netstat -at | grep 8080 (as root)?
Avatar of johnsonrobbins
johnsonrobbins

ASKER

again I am not a server guy, once I log into the server from command. If I add the command you mentioned it does nothing. I also tried this site http://www.yougetsignal.com/tools/open-ports/ and it says 8080 is closed at the IP I provided earlier. I have smartfoxserver running on that port and it has always responded in the past. Thanks for your help
it returned no output which means there is nothing using it - which agrees with that site you checked
netstat will show ports that are being used; grep is like a filter so it is looking for a pattern match 8080

the server is probably not running
not familiar with the application and not sure where it would be installed (you can basically extract the files anywhere from what i'm reading)
try this - as root, do find / -name "sfs2x*" -r and see what it returns
I just get an "unknown predicate" message. Is that exactly how it is to be entered? find / -sfs2x* -r
put quotes around the file name pattern as it is above
[root@server1 ~]# find / -name "sfs2x*" -r
find: unknown predicate `-r'
[root@server1 ~]#
sorry...leave out the -r
many commands use -r for recursive but for find it's the opposite; you put options if you don't want recursive
[root@server1 ~]# find / -name "sfs2x*"
/opt/SmartFoxServer_2X/SFS2X/sfs2x-standalone.vmoptions
/opt/SmartFoxServer_2X/SFS2X/lib/Lib/sfs2x-lib.jar
/opt/SmartFoxServer_2X/SFS2X/lib/sfs2x-core.jar
/opt/SmartFoxServer_2X/SFS2X/lib/sfs2x-util.jar
/opt/SmartFoxServer_2X/SFS2X/lib/sfs2x.jar
/opt/SmartFoxServer_2X/SFS2X/lib/cachedir/packages/sfs2x-core.pkc
/opt/SmartFoxServer_2X/SFS2X/lib/cachedir/packages/sfs2x-util.pkc
/opt/SmartFoxServer_2X/SFS2X/lib/cachedir/packages/sfs2x.pkc
/opt/SmartFoxServer_2X/SFS2X/config/templates/sfs2x.windows.txt
/opt/SmartFoxServer_2X/SFS2X/config/templates/sfs2x.unix.txt
/opt/SmartFoxServer_2X/SFS2X/sfs2x.sh
/opt/SmartFoxServer_2X/SFS2X/sfs2x-service
/opt/SmartFoxServer_2X/SFS2X/sfs2x-service.vmoptions
/opt/SmartFoxServer_2X/SFS2X/www/sfs2x-ws.war
/opt/SmartFoxServer_2X/SFS2X/sfs2x.sh.backup
/opt/SmartFoxServer_2X/SFS2X/sfs2x-service.vmoptions.backup
[root@server1 ~]#
ok...now you found the install folder - /opt/SmartFoxServer_2X/SFS2X

now try this:

cd /opt/SmartFoxServer_2X/SFS2X
./sfs2x-service start
Starting sfs2x-service
[root@server1 SFS2X]#
is the site accessible now?
if you do netstat -at | grep 8080 again does it show anything?
[root@server1 SFS2X]# netstat -at | grep 8080
[root@server1 SFS2X]#

nothing... How do I get it running there again?
looks like it didn't actually start

try this:

cd logs
ls -lhrt


is there a file there dated a few min ago?
-rw-r--r-- 1 root root  438 Dec 23 12:25 smartfox.log.2014-12-23-12
-rw-r--r-- 1 root root  219 Dec 24 11:52 smartfox.log
[root@server1 logs]#
ok good

cat smartfox.log

only 219 bytes so it's not much; maybe there is something useful as to what's going on
[root@server1 logs]# cat smartfox.log
24 Dec 2014 | 11:52:34,142 | INFO  | main | smartfoxserver.v2.SmartFoxServer |     | Boot sequence starts...
24 Dec 2014 | 11:52:34,177 | INFO  | Thread-2 | entities.managers.SFSZoneManager |     | BuddyList saveAll...
[root@server1 logs]#
hmm...appears to be running; wonder if it's on a different port
what about just netstat -at in case it's running on a different port
[root@server1 logs]# netstat -at
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp        0      0 *:ftp                       *:*                         LISTEN      
tcp        0      0 *:ssh                       *:*                         LISTEN      
tcp        0     48 server1.johnsonrobbins.:ssh 108-74-196-193.lights:64551 ESTABLISHED
tcp        0      0 *:mysql                     *:*                         LISTEN      
tcp        0      0 *:ssh                       *:*                         LISTEN      
[root@server1 logs]#
has anything changed on this server?
did someone else configure smartfoxserver?
i had a group in the Ukraine looking at this for a while, wonder if they messed with something.. any ideas for fix?
offhand, no
i've been going by documentation as i never worked with this package before
Anyone with Smartfox and server exp, much appreciated?
I would also look in the log file smartfox.log.2014-12-23-12 and I would also look in /var/log/messsages after you try and start the smartfox service.

Do you know if you configured it to listen specifically on the IP address 162.217.100.226?

When you ssh to this server do you ssh to the IP address 162.217.100.226 ?
Please provide the following output:

service iptables status
grep 8080 /etc/services
lsof | grep sfs
cd /opt/SmartFoxServer_2X/SFS2X
sh sfs2x.sh
lsof | grep sfs
tail -50 /var/log/messages

Open in new window

here is the output for the commands that worked

[root@server1 SFS2X]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination        

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination        

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination        

[root@server1 SFS2X]#

[root@server1 SFS2X]# grep 8080 /etc/services
webcache        8080/tcp        http-alt        # WWW caching service
webcache        8080/udp        http-alt        # WWW caching service
[root@server1 SFS2X]#


[root@server1 SFS2X]# sh sfs2x.sh
Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future
16:38:46,461 INFO  [main] v2.SmartFoxServer     - Boot sequence starts...
Exception in thread "main" java.lang.NoClassDefFoundError: com/smartfoxserver/v2/scala/LSManagerProvider
      at com.smartfoxserver.v2.SmartFoxServer.initialize(SmartFoxServer.java:604)
      at com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:258)
      at com.smartfoxserver.v2.Main.main(Main.java:26)
Caused by: java.lang.ClassNotFoundException: com.smartfoxserver.v2.scala.LSManagerProvider
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 3 more
16:38:46,468 INFO  [Thread-0] managers.SFSZoneManager     - BuddyList saveAll...
[root@server1 SFS2X]#

[root@server1 SFS2X]# tail -50 /var/log/messages
Dec 20 05:58:37 server1 auditd[861]: Audit daemon rotating log files
Dec 20 07:34:10 server1 auditd[861]: Audit daemon rotating log files
Dec 20 09:17:15 server1 auditd[861]: Audit daemon rotating log files
Dec 20 10:43:34 server1 auditd[861]: Audit daemon rotating log files
Dec 20 13:07:20 server1 auditd[861]: Audit daemon rotating log files
Dec 20 17:16:13 server1 auditd[861]: Audit daemon rotating log files
Dec 21 04:24:54 server1 auditd[861]: Audit daemon rotating log files
Dec 21 07:47:05 server1 auditd[861]: Audit daemon rotating log files
Dec 21 14:46:58 server1 auditd[861]: Audit daemon rotating log files
Dec 21 23:59:41 server1 auditd[861]: Audit daemon rotating log files
Dec 22 03:33:30 server1 auditd[861]: Audit daemon rotating log files
Dec 22 07:59:46 server1 auditd[861]: Audit daemon rotating log files
Dec 22 11:01:20 server1 auditd[861]: Audit daemon rotating log files
Dec 22 15:28:52 server1 auditd[861]: Audit daemon rotating log files
Dec 22 23:34:18 server1 auditd[861]: Audit daemon rotating log files
Dec 23 00:11:05 server1 vsftpd[13601]: warning: can't get client address: Connection reset by peer
Dec 23 02:37:04 server1 auditd[861]: Audit daemon rotating log files
Dec 23 04:53:18 server1 auditd[861]: Audit daemon rotating log files
Dec 23 06:33:14 server1 auditd[861]: Audit daemon rotating log files
Dec 23 09:19:32 server1 kernel: ip_tables: (C) 2000-2006 Netfilter Core Team
Dec 23 11:40:51 server1 yum[26110]: Installed: apr-1.3.9-5.el6_2.x86_64
Dec 23 11:40:51 server1 yum[26110]: Installed: apr-util-1.3.9-3.el6_0.1.x86_64
Dec 23 11:40:51 server1 yum[26110]: Installed: apr-util-ldap-1.3.9-3.el6_0.1.x86_64
Dec 23 11:40:51 server1 yum[26110]: Installed: mailcap-2.1.31-2.el6.noarch
Dec 23 11:40:52 server1 yum[26110]: Installed: 1:make-3.81-20.el6.x86_64
Dec 23 11:40:53 server1 yum[26110]: Updated: openssl-1.0.1e-30.el6_6.4.x86_64
Dec 23 11:40:53 server1 yum[26110]: Installed: httpd-tools-2.2.15-39.el6.centos.x86_64
Dec 23 11:40:54 server1 yum[26110]: Installed: httpd-2.2.15-39.el6.centos.x86_64
Dec 23 17:39:45 server1 auditd[861]: Audit daemon rotating log files
Dec 23 19:15:04 server1 auditd[861]: Audit daemon rotating log files
Dec 24 00:55:58 server1 auditd[861]: Audit daemon rotating log files
Dec 24 03:48:27 server1 auditd[861]: Audit daemon rotating log files
Dec 24 07:12:37 server1 auditd[861]: Audit daemon rotating log files
Dec 24 09:54:20 server1 auditd[861]: Audit daemon rotating log files
Dec 24 17:06:32 server1 auditd[861]: Audit daemon rotating log files
Dec 24 22:39:06 server1 auditd[861]: Audit daemon rotating log files
Dec 25 01:25:44 server1 auditd[861]: Audit daemon rotating log files
Dec 25 03:17:55 server1 auditd[861]: Audit daemon rotating log files
Dec 25 10:11:38 server1 auditd[861]: Audit daemon rotating log files
Dec 25 12:49:53 server1 auditd[861]: Audit daemon rotating log files
Dec 25 13:27:02 server1 auditd[861]: Audit daemon rotating log files
Dec 25 14:03:16 server1 auditd[861]: Audit daemon rotating log files
Dec 25 14:36:20 server1 auditd[861]: Audit daemon rotating log files
Dec 25 15:06:16 server1 auditd[861]: Audit daemon rotating log files
Dec 25 17:10:35 server1 auditd[861]: Audit daemon rotating log files
Dec 26 02:59:52 server1 auditd[861]: Audit daemon rotating log files
Dec 26 05:43:55 server1 auditd[861]: Audit daemon rotating log files
Dec 26 07:35:29 server1 auditd[861]: Audit daemon rotating log files
Dec 26 11:04:59 server1 auditd[861]: Audit daemon rotating log files
Dec 26 13:49:08 server1 auditd[861]: Audit daemon rotating log files
[root@server1 SFS2X]#
Hello,

It seems that your problem is the SELinux. Please post the output of the command:

sestatus

Open in new window


I guess it would be enabled. Then grep the Audit errors:

grep AVC /var/log/audit/audit.log | audit2why 

Open in new window



Cheers,
K.
sh sfx2*
means you do not have classpath set properly and java application does not initialize.
install mc (midnight commander)
check .jar files around if any has missing classes inside, look in the script and add that jar file to your classpath in the script.
[root@server1 SFS2X]# sestatus
SELinux status:                 disabled
[root@server1 SFS2X]# grep AVC /var/log/audit/audit.log | audit2why
-bash: audit2why: command not found
[root@server1 SFS2X]#
selinux = disabled
so nothing interfering
iptables = disabled
no news here

It is plain and simple - the application itself does not start. do more RTFM, or try to find classes with mc, or unzip or whatever.
Not sure why, it WAS running just fine. I dont know why it stopped responding.. I dont seem to be able to access anything at 8080 port almost like nothing is there..

[root@server1 SFS2X]# netstat -nl | grep -- ^tcp
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      
tcp        0      0 :::3306                     :::*                        LISTEN      
tcp        0      0 :::22                       :::*                        LISTEN
Ok if selinux is disabled this cannot be the problem..

Can you post your start script here ?
sfs2x.sh

Open in new window



While checking on the Install instructions I've come across with this can you check it out:

http://www.smartfoxserver.com/docs/1x/index.htm?http://www.smartfoxserver.com/docs/1x/docPages/intro/installation.htm

Cheers,
K.
CD SFS2X
find . -name \*.jar | xargs -n 1 unzip -l | grep com.smartfoxserver.v2.scala.LSManagerProvider

java.lang.NoClassDefFoundError: com/smartfoxserver/v2/scala/LSManagerProvider
      at com.smartfoxserver.v2.SmartFoxServer.initialize(SmartFoxServer.java:604)
      at com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:258)
      at com.smartfoxserver.v2.Main.main(Main.java:26)
I get this when I start or restart service.. like something or nothing happened

[root@server1 SFS2X]# ./sfs2x-service start
Starting sfs2x-service
[root@server1 SFS2X]#

[root@server1 SFS2X]# ./sfs2x-service restart
Shutting down sfs2x-service
The daemon is not running.
Restarting sfs2x-service
[root@server1 SFS2X]#
[root@server1 SFS2X]# CD SFS2X
-bash: CD: command not found
[root@server1 SFS2X]#
[root@server1 SFS2X]# find . -name \*.jar | xargs -n 1 unzip -l | grep com.smartfoxserver.v2.scala.LSManagerProvider
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
note:  ./lib/Lib/sfs2x-lib.jar may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of ./lib/Lib/sfs2x-lib.jar or
        ./lib/Lib/sfs2x-lib.jar.zip, and cannot find ./lib/Lib/sfs2x-lib.jar.ZIP, period.
[root@server1 SFS2X]#
All unix commnds are in lowercase so you need to type "cd SFS2X" not "CD SFS2X".

I'll also suggest you to upgrade  to the latest patch version 2.9.2 available from the site.
as if nothing was there

[root@server1 SFS2X]# cd SFS2X
-bash: cd: SFS2X: No such file or directory
[root@server1 SFS2X]#
You are already in the SFS2X directory. So you can omit this step.
Will you please install the 2.9.2 update ?
You have either bad disk (check with smartmontools)
Or you had unexpected powerdown and did not undergo fsck after

Either way a JAR file is corrupt to no good.

1) check your disk or raid with smartctl
2) run fsck -f against partition where sfs2x-lib.jar resides
3) Once hardware and system is confirmed fixed you can reinstall missing jar from the vendor.
Installed
Is disk and filesystem OK?
[root@server1 SFS2X]# ind . -name \*.jar | xargs -n 1 unzip -l | grep com.smartfoxserver.v2.scala.LSManagerProvider
-bash: ind: command not found
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
  Default action is to extract files in list, except those in xlist, to exdir;
  file[.zip] may be a wildcard.  -Z => ZipInfo mode ("unzip -Z" for usage).

  -p  extract files to pipe, no messages     -l  list files (short format)
  -f  freshen existing files, create none    -t  test compressed archive data
  -u  update files, create if necessary      -z  display archive comment only
  -v  list verbosely/show version info       -T  timestamp archive to latest
  -x  exclude files that follow (in xlist)   -d  extract files into exdir
modifiers:
  -n  never overwrite existing files         -q  quiet mode (-qq => quieter)
  -o  overwrite files WITHOUT prompting      -a  auto-convert any text files
  -j  junk paths (do not make directories)   -aa treat ALL files as text
  -U  use escapes for all non-ASCII Unicode  -UU ignore any Unicode fields
  -C  match filenames case-insensitively     -L  make (some) names lowercase
  -X  restore UID/GID info                   -V  retain VMS version numbers
  -K  keep setuid/setgid/tacky permissions   -M  pipe through "more" pager
See "unzip -hh" or unzip.txt for more help.  Examples:
  unzip data1 -x joe   => extract all files except joe from zipfile data1.zip
  unzip -p foo | more  => send contents of foo.zip via pipe into program more
  unzip -fo foo ReadMe => quietly replace existing ReadMe if archive file newer
[root@server1 SFS2X]# find . -name \*.jar | xargs -n 1 unzip -l | grep com.smartfoxserver.v2.scala.LSManagerProvider
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
note:  ./lib/Lib/sfs2x-lib.jar may be a plain executable, not an archive
unzip:  cannot find zipfile directory in one of ./lib/Lib/sfs2x-lib.jar or
        ./lib/Lib/sfs2x-lib.jar.zip, and cannot find ./lib/Lib/sfs2x-lib.jar.ZIP, period.
[root@server1 SFS2X]#
" Is disk and filesystem OK? " 

1) check your disk or raid with smartctl
2) run fsck -f against partition where sfs2x-lib.jar resides
3) Once hardware and system is confirmed fixed you can reinstall missing jar from the vendor.

definitely outside of my common understanding.
Hi,

I've installed it on my test CentOS 6.5 ssytem. The install was OK. My steps were:
 
- you need to be root to complete setup so make sure you either logged on as root or be root suing "su -"
- Issued "uname -a" (Now I know that I have an x86_64 system)
- Downloaded the tar file for the 64 bit systems.
- I've cd'd to the filesystem root: "cd /"
- Started unzip: "tar xvzf /root/SFS2X_unix_2_9_0_64.tar.gz"
- Then changed to server install dir: "cd /SmartFoxServer_2X/SFS2X"
- issued ./sfs2x-service start
- issued netstat -anpt | grep :8080
tcp        0      0 :::8080                     :::*                        LISTEN      3265/java

So host is running. It seems that your install file was not complete or you did ot have root access while installing it.
ASKER CERTIFIED SOLUTION
Avatar of Kerem ERSOY
Kerem ERSOY

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks.. I will uninstall and reinstall and let you know how it goes..
Uninstall?
Just install over same data files... And do not run java as ROOT ?
Gheist/Kerem, if I install this over the same data will it replace my existing config file? This is the concern as the config file already has  room data, etc that I do not want to replace. Or do I need to somehow extract this config file and replace it later?
How could we know where configuration is :S
Did hardware come out clear?
Sorry, not following. Please remember your like a college professor talking to a 4 year old here in the networking world. :(
First you need to diagnose hardware:
install smartmontools (on by default)
update-smart-drivedb (download new drive health database)
and run smartctl -a /dev/sda (or where your disk is)

No need to do anything after unless fixed - seek new disk, update firmwares -etc

then force fsck on the filesystem that holds /opt (boot in single mode and fsck -f)

(again - ask fro more, but no point proceeding unless filesystem is healthy)

Once we have hardware in working condition we can proceed - rename program directory and do a new clean install
If something is missing / copy files from old installation
If it goes bad - move new installation out of the way and return to old one.
It seems command line would be a tough option since i am not a professional in Linux servers so rather remote connection looks much better option to control the server.I have a Centos6 server with internap, however we have been using terminal
or console with command prompts which I not very expert with .I would like to have remote desktop installed on the server so I can use the GUI interface of the system & do what I need to .When contacted the server guys from internap they said we need X server for the same , on other hand they also mention it would not be required because server comes with remote ssh connection.Not sure about what this is & how I can use remote ssh to connect to server remotely from windows computer ?
Sorry, but this is before any GUI can be started. Do you often complain that system bios or windows chkdsk run in text mode?

You do not need X server, more likley you need NX server or X11 forwarding that work over SSH discretely.
Can you suggest a link or direct me to process for how to install NX server or X11 that work over SSH ?
That will not help you to check file system

All missing is xauth package on system and X11 tickmark in putty and X server like Xming on your windows machine
very professional and knowledgeable