demo apps they all return "Content-Type: text/plain"

Gabor Nagy

New Member
We recently bought a license and upgraded to 5.1.3546, all functionality seems to be working fine except demo pages. They all return with a Content-Type: text/plain causing the browser to show the source code instead of the actual app.

Any idea about what the issue could be?
 

Gabor Nagy

New Member
Hi, good day.

1. Yes, and after login, it redirects me to /dashboard.xhtml
2. Yes, but it displays the source code of the page instead of the application, here are the response headers:
Content-Disposition: inline; filename="two_way_streaming.html"
Content-Length: 3967
Content-Type: text/plain
Date: Mon, 01 Oct 2018 18:11:04 GMT
Server: Apache-Coyote/1.1
Strict-Transport-Security: max-age=0 ; includeSubDomains

(note Content-Type: text/plain)

3. Chrome 69.0.3497.100

Configuration and logs sent.
 

Max

Administrator
Staff member
Unfortunately your https URL is not reachable. Please provide valid https URL and SSH access.
If you can't provide SSH access to current server, please install WCS on another server where you can provide SSH.
Please note. If you have a production license, you have to stop WCS on first server to prevent double billing from second server.
 

Max

Administrator
Staff member
The dashboard is unavailable neither by 9091/HTTP, nor by 8888/HTTPS (though the WCS is available). Please confirm that the ports are opened.
 

Gabor Nagy

New Member
I setup 5.1 on a baremetal, seems like it is working..... It is still broken when running in a docker container. Previous (5.0) runs fine in both inside and outside a container..... Let me troubleshoot this as I might have broken it when building the container. I'll update the thread
 

Gabor Nagy

New Member
I decided to test the whole thing in a GCE instance, however I am encountering a weird issue, first time I start the server it works, if I reboot and start again it does not load.
When it works I see two process running:

root 5552 1 99 20:58 pts/0 00:01:23 java -Dloader.path=/usr/local/FlashphonerWebCallServer-5.1.3578-bfebc60f5c58e24a4c19d17d8ed76e3deef1bf41/lib/tbs-commons.jar,/usr/local/FlashphonerWebCallServer-5.1.3578-bfebc60f5c58e24a4c19d17d8ed76e3deef1bf41/lib/wcs_manager-1.0.jar -Dcom.flashphoner.fms.AppHome=/usr/local/FlashphonerWebCallServer -Dnode.enable_stdout=false -Xmx512M -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/usr/local/FlashphonerWebCallServer/logs/gc-manager-2018-10-03_20-58.log -Djava.net.preferIPv4Stack=true -XX:+PrintGCDateStamps -jar /usr/local/FlashphonerWebCallServer-5.1.3578-bfebc60f5c58e24a4c19d17d8ed76e3deef1bf41/lib/wcs_manager-1.0.jar -Xmx1024M -XX:+UseConcMarkSweepGC -XX:NewSize=1024m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=50999 -Djava.rmi.server.hostname=localhost -XX:ErrorFile=/usr/local/FlashphonerWebCallServer/logs/error%p.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/usr/local/FlashphonerWebCallServer/logs/gc-core-2018-10-03_20-58.log -XX:+ExplicitGCInvokesConcurrent -Dsun.rmi.dgc.client.gcInterval=36000000000 -Dsun.rmi.dgc.server.gcInterval=36000000000 -Dcom.flashphoner.fms.AppHome=/usr/local/FlashphonerWebCallServer -Djava.library.path=/usr/local/FlashphonerWebCallServer/lib/so:/usr/local/FlashphonerWebCallServer/lib -DWCS_NON_ROOT=false -DsessionDebugEnabled=false -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" -cp /usr/local/FlashphonerWebCallServer/lib/* com.flashphoner.server.Server
root 5640 5552 78 20:59 pts/0 00:00:07 java -Xmx1024M -XX:+UseConcMarkSweepGC -XX:NewSize=1024m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=50999 -Djava.rmi.server.hostname=localhost -XX:ErrorFile=/usr/local/FlashphonerWebCallServer/logs/error%p.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:/usr/local/FlashphonerWebCallServer/logs/gc-core-2018-10-03_20-58.log -XX:+ExplicitGCInvokesConcurrent -Dsun.rmi.dgc.client.gcInterval=36000000000 -Dsun.rmi.dgc.server.gcInterval=36000000000 -Dcom.flashphoner.fms.AppHome=/usr/local/FlashphonerWebCallServer -Djava.library.path=/usr/local/FlashphonerWebCallServer/lib/so:/usr/local/FlashphonerWebCallServer/lib -DWCS_NON_ROOT=false -DsessionDebugEnabled=false -Djdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2" -cp /usr/local/FlashphonerWebCallServer/lib/* com.flashphoner.server.Server


Then when does not work, it only load the first one, the logs show:
22:12:05,583 INFO RmiConnectionManager - Timer-1 Init RMI connection to url rmi://localhost:1098/NodeApi
22:12:05,584 ERROR ystemOverviewService - Timer-1 Lookup of RMI stub failed; nested exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
org.springframework.remoting.RemoteLookupFailureException: Lookup of RMI stub failed; nested exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.java:215)
at org.springframework.remoting.rmi.RmiClientInterceptor.prepare(RmiClientInterceptor.java:147)
at org.springframework.remoting.rmi.RmiClientInterceptor.afterPropertiesSet(RmiClientInterceptor.java:135)
at org.springframework.remoting.rmi.RmiProxyFactoryBean.afterPropertiesSet(RmiProxyFactoryBean.java:68)
at com.flashphoner.server.manager.rmi.RmiConnectionManager.nodeApi(RmiConnectionManager.java:73)
at com.flashphoner.server.manager.service.SystemOverviewService$1.run(SystemOverviewService.java:59)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338)
at sun.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:112)
at java.rmi.Naming.lookup(Naming.java:101)
at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.java:200)
... 7 more
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:40)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:148)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:613)
... 13 more


I please send me your ssh public key to allow you access to the server.
 

Max

Administrator
Staff member
Credentials sent
Checked the server – it is working.
Installed haveged
Code:
apt-get install haveged
update-rc.d haveged defaults
and activated a license to check streaming - the dashboard is available, and streaming is working.
WCS does start up after restart.
The license is deactivated now. Please activate your license (if it is being used on another server, first deactivated on that server) and recheck.
 
Top