fop2 server does not seem to start [solved]
-
Hi all,
I tried toinstall fop2 on a gentoo box with asterisk 11.2.2 and freepbx 2.11.0rc1 on it, following the tarball install instructions, so I wget the source, untarred it and did a make install, which copied the files to its locations.
Now Webpage is there and I get to the loginprompt, but I cannot seem to start the fop2 server itself, and thus not login, nor does the box listen on 4445 port. When in the console I go to location /usr/local/fop2 and execute ./fop2_server --test it just does nothing, no error message, it just gives me a new prompt.
Can you help me with this please?
-
Is /tmp mounted with "noexec"? Read the FAQ "When I try to run fop2_server it does not do anything at all."
www.fop2.com/documentation-faq.php
Best regards,
-
Thanks for pointing that out. Now I tried with:
export PAR_GLOBAL_TMPDIR=/usr/local/fop2/tmp/and here's what I get now starting fop2_server:
Can't load '/usr/local/fop2/tmp/par-root/cache-4b3df8b00ea32d78fbcfc645d56579285258145c/aaf44dba.so' for module Filter::Crypto::Decrypt: libcrypto.so.6: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/DynaLoader.pm line 230.
at /usr/lib/perl5/site_perl/5.8.8/PAR/Heavy.pm line 128
BEGIN failed--compilation aborted at /usr/local/fop2/tmp/par-root/cache-4b3df8b00ea32d78fbcfc645d56579285258145c/inc/lib/Filter/Crypto/Decrypt.pm line 37.
Compilation failed in require at script/fop2_server.pl line 1.
BEGIN failed--compilation aborted at script/fop2_server.pl line 1.I checked and DynaLoader.pm is located here on my system:
/usr/lib/perl5/5.12.4/i686-linux/DynaLoader.pmI have used the centos5 i386 tarball for 32-bit systems, should I have used the one for debian 32-bit systems?
I have installed dev-lang/perl-5.12.4-r1, which is the actual stable version in gentoo. Is there a way/fix to use fop2 with this perl version?
-
You have to create a symlink for libcrypto, depending on your installed version. Or you might want to try with fop 2.27 that in most cases will work without a need for symlinking libcrypto libraries.
http://download.fop2.com/fop2-2.27-debian-i386.tgz
http://download.fop2.com/fop2-2.27-debian-x86_64.tgzThe last question in the FAQ tells you how to create a symlink for centos 6, but gentoo will most probably have a different library or location, so you will have to tweak the command to match your environment.
Best regards
-
Hi Nicolás,
I am making some progress here

I now can start the fop_server successfully - having installed the 2.27 version - and as you said, without needing to create a symlink for libcrypto libraries. netstat -nl now shows listening on port 4445

Unfortunatelly I still cannot login in successfully. Not with my extension, which has enabled its voicemail, and not with a user, defined in fop2.cfg. (I tried also with uncommented button.cfg, and also with deactivated addons on my browser, even stopped iptables service to be sure, it is not a problem with the firewall)
So I decided to execute the shell script autoconfig-users-freepbx.sh manually to see what happens, and got this error:
sh autoconfig-users-freepbx.sh
autoconfig-users-freepbx.sh: line 32: syntax error near unexpected token<' autoconfig-users-freepbx.sh: line 32:done < <( mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "SHOW tables FROM `$DBNAME` LIKE 'fop2users'" )'repetition of my install steps:
- wget file to /usr/src and untarred it
- cd to created fop2 directory and executed make install
- modified fop2.cfg and set manager_user and manager_secret
- created /usr/local/fop2/tmp
- executed export PAR_GLOBAL_TMPDIR=/usr/local/fop2/tmp/
- cd /usr/local/fop2 and executed ./fop_server --test
-> Flash Operator Panel 2 - License file fop2.lic not found.
Running in Demo Mode
Connection to manager OK!So I started server as daemon:
- ./fop2_server -d
Then I tried to login with an existing extension, which has a voicemail account configured, and this did not work, then tried with user 622 and pass 1234 which I uncommented in fop2.cfg but this did not let me login eather.
I get attemting to connect to server 1....2.....3.....4 and so on.
Thanks in advance for your help.

last thing, I tried is:
fop_server -X 3 and there it seems to be able to connect db as it shows:127.0.0.1 -> AuthType: md5
127.0.0.1 -> Action: Challenge
127.0.0.1 -> ActionID: 1127.0.0.1 <- Response: Success
127.0.0.1 <- ActionID: 1
127.0.0.1 <- Challenge: xxxxx127.0.0.1 -> AuthType: md5
127.0.0.1 -> Events: on
127.0.0.1 -> Username: xxxx
127.0.0.1 -> Action: login
127.0.0.1 -> Key: xxxx
127.0.0.1 -> ActionID: 2127.0.0.1 <- Response: Success
127.0.0.1 <- ActionID: 2
127.0.0.1 <- Message: Authentication accepted
127.0.0.1 -> Mailbox: xxxx@novm
127.0.0.1 -> Action: MailboxStatus
127.0.0.1 -> ActionID: 3127.0.0.1 -> Action: Status
127.0.0.1 -> Action: QueueStatus
127.0.0.1 -> Action: Agent
127.0.0.1 -> Action: SipPeers
127.0.0.1 -> Action: IaxPeers
127.0.0.1 -> Action: ParkedCalls
127.0.0.1 -> Command: database show AMPUSER
127.0.0.1 -> Action: Command
127.0.0.1 -> ActionID: 4
127.0.0.1 -> Command: database show DEVICE
127.0.0.1 -> Action: Command
127.0.0.1 -> ActionID: 5127.0.0.1 -> Command: meetme list xxxx concise
127.0.0.1 -> Action: Command
127.0.0.1 -> ActionID: 6127.0.0.1 -> Conference: xxxx
127.0.0.1 -> Action: ConfbridgeList
127.0.0.1 -> ActionID: 7127.0.0.1 -> Command: database show fop2notes
127.0.0.1 -> Action: Command
127.0.0.1 -> ActionID: 8127.0.0.1 -> Command: database show fop2state
127.0.0.1 -> Action: Command
127.0.0.1 -> ActionID: 9127.0.0.1 -> Action: CoreSettings
127.0.0.1 -> ActionID: 10127.0.0.1 <- Event: FullyBooted
127.0.0.1 <- Privilege: system,all
127.0.0.1 <- Status: Fully Booted127.0.0.1 <- Response: Success
127.0.0.1 <- ActionID: 3
127.0.0.1 <- Message: Mailbox Status
127.0.0.1 <- Mailbox: xxxx@novm
127.0.0.1 <- Waiting: 0127.0.0.1 -> Mailbox: xxxx@novm
127.0.0.1 -> Action: MailboxCount
127.0.0.1 -> ActionID: 11127.0.0.1 <- Response: Success
127.0.0.1 <- Message: Channel status will follow127.0.0.1 <- Event: StatusComplete
127.0.0.1 <- Items: 0127.0.0.1 <- Response: Success
127.0.0.1 <- Message: Queue status will follow127.0.0.1 <- Event: QueueParams
127.0.0.1 <- Queue: default
127.0.0.1 <- Max: 0
127.0.0.1 <- Strategy: ringall
127.0.0.1 <- Calls: 0
127.0.0.1 <- Holdtime: 0
127.0.0.1 <- TalkTime: 0
127.0.0.1 <- Completed: 0
127.0.0.1 <- Abandoned: 0
127.0.0.1 <- ServiceLevel: 0
127.0.0.1 <- ServicelevelPerf: 0.0
127.0.0.1 <- Weight: 0127.0.0.1 <- Event: QueueStatusComplete
127.0.0.1 <- Response: Error
127.0.0.1 <- Message: Invalid/unknown command: Agent. Use Action: List commands to show available commands.127.0.0.1 <- Response: Success
127.0.0.1 <- EventList: start
127.0.0.1 <- Message: Peer status list will follow127.0.0.1 <- Event: PeerEntry
127.0.0.1 <- Channeltype: SIP
127.0.0.1 <- ObjectName: xxxx
127.0.0.1 <- ChanObjectType: peer
127.0.0.1 <- IPaddress: -none-
127.0.0.1 <- IPport: 0
127.0.0.1 <- Dynamic: yes
127.0.0.1 <- AutoForcerport: no
127.0.0.1 <- Forcerport: yes
127.0.0.1 <- AutoComedia: no
127.0.0.1 <- Comedia: yes
127.0.0.1 <- VideoSupport: yes
127.0.0.1 <- TextSupport: no
127.0.0.1 <- ACL: yes
127.0.0.1 <- Status: UNKNOWN
127.0.0.1 <- RealtimeDevice: no
127.0.0.1 <- Description:127.0.0.1 <- Event: PeerEntry
127.0.0.1 <- Channeltype: SIP
127.0.0.1 <- ObjectName: xxxx
127.0.0.1 <- ChanObjectType: peer
127.0.0.1 <- IPaddress: -none-
127.0.0.1 <- IPport: 0
127.0.0.1 <- Dynamic: yes
127.0.0.1 <- AutoForcerport: no
127.0.0.1 <- Forcerport: yes
127.0.0.1 <- AutoComedia: no
127.0.0.1 <- Comedia: yes
127.0.0.1 <- VideoSupport: yes
127.0.0.1 <- TextSupport: no
127.0.0.1 <- ACL: yes
127.0.0.1 <- Status: UNKNOWN
127.0.0.1 <- RealtimeDevice: no
127.0.0.1 <- Description:and so on for all my peers, followed by the siptrunk connections:
127.0.0.1 <- Event: PeerEntry
127.0.0.1 <- Channeltype: SIP
127.0.0.1 <- ObjectName: <tel.number>
127.0.0.1 <- ChanObjectType: peer
127.0.0.1 <- IPaddress: ip.add.re.ss
127.0.0.1 <- IPport: port
127.0.0.1 <- Dynamic: no
127.0.0.1 <- AutoForcerport: no
127.0.0.1 <- Forcerport: yes
127.0.0.1 <- AutoComedia: no
127.0.0.1 <- Comedia: yes
127.0.0.1 <- VideoSupport: yes
127.0.0.1 <- TextSupport: no
127.0.0.1 <- ACL: no
127.0.0.1 <- Status: Unmonitored
127.0.0.1 <- RealtimeDevice: no
127.0.0.1 <- Description:....
127.0.0.1 <- Event: PeerEntry
127.0.0.1 <- Channeltype: SIP
127.0.0.1 <- ObjectName: context for outgoing calls
127.0.0.1 <- ChanObjectType: peer
127.0.0.1 <- IPaddress: x.y.z.w
127.0.0.1 <- IPport: port
127.0.0.1 <- Dynamic: no
127.0.0.1 <- AutoForcerport: no
127.0.0.1 <- Forcerport: no
127.0.0.1 <- AutoComedia: no
127.0.0.1 <- Comedia: no
127.0.0.1 <- VideoSupport: yes
127.0.0.1 <- TextSupport: no
127.0.0.1 <- ACL: no
127.0.0.1 <- Status: OK (12 ms)
127.0.0.1 <- RealtimeDevice: no
127.0.0.1 <- Description:127.0.0.1 <- Event: PeerlistComplete
127.0.0.1 <- EventList: Complete
127.0.0.1 <- ListItems: 46127.0.0.1 <- Response: Success
127.0.0.1 <- EventList: start
127.0.0.1 <- Message: Peer status list will follow127.0.0.1 <- Event: PeerlistComplete
127.0.0.1 <- EventList: Complete
127.0.0.1 <- ListItems: 0127.0.0.1 <- Response: Success
127.0.0.1 <- Message: Parked calls will follow127.0.0.1 <- Event: ParkedCallsComplete
127.0.0.1 <- Total: 0127.0.0.1 <- Response: Follows
127.0.0.1 <- Privilege: Command
127.0.0.1 <- ActionID: 4
127.0.0.1 <- /AMPUSER//queues/qnostate
/AMPUSER/xxxx/answermode : disabled
/AMPUSER/xxxx/ccss/cc_agent_policy : generic
/AMPUSER/xxxx/ccss/cc_offer_timer : 30
/AMPUSER/xxxx/ccss/last_number : xxxx
/AMPUSER/xxxx/cfringtimer : 0
/AMPUSER/xxxx/cidnum : xxxx
/AMPUSER/xxxx/concurrency_limit : 0
/AMPUSER/xxxx/device : xxxx
/AMPUSER/xxxx/followme/changecid : default
/AMPUSER/xxxx/followme/ddial : DIRECT
/AMPUSER/xxxx/followme/fixedcid :
/AMPUSER/xxxx/followme/grpconf : DISABLED
/AMPUSER/xxxx/followme/grplist : tel_number#
/AMPUSER/xxxx/followme/grptime : 20
/AMPUSER/xxxx/followme/prering : 0
/AMPUSER/xxxx/language :
/AMPUSER/xxxx/noanswer :
/AMPUSER/xxxx/outboundcid :
/AMPUSER/xxxx/password : secret
/AMPUSER/xxxx/queues/qnostate : usestate
/AMPUSER/xxxx/recording :
/AMPUSER/xxxx/recording/in/external : dontcare
/AMPUSER/xxxx/recording/in/internal : dontcare
/AMPUSER/xxxx/recording/ondemand : disabled
/AMPUSER/xxxx/recording/out/external : dontcare
/AMPUSER/xxxx/recording/out/internal : dontcare
/AMPUSER/xxxx/recording/priority : 10
/AMPUSER/xxxx/ringtimer : 0
/AMPUSER/xxxx/voicemail : novmand so on for my other extensions
127.0.0.1 -> Action: DBGet
127.0.0.1 -> Family: DEVICE/xxxx
127.0.0.1 -> Key: dial
127.0.0.1 -> ActionID: getDEVICE-xxxxfor all extensions again..
127.0.0.1 <- Response: Follows
127.0.0.1 <- Privilege: Command
127.0.0.1 <- ActionID: 5
127.0.0.1 <- /DEVICE/xxxx/default_user : xxxx
/DEVICE/xxxx/dial : SIP/xxxx
/DEVICE/xxxx/type : fixed
/DEVICE/xxxx/user : xxxx
...
127.0.0.1 <- Response: Follows
127.0.0.1 <- Privilege: Command
C127.0.0.1 <- ActionID: 6
127.0.0.1 <- No such command 'meetme list xxxx concise' (type 'core show help meetme list' for other possible commands)
--END COMMAND--127.0.0.1 <- Response: Error
127.0.0.1 <- ActionID: 7
127.0.0.1 <- Message: No active conferences.127.0.0.1 <- Response: Follows
127.0.0.1 <- Privilege: Command
127.0.0.1 <- ActionID: 8
127.0.0.1 <- 0 results found.
--END COMMAND--127.0.0.1 <- Response: Follows
127.0.0.1 <- Privilege: Command
127.0.0.1 <- ActionID: 9
127.0.0.1 <- 0 results found.
--END COMMAND--127.0.0.1 <- Response: Success
127.0.0.1 <- ActionID: 10
127.0.0.1 <- AMIversion: 1.3
127.0.0.1 <- AsteriskVersion: 11.2.2
127.0.0.1 <- SystemName:
127.0.0.1 <- CoreMaxCalls: 0
127.0.0.1 <- CoreMaxLoadAvg: 0.000000
127.0.0.1 <- CoreRunUser:
127.0.0.1 <- CoreRunGroup:
127.0.0.1 <- CoreMaxFilehandles: 0
127.0.0.1 <- CoreRealTimeEnabled: No
127.0.0.1 <- CoreCDRenabled: Yes
127.0.0.1 <- CoreHTTPenabled: No127.0.0.1 <- Response: Success
127.0.0.1 <- ActionID: 11
127.0.0.1 <- Message: Mailbox Message Count
127.0.0.1 <- Mailbox: xxxx@novm
127.0.0.1 <- UrgMessages: 0
127.0.0.1 <- NewMessages: 0
127.0.0.1 <- OldMessages: 0127.0.0.1 -> Mailbox: xxxx@novm
127.0.0.1 -> Action: MailboxStatus
127.0.0.1 -> ActionID: 12127.0.0.1 <- Response: Success
127.0.0.1 <- ActionID: getDEVICE-xxxx
127.0.0.1 <- Message: Result will follow127.0.0.1 <- Event: DBGetResponse
127.0.0.1 <- Family: DEVICE/xxxx
127.0.0.1 <- Key: dial
127.0.0.1 <- Val: SIP/xxxx
127.0.0.1 <- ActionID: getDEVICE-xxxx127.0.0.1 <- Event: DBGetComplete
127.0.0.1 <- ActionID: getDEVICE-xxxx
.....
127.0.0.1 <- Response: Success
127.0.0.1 <- Message: Channel status will follow127.0.0.1 <- Event: StatusComplete
127.0.0.1 <- Items: 0127.0.0.1 <- Response: Success
127.0.0.1 <- Message: Queue status will follow127.0.0.1 <- Event: QueueParams
127.0.0.1 <- Queue: default
127.0.0.1 <- Max: 0
127.0.0.1 <- Strategy: ringall
127.0.0.1 <- Calls: 0
127.0.0.1 <- Holdtime: 0
127.0.0.1 <- TalkTime: 0
127.0.0.1 <- Completed: 0
127.0.0.1 <- Abandoned: 0
127.0.0.1 <- ServiceLevel: 0
127.0.0.1 <- ServicelevelPerf: 0.0
127.0.0.1 <- Weight: 0127.0.0.1 <- Event: QueueStatusComplete
127.0.0.1 <- Response: Success
127.0.0.1 <- ActionID: 13
127.0.0.1 <- Message: Mailbox Message Count
127.0.0.1 <- Mailbox: xxxx@novm
127.0.0.1 <- UrgMessages: 0
127.0.0.1 <- NewMessages: 0
127.0.0.1 <- OldMessages: 0
....
127.0.0.1 -> Action: LogoffRemoving /var/www/html/fop2-variables.txt...
Removing ./fop2-variablesGENERAL.txt...
Disconnecting from settings DB
Exiting...
-
First you have to fix the error with the autoconfig scripts, not sure if your gentoo has really a bash installation or some other shell with an alias, that ends up giving you that error. It is not hard to fix, as the line that fails is one that tries to determine if you have freepbx and fop2admin installed. As you said you use FreePBX, we can asume you do user freepbx, so you can just remove the line that gives the error, and set instead the variable FOP2PLUGIN=1 just below.
Also, one common mistake is to mix manual configuration with automatic configurations. Once you fix the autoconfig scirpt, be sure you remove all manual user=xxx lines you might have or buttonfile=xxx and leave ONLY the last #exec line.
Finally, to see what user/pass you can use to login, execute the autoconfig-users-freepbx.sh script again and inspect the output.
-
My Gentoo has standard shell: app-shells/bash-4.2_p45 installed:
emerge --search:
app-shells/bash
Latest version available: 4.2_p45
Latest version installed: 4.2_p45
Size of files: 6,952 kB
Homepage: http://tiswww.case.edu/php/chet/bash/bashtop.html
Description: The standard GNU Bourne again shell
License: GPL-3And yes, I do have freepbx-2.11.0rc1 installed from tarball. I also come from installing the adminmodule via webinterface, and that worked without problem. There is no manual configuration left, I just had tried to see, if I could login at least with manual config, but I was not able to login with manual configuration eather, and that's what I cannot understand..

As for the error with the script(s): I dont understand which line has to be deleted, and / or if there is a manual way of doing the job that this script tries to do. Following again the errors, when trying to execute the scripts manually:
cd /usr/local/fop2
sh autoconfig-users-freepbx.sh
autoconfig-users-freepbx.sh: line 32: syntax error near unexpected token<' autoconfig-users-freepbx.sh: line 32:done < <( mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "SHOW tables FROM `$DBNAME` LIKE 'fop2users'" )'and
sh autoconfig-buttons-freepbx.sh
autoconfig-buttons-freepbx.sh: line 38: syntax error near unexpected token<' autoconfig-buttons-freepbx.sh: line 38:done < <( mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "SHOW tables FROM `$DBNAME` LIKE 'fop2users'" )'Thanks again for trying to help. Its so annoying because I think, I am only one step away of having a look and test your promising software

In FOP2 Admin Module I can see the extensions, which have voicemail enabled and I tried to modify the secret of one user, and then try to login with it, but it does not work :oops:
-
-
hm, that would be
done < <( mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "SHOW tables FROM `$DBNAME` LIKE 'fop2users'" )
I tried to delete this and replace with FOP2PLUGIN=1 but that gives me:sh autoconfig-buttons-freepbx.sh
autoconfig-buttons-freepbx.sh: line 38: syntax error near unexpected token<' autoconfig-buttons-freepbx.sh: line 38:done < <( mysql -NB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e "SHOW tables FROM `$DBNAME` LIKE 'fop2users'" )'but wait a second. I tried the following:
instead of https://sipserver/fop2 I tried with http://sipserver/fop2 and voilà the login was ok

I did not think about it, cause I only use https:// for my freepbx website...
Is it possible to run fop2 page on port 443?
-
It is possible to run on port 443, but if using websockets, if you connect via ssl you must configure tls keys for secure websockets or browses will not be able to connect. Look at the end of fop2.cfg in version 2.27:
;ssl_certificate_file=/etc/pki/tls/certs/localhost.crt
;ssl_certificate_key_file=/etc/pki/tls/private/localhost.keyUncomment those and put the same certificates you have configured in your web server, most probably the name/paths are different in your gentoo installation (above is for default centos install). So, check your httpd.conf file or similar to see where are the certificate files located and replicate that in fop2.cfg
Another option is to disable websockets, fop2 will use flash xmlsockets instead. Edit /var/www/html/fop2/js/presence.js and set disableWebSocket=true, then clear your browser cache and try again
-
-
Hi again, I learned in irc, that - when you run bash as /bin/sh it kicks into a different "mode" internally which does not support the <( command ) syntax
so instead of
sh scriptname.shI did
./scriptname, and voilà it worked
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login