Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orkweb page does not show recorded files #104

Open
evrimaltan opened this issue Apr 4, 2022 · 12 comments
Open

Orkweb page does not show recorded files #104

evrimaltan opened this issue Apr 4, 2022 · 12 comments
Labels
not-a-bug Not an issue question Further information is requested user config error Issue with configuration

Comments

@evrimaltan
Copy link

Hello,

I have successfully completed the installation. When I record the audio, I can access the file from the folder in the directory that I want. (Default directory in config.xml e.g /var/log/orkaudio/audio) However, I can not see the recorded audio files on the page localhost:8080/orkweb/app. The only warning I see on the page is ''There were no results". Am I missing something?

Thanks for your help

@kingster
Copy link
Member

kingster commented Apr 4, 2022

Was orktrack installed & configured properly? You should be able to see the orktrack logs in /var/log/orkweb/orkweb.log something like this

2022-04-04 15:02:59,130 INFO TapeMessage [http-nio-8080-exec-286] Message: class=tape hostname=strowger-rec-1 recid=20220404_150045_ROGS stage=STOP timestamp=1649064645 duration=134 filename=2022/04/04/15/20220404_150045_ROGS.opus captureport=ROGS localparty=5678@domain localentrypoint= remoteparty=1234@domain direction=OUT loginString= service=orkaudio-strowger-rec-1 nativecallid=8af11a6b-1120-4bb8-a79b-21c9e339bfea
2022-04-04 15:02:59,131 INFO TapeManager [http-nio-8080-exec-286] Updated stop tape:20220404_150045_ROGS as 91457097
2022-04-04 15:02:59,132 DEBUG CommandServlet [http-nio-8080-exec-286] Request: class=tape hostname=strowger-rec-1 recid=20220404_150045_ROGS stage=STOP timestamp=1649064645 duration=134 filename=2022/04/04/15/20220404_150045_ROGS.opus captureport=ROGS localparty=5678@domain localentrypoint= remoteparty=1234@domain direction=OUT loginString= service=orkaudio-strowger-rec-1 nativecallid=8af11a6b-1120-4bb8-a79b-21c9e339bfea
2022-04-04 15:02:59,132 DEBUG CommandServlet [http-nio-8080-exec-286] Response: class=taperesponse success=true comment= deletetape=false
2022-04-04 15:02:59,132 INFO ACCESS [http-nio-8080-exec-286] 127.0.0.1 GET http://localhost:8080/orktrack/command?type=tape&recid=20220404_150045_ROGS&stage=stop&captureport=ROGS&timestamp=1649064645&filename=2022%2F04%2F04%2F15%2F20220404_150045_ROGS.opus&localparty=5678@domain&localentrypoint=&remoteparty=1234@domain&direction=out&duration=134&service=orkaudio-strowger-rec-1&localip=172.16.72.63&remoteip=172.16.12.223&nativecallid=8af11a6b-1120-4bb8-a79b-21c9e339bfea&tags=&ondemand=false&side=both&live=true&hostname=strowger-rec-1& 200 2

The orkweb webappp can only display the recorded files when orktrack tracks the recording and makes entires in the database. (Also the results are only available after the call has ended)

@evrimaltan
Copy link
Author

Thanks for the guidance!!

I checked my orkweb.log file and noticed that I was getting an ERROR which was OrkTrack.initialize: Error configuring Hibernate:Couldn't load class com.mysql.cj.jdbc.Driver. I have fixed the ERROR by adding the mysql-connector-java-8.0.17.jar file to the directory webapps/orktrack/WEB-INF/lib. Now I can see the recorded files on the web page but this time I can not play them.
During the installation, we were expected to create a orktrack.config.xml file inside the /etc/oreka. Since the sample file of this orktrack.config.xml is empty, I saved the file as blank. Do you think this is true? Do I need to fill the config file for the orktrack?
Because I am getting a WARNING because of this file is empty.

Best regards.

2022-04-04 14:23:38,626 INFO [http-nio-8080-exec-156] OrkTrack started successfully.
2022-04-04 14:23:38,626 INFO [http-nio-8080-exec-156] ----------------------------------------
2022-04-04 14:24:15,993 INFO [http-nio-8080-exec-157] OrkWeb ContextInitialized(): log4jConfigFile is /etc/oreka//logging.xml
2022-04-04 14:24:16,000 INFO [http-nio-8080-exec-157] ========================================
2022-04-04 14:24:16,001 INFO [http-nio-8080-exec-157] OrkWeb starting ...
2022-04-04 14:24:16,001 INFO [http-nio-8080-exec-157] OrkWeb ContextInitialized(): HibernateConfigFile is database.hbm.xml
2022-04-04 14:24:16,035 DEBUG logging [http-nio-8080-exec-157] Logging Provider: org.jboss.logging.Log4j2LoggerProvider
2022-04-04 14:24:20,351 DEBUG [http-nio-8080-exec-157] OrkWeb ContextInitialized(): get Tomcat Home...
2022-04-04 14:24:20,351 INFO [http-nio-8080-exec-157] OrkWeb ContextInitialized(): TomcatHome is set to /opt/tomcat/apache-tomcat-8.5.77
2022-04-04 14:24:20,352 DEBUG TomcatServerXMLParser [http-nio-8080-exec-157] parseServerXML() - parsing Tomcat server.xml file, path: /opt/tomcat/apache-tomcat-8.5.77/conf/server.xml
2022-04-04 14:24:20,353 DEBUG TomcatServerXMLParser [http-nio-8080-exec-157] parseServerXML() - Service found=Service
2022-04-04 14:24:20,353 DEBUG TomcatServerXMLParser [http-nio-8080-exec-157] Service attribute index - 0 - name: connectionTimeout - value: 20000
2022-04-04 14:24:20,354 DEBUG TomcatServerXMLParser [http-nio-8080-exec-157] Service attribute index - 1 - name: port - value: 8080
2022-04-04 14:24:20,354 DEBUG TomcatServerXMLParser [http-nio-8080-exec-157] Service attribute index - 2 - name: protocol - value: HTTP/1.1
2022-04-04 14:24:20,354 DEBUG TomcatServerXMLParser [http-nio-8080-exec-157] Service attribute index - 3 - name: redirectPort - value: 8443
2022-04-04 14:24:20,354 DEBUG TomcatServerXMLParser [http-nio-8080-exec-157] parseServerXML() serverTcpPort=8080 scheme=null audioContextPath=
2022-04-04 14:24:20,354 INFO [http-nio-8080-exec-157] OrkWeb started successfully.
2022-04-04 14:24:20,354 INFO [http-nio-8080-exec-157] ----------------------------------------
2022-04-04 14:24:21,623 INFO ApplicationServlet [http-nio-8080-exec-157] Initialized application servlet 'orkweb': 413 millis to create HiveMind Registry, 1,262 millis overall.
2022-04-04 14:24:38,679 DEBUG UserServiceHbn [http-nio-8080-exec-158] Trying to login user:admin with passwd:admin
2022-04-04 14:24:39,057 DEBUG UserServiceHbn [http-nio-8080-exec-158] Found userid:1 for login string:admin
2022-04-04 14:24:39,609 DEBUG RecSegmentsPage [http-nio-8080-exec-158] UpdateResults: orderby:
2022-04-04 14:24:39,611 DEBUG RecSegmentServiceHbn [http-nio-8080-exec-158] Entering getResults
2022-04-04 14:24:39,625 DEBUG RecSegmentServiceHbn [http-nio-8080-exec-158] Filter start date:2022-04-03 02:24:39
2022-04-04 14:24:39,625 DEBUG RecSegmentServiceHbn [http-nio-8080-exec-158] Filter end date:2022-04-04 02:24:39
2022-04-04 14:24:39,700 DEBUG RecSegmentServiceHbn [http-nio-8080-exec-158] Num res:2
2022-04-04 14:24:39,703 DEBUG RecSegmentsPage [http-nio-8080-exec-158] UpdateResults: Offset:0 num results:2
2022-04-04 14:24:46,397 INFO [http-nio-8080-exec-149] Serve Media File File /var/log/orkaudio/audio/2022/04/04/11/20220404_113139_AUUS.wav
2022-04-04 14:24:48,684 INFO [http-nio-8080-exec-161] Serve Media File File /var/log/orkaudio/audio/2022/04/04/11/20220404_114324_GZEG.wav
2022-04-04 14:28:00,675 INFO [http-nio-8080-exec-167] Serve Media File File /var/log/orkaudio/audio/2022/04/04/11/20220404_114324_GZEG.wav
2022-04-04 14:28:07,863 INFO [http-nio-8080-exec-163] Serve Media File File /var/log/orkaudio/audio/2022/04/04/11/
2022-04-04 14:28:14,521 INFO [http-nio-8080-exec-168] Serve Media File File /var/log/orkaudio/audio/2022/04/04/11
19526,1 99%

@kingster
Copy link
Member

kingster commented Apr 4, 2022

What is the web browser & version that you are trying to play the media file on? Some browsers/old versions have issues playing wav files.

Also are you able to play the wav files inside /var/log/orkaudio/audio directly on your system?

@evrimaltan
Copy link
Author

I have tried to play recordings on Google Chrome 100.0.4896.60 and Mozilla Firefox 98.0.2. Also I can access and listen to wav files through the folder /var/log/orkaudio/audio.

@kingster
Copy link
Member

kingster commented Apr 4, 2022

Hi,

Do you see any errors in the chrome/firefox developer console? If the recordings are proper, the orkweb should be able to play the recorded files.

@evrimaltan
Copy link
Author

hi,

I checked my developer console. When I clicked the play button the error appreared on console which is Uncaught (in promise) DOMException: Failed to load because no supported source was found. In the web page source there is a function about playing streams. It waits for a path.

function playStream(url) {

  | var player = document.getElementById('player');
  | player.src = url;
  | player.play();
  | }
  |  
  | $(document).ready(function() {
  | $("a.play-button").on("click", function(event){
  | event.preventDefault();
  | playStream( "/orkweb/stream/" + $(this).data('path'));
  | return false;
  | });
  | });

I can not listen to the recordings on the path here : localhost:8080/orkweb/stream/myaudiofile.wav

@kingster
Copy link
Member

kingster commented Apr 5, 2022

The a-href should look something like this

image

you can also try to stream directly using URL (this same happens when you click the play button)

http://localhost:8080/orkweb/stream/2022/04/05/14/20220405_144326_DNOY.opus

Can you share how does the play button looks for you?

@evrimaltan
Copy link
Author

In my case, the a-href look like this;

Screenshot from 2022-04-05 13-08-33

Is it a problem if the extension in not opus?

Also my orkweb page look like this;

Screenshot from 2022-04-05 13-07-17

@kingster
Copy link
Member

kingster commented Apr 5, 2022

What happens if you open http://localhost:8080/orkweb/stream/2022/04/04/11/20220404_114324_GZEG.wav in your browser?

@evrimaltan
Copy link
Author

The page is visible but I cannot listen from here either. It does not play when I press the play button.

Screenshot from 2022-04-05 13-39-25

@kingster
Copy link
Member

kingster commented Apr 5, 2022

For some reason, this seems like the orkweb app is unable to access the files in your case. What is the permissions for the file that you have set in the orkaudio.xml file?

You should set something like this

        <AudioFileOwner>tomcat8</AudioFileOwner>
        <AudioFileGroup>tomcat8</AudioFileGroup>
        <AudioFilePermissions>644</AudioFilePermissions>

So that the permissions of the files would be

root@rec-1:/var/log/orkaudio/audio/2022/04/05/19# ls -ltrah | head
total 3.6G
-rw-r--r--  1 tomcat8 tomcat8  1009 Apr  5 19:00 20220405_190004_GSMT.opus
-rw-r--r--  1 tomcat8 tomcat8   15K Apr  5 19:00 20220405_190005_GSNC.opus
-rw-r--r--  1 tomcat8 tomcat8   13K Apr  5 19:00 20220405_190011_GSNZ.opus
-rw-r--r--  1 tomcat8 tomcat8   20K Apr  5 19:00 20220405_190009_GSOC.opus
-rw-r--r--  1 tomcat8 tomcat8   20K Apr  5 19:00 20220405_190004_GSMY.opus
-rw-r--r--  1 tomcat8 tomcat8   31K Apr  5 19:00 20220405_190010_GSNU.opus
-rw-r--r--  1 tomcat8 tomcat8   19K Apr  5 19:00 20220405_190010_GSNS.opus
-rw-r--r--  1 tomcat8 tomcat8  1.2K Apr  5 19:00 20220405_190028_GSRK.opus
-rw-r--r--  1 tomcat8 tomcat8  1.1K Apr  5 19:00 20220405_190029_GSRW.opus

Can you check what permission your files have? Because IMO this mostly looks like a permission issue (I tried using wav format and was able to correctly play that)

image

@kingster
Copy link
Member

@evrimaltan Are you still facing the issue after the above-recommended changes?

@kingster kingster added question Further information is requested user config error Issue with configuration not-a-bug Not an issue labels Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-a-bug Not an issue question Further information is requested user config error Issue with configuration
Projects
None yet
Development

No branches or pull requests

2 participants